diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:45 +0000 |
commit | efeb864cb547a2cbf96dc0053a8bdb4d9190b364 (patch) | |
tree | c0b83368f18be983fcc763200c4c24d633244588 /mkosi.images/exitrd/mkosi.extra/shutdown | |
parent | Releasing progress-linux version 255.5-1~progress7.99u1. (diff) | |
download | systemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.tar.xz systemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.zip |
Merging upstream version 256.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mkosi.images/exitrd/mkosi.extra/shutdown')
-rwxr-xr-x | mkosi.images/exitrd/mkosi.extra/shutdown | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mkosi.images/exitrd/mkosi.extra/shutdown b/mkosi.images/exitrd/mkosi.extra/shutdown new file mode 100755 index 0000000..e4c6087 --- /dev/null +++ b/mkosi.images/exitrd/mkosi.extra/shutdown @@ -0,0 +1,12 @@ +#!/usr/bin/bash +# SPDX-License-Identifier: LGPL-2.1-or-later +set -eux + +EXIT_CODE=() + +# Translate a successful exit code to 124 so that we can detect that the exitrd was actually used. +if [[ "$*" == *"--exit-code=123"* ]]; then + EXIT_CODE+=("--exit-code=124") +fi + +exec /usr/lib/systemd/systemd-shutdown "$@" "${EXIT_CODE[@]}" |