From 1f0f3a593616e8d12bdb2d81975f982b895afa8a Mon Sep 17 00:00:00 2001 From: artoo Date: Wed, 6 May 2026 19:39:47 +0200 Subject: [PATCH 1/1] no systemd --- hooks/resume | 7 --- init_functions | 11 ---- install/lvm2 | 6 +- install/mdadm_udev | 6 -- install/resume | 7 --- install/sd-encrypt | 67 -------------------- install/sd-encrypt-opensc | 59 ------------------ install/sd-shutdown | 21 ------- install/sd-vconsole | 124 -------------------------------------- install/sd-verity | 38 ------------ install/sd-volatile | 22 ------- 11 files changed, 1 insertion(+), 367 deletions(-) delete mode 100644 install/sd-encrypt delete mode 100644 install/sd-encrypt-opensc delete mode 100644 install/sd-shutdown delete mode 100644 install/sd-vconsole delete mode 100644 install/sd-verity delete mode 100644 install/sd-volatile diff --git a/hooks/resume b/hooks/resume index 2a58c4f..6a63a96 100644 --- a/hooks/resume +++ b/hooks/resume @@ -9,13 +9,6 @@ run_hook() { return 0 fi - # systemd-hibernate-resume supports resuming from 'HibernateLocation' - # EFI variable. $resume can be empty in this case. - if [ -x /usr/lib/systemd/systemd-hibernate-resume ]; then - /usr/lib/systemd/systemd-hibernate-resume - return - fi - resume="$(getarg resume)" if [ -z "$resume" ]; then err 'resume: no device specified for hibernation' diff --git a/init_functions b/init_functions index 1260f84..2d80426 100644 --- a/init_functions +++ b/init_functions @@ -350,17 +350,6 @@ fsck_root() { elif bitfield_has_bit "$fsckret" 128; then err "fatal error invoking fsck" fi - - # ensure that root is going to be mounted rw. Otherwise, systemd - # might fsck the device again. Annoy the user so that they fix this. - if [ "${rwopt:-ro}" != 'rw' ]; then - echo "********************** WARNING **********************" - echo "* *" - echo "* The root device is not configured to be mounted *" - echo "* read-write! It may be fsck'd again later. *" - echo "* *" - echo "*****************************************************" - fi fi } diff --git a/install/lvm2 b/install/lvm2 index 0c2e456..90d7ceb 100644 --- a/install/lvm2 +++ b/install/lvm2 @@ -34,11 +34,7 @@ build() { '95-dm-notify.rules' # this udev rule is specific for systemd and non-systemd systems - if declare -F add_systemd_unit &>/dev/null; then - add_udev_rule '69-dm-lvm.rules' - else - add_udev_rule '/usr/lib/initcpio/udev/69-dm-lvm.rules' - fi + add_udev_rule '/usr/lib/initcpio/udev/69-dm-lvm.rules' # config file sed -e 's/^[[:space:]#]*monitoring = [[:digit:]]\+\s*$/\tmonitoring = 0/' \ diff --git a/install/mdadm_udev b/install/mdadm_udev index dad7f7b..7c2b1a8 100644 --- a/install/mdadm_udev +++ b/install/mdadm_udev @@ -15,12 +15,6 @@ build() { # For external metadata arrays (e.g. IMSM) add_binary mdmon - if declare -F add_systemd_unit &>/dev/null; then - add_systemd_unit 'mdmon@.service' - # support activation of degraded arrays - add_systemd_unit 'mdadm-last-resort@.service' - add_systemd_unit 'mdadm-last-resort@.timer' - fi } help() { diff --git a/install/resume b/install/resume index 4d9622e..97fb9ec 100644 --- a/install/resume +++ b/install/resume @@ -6,13 +6,6 @@ build() { map add_module 'crypto-lzo' 'crypto-lz4' - if command -v systemctl &>/dev/null; then - IFS=' .-~^' read -r _ systemd_ver _ < <(SYSTEMD_COLORS=0 systemctl --version) - if (( systemd_ver >= 255 )); then - add_binary /usr/lib/systemd/systemd-hibernate-resume - fi - fi - add_runscript } diff --git a/install/sd-encrypt b/install/sd-encrypt deleted file mode 100644 index 856f640..0000000 --- a/install/sd-encrypt +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -build() { - local mod - - map add_module 'dm-crypt' 'dm-integrity' 'hid-generic?' - if [[ -n "$CRYPTO_MODULES" ]]; then - for mod in $CRYPTO_MODULES; do - add_module "$mod" - done - else - add_all_modules '/crypto/' - fi - add_checked_modules '/drivers/char/tpm/' - - map add_udev_rule \ - '10-dm.rules' \ - '13-dm-disk.rules' \ - '60-fido-id.rules' \ - '95-dm-notify.rules' - - map add_systemd_unit 'cryptsetup.target' \ - 'systemd-ask-password-console.path' \ - 'systemd-ask-password-console.service' - map add_binary \ - '/usr/lib/systemd/system-generators/systemd-cryptsetup-generator' \ - '/usr/lib/systemd/systemd-cryptsetup' \ - '/usr/lib/systemd/systemd-makefs' \ - '/usr/lib/cryptsetup/libcryptsetup-token-systemd-fido2.so' \ - '/usr/lib/cryptsetup/libcryptsetup-token-systemd-tpm2.so' - - # cryptsetup calls pthread_create(), which dlopen()s libgcc_s.so.1 - add_binary '/usr/lib/libgcc_s.so.1' - - # cryptsetup loads the legacy provider which is required for whirlpool - add_binary '/usr/lib/ossl-modules/legacy.so' - - # add libraries dlopen()ed by systemd-cryptsetup - LC_ALL=C.UTF-8 find /usr/lib/ -maxdepth 1 -name "libfido2.so*" | while read -r FILE; do - if [[ -L "${FILE}" ]]; then - add_symlink "${FILE}" - else - add_binary "${FILE}" - fi - done - - # add mkswap for creating swap space on the fly (see 'swap' in crypttab(5)) - add_binary 'mkswap' - - # add NVPCR definition files - map add_file /usr/lib/nvpcr/*.nvpcr - - [[ -f /etc/crypttab.initramfs ]] && add_file '/etc/crypttab.initramfs' '/etc/crypttab' -} - -help() { - cat < cryptsetup-pre.target -> systemd-cryptsetup@.service -> cryptsetup.target - add_systemd_unit 'cryptsetup-pre.target' - add_symlink '/usr/lib/systemd/system/cryptsetup-pre.target.wants/pcscd.socket' '/usr/lib/systemd/system/pcscd.socket' - add_symlink '/usr/lib/systemd/system/cryptsetup.target.wants/cryptsetup-pre.target' '/usr/lib/systemd/system/cryptsetup-pre.target' - - add_file '/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist' - add_binary '/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so' -} - -help() { - cat </dev/null; then - add_binary kexec - fi -} - -help() { - cat <