diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
commit | fc53809803cd2bc2434e312b19a18fa36776da12 (patch) | |
tree | b4b43bd6538f51965ce32856e9c053d0f90919c8 /mkosi.images/exitrd | |
parent | Adding upstream version 255.5. (diff) | |
download | systemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip |
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mkosi.images/exitrd')
-rw-r--r-- | mkosi.images/exitrd/mkosi.conf | 22 | ||||
-rw-r--r-- | mkosi.images/exitrd/mkosi.conf.d/10-arch.conf | 29 | ||||
-rw-r--r-- | mkosi.images/exitrd/mkosi.conf.d/10-centos-fedora.conf | 9 | ||||
-rw-r--r-- | mkosi.images/exitrd/mkosi.conf.d/10-debian-ubuntu.conf | 9 | ||||
-rw-r--r-- | mkosi.images/exitrd/mkosi.conf.d/10-opensuse.conf | 8 | ||||
-rwxr-xr-x | mkosi.images/exitrd/mkosi.extra/shutdown | 12 |
6 files changed, 89 insertions, 0 deletions
diff --git a/mkosi.images/exitrd/mkosi.conf b/mkosi.images/exitrd/mkosi.conf new file mode 100644 index 0000000..2e867cb --- /dev/null +++ b/mkosi.images/exitrd/mkosi.conf @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +[Config] +ConfigureScripts= + +[Output] +Format=directory + +[Content] +Bootable=no +@Locale=C.UTF-8 +WithDocs=no +CleanPackageMetadata=yes +MakeInitrd=yes + +BuildSources= +Packages= +BuildPackages= +VolatilePackages= + +Packages= + bash diff --git a/mkosi.images/exitrd/mkosi.conf.d/10-arch.conf b/mkosi.images/exitrd/mkosi.conf.d/10-arch.conf new file mode 100644 index 0000000..c8b1904 --- /dev/null +++ b/mkosi.images/exitrd/mkosi.conf.d/10-arch.conf @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +[Match] +Distribution=arch + +[Content] +Packages= + systemd + +RemoveFiles= + # Arch Linux doesn't split their gcc-libs package so we manually remove + # unneeded stuff here to make sure it doesn't end up in the image. + /usr/lib/libgfortran.so* + /usr/lib/libgo.so* + /usr/lib/libgomp.so* + /usr/lib/libgphobos.so* + /usr/lib/libobjc.so* + /usr/lib/libgdruntime.so* + + # Remove all files that are only required for development. + /usr/lib/*.a + /usr/include/* + + /usr/share/i18n/* + /usr/share/hwdata/* + /usr/share/iana-etc/* + /usr/share/locale/* + /usr/share/terminfo/* + /usr/share/zoneinfo/* diff --git a/mkosi.images/exitrd/mkosi.conf.d/10-centos-fedora.conf b/mkosi.images/exitrd/mkosi.conf.d/10-centos-fedora.conf new file mode 100644 index 0000000..8458dee --- /dev/null +++ b/mkosi.images/exitrd/mkosi.conf.d/10-centos-fedora.conf @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +[Match] +Distribution=|centos +Distribution=|fedora + +[Content] +Packages= + systemd-standalone-shutdown diff --git a/mkosi.images/exitrd/mkosi.conf.d/10-debian-ubuntu.conf b/mkosi.images/exitrd/mkosi.conf.d/10-debian-ubuntu.conf new file mode 100644 index 0000000..babde60 --- /dev/null +++ b/mkosi.images/exitrd/mkosi.conf.d/10-debian-ubuntu.conf @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +[Match] +Distribution=|debian +Distribution=|ubuntu + +[Content] +Packages= + systemd diff --git a/mkosi.images/exitrd/mkosi.conf.d/10-opensuse.conf b/mkosi.images/exitrd/mkosi.conf.d/10-opensuse.conf new file mode 100644 index 0000000..3f6df21 --- /dev/null +++ b/mkosi.images/exitrd/mkosi.conf.d/10-opensuse.conf @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +[Match] +Distribution=opensuse + +[Content] +Packages= + systemd 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[@]}" |