diff --git a/dracut/28immucore/generator.sh b/dracut/28immucore/generator.sh index 12c2cb7..ee04020 100755 --- a/dracut/28immucore/generator.sh +++ b/dracut/28immucore/generator.sh @@ -13,8 +13,9 @@ oem_label=$(getarg rd.cos.oemlabel=) { echo "[Unit]" echo "DefaultDependencies=no" - echo "Before=cos-immutable-rootfs.service" + echo "Before=initrd-fs.target" echo "Conflicts=initrd-switch-root.target" + echo "Requires=initrd-root-fs.target" if getargbool 0 rd.neednet; then echo "Wants=network-online.target" echo "After=network-online.target" @@ -22,15 +23,16 @@ oem_label=$(getarg rd.cos.oemlabel=) else echo "Description=immucore mount" fi + # Itxaka: oem is mounted by immucore? # OEM is special as immucore plugins might need that in order to unlock other partitions and plugins can reside in /oem as well and immucore needs to find them - if [ -n "${oem_label}" ]; then - echo "After=oem.mount" - fi - echo "After=sysroot.mount" + #if [ -n "${oem_label}" ]; then + # echo "After=oem.mount" + #fi + echo "After=initrd-root-fs.target cos-setup-rootfs.service" echo "[Service]" echo "Type=oneshot" echo "RemainAfterExit=yes" - echo "ExecStart=/usr/bin/immucore start --dry-run" + echo "ExecStart=/usr/bin/immucore start" } > "$GENERATOR_DIR"/immucore.service diff --git a/dracut/28immucore/module-setup.sh b/dracut/28immucore/module-setup.sh index e5e6bb5..d25ecaa 100755 --- a/dracut/28immucore/module-setup.sh +++ b/dracut/28immucore/module-setup.sh @@ -23,6 +23,7 @@ install() { declare moddir=${moddir} declare systemdutildir=${systemdutildir} declare systemdsystemunitdir=${systemdsystemunitdir} + declare initdir="${initdir}" # Add missing elemental binary, drop once we get yip lib inside immucore as its only needed to run the stages inst_multiple \ @@ -31,5 +32,9 @@ install() { inst_script "${moddir}/generator.sh" \ "${systemdutildir}/system-generators/immucore-generator" + mkdir -p "${initdir}/${systemdsystemunitdir}/initrd-fs.target.requires" + ln_r "../immucore.service" \ + "${systemdsystemunitdir}/initrd-fs.target.requires/immucore.service" + dracut_need_initqueue } \ No newline at end of file