From af87a63dde2359c285122bef714567940ae4c63e Mon Sep 17 00:00:00 2001 From: Itxaka Date: Wed, 18 Sep 2024 09:38:07 +0200 Subject: [PATCH] Drop uneeded files Signed-off-by: Itxaka --- dracut/10-kcrypt.conf | 1 - dracut/29kcrypt/generator.sh | 52 --------------------------------- dracut/29kcrypt/module-setup.sh | 35 ---------------------- 3 files changed, 88 deletions(-) delete mode 100644 dracut/10-kcrypt.conf delete mode 100755 dracut/29kcrypt/generator.sh delete mode 100644 dracut/29kcrypt/module-setup.sh diff --git a/dracut/10-kcrypt.conf b/dracut/10-kcrypt.conf deleted file mode 100644 index 448ac5e4..00000000 --- a/dracut/10-kcrypt.conf +++ /dev/null @@ -1 +0,0 @@ -add_dracutmodules+=" kcrypt " \ No newline at end of file diff --git a/dracut/29kcrypt/generator.sh b/dracut/29kcrypt/generator.sh deleted file mode 100755 index ea9b65e5..00000000 --- a/dracut/29kcrypt/generator.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh - -GENERATOR_DIR="$2" - -[ -z "$GENERATOR_DIR" ] && exit 1 -[ -d "$GENERATOR_DIR" ] || mkdir "$GENERATOR_DIR" - -oem_label=$(getarg rd.cos.oemlabel=) - -## Several things indicate booting from a different media so we should not do anything -## rd.cos.disable is set on LIVECD and disables mounting of any type -if getargbool 0 rd.cos.disable; then - exit 0 -fi -## Netboot is set on...well, netboot obiously -if getargbool 0 netboot; then - exit 0 -fi - - -# See https://github.com/kairos-io/packages/blob/d12b12b043a71d8471454f7b4fc84c3181d2bf60/packages/system/dracut/immutable-rootfs/30cos-immutable-rootfs/cos-generator.sh#L29 -{ - echo "[Unit]" - echo "DefaultDependencies=no" - echo "Before=immucore.service" - echo "Conflicts=initrd-switch-root.target" - if getargbool 0 rd.neednet; then - echo "Wants=network-online.target" - echo "After=network-online.target" - echo "Description=kcrypt online mount" - else - echo "Description=kcrypt mount" - fi - # OEM is special as kcrypt plugins might need that in order to unlock other partitions and plugins can reside in /oem as well and kcrypt needs to find them - if [ -n "${oem_label}" ]; then - echo "After=oem.mount" - fi - echo "After=sysroot.mount" - echo "[Service]" - echo "Type=oneshot" - echo "RemainAfterExit=no" - echo "ExecStart=/usr/bin/kcrypt unlock-all" -} > "$GENERATOR_DIR"/kcrypt.service - - -if [ ! -e "$GENERATOR_DIR/initrd-fs.target.requires/kcrypt.service" ]; then - mkdir -p "$GENERATOR_DIR"/initrd-fs.target.requires - ln -s "$GENERATOR_DIR"/kcrypt.service \ - "$GENERATOR_DIR"/initrd-fs.target.requires/kcrypt.service -fi diff --git a/dracut/29kcrypt/module-setup.sh b/dracut/29kcrypt/module-setup.sh deleted file mode 100644 index 1b41f96d..00000000 --- a/dracut/29kcrypt/module-setup.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# called by dracut -check() { - require_binaries "$systemdutildir"/systemd || return 1 - return 255 -} - -# called by dracut -depends() { - echo systemd rootfs-block dm fs-lib - #tpm2-tss - return 0 -} - -# called by dracut -installkernel() { - instmods overlay -} - -# called by dracut -install() { - declare moddir=${moddir} - declare systemdutildir=${systemdutildir} - declare systemdsystemunitdir=${systemdsystemunitdir} - declare initdir="${initdir}" - - inst_multiple \ - kcrypt - - inst_script "${moddir}/generator.sh" \ - "${systemdutildir}/system-generators/dracut-kcrypt-generator" - - dracut_need_initqueue -} \ No newline at end of file