tmpfiles: 3 trivial cleanups (#36332)
[systemd.io.git] / mkosi.images / exitrd / mkosi.extra / shutdown
blobe4c60871e832c7eb925289e0bdf6dcde348bb05c
1 #!/usr/bin/bash
2 # SPDX-License-Identifier: LGPL-2.1-or-later
3 set -eux
5 EXIT_CODE=()
7 # Translate a successful exit code to 124 so that we can detect that the exitrd was actually used.
8 if [[ "$*" == *"--exit-code=123"* ]]; then
9 EXIT_CODE+=("--exit-code=124")
12 exec /usr/lib/systemd/systemd-shutdown "$@" "${EXIT_CODE[@]}"