Add extra files needed for dracut (#36)

* Add extra files needed for dracut

If we are dropping cos-immutable-rootfs then we have to include the
missing files that the package already added.

For example, the several dracut configs of modules for the initramfs
stage, or the general config for the dracut file.

We also need to install and link the initramfs elemental stage service
as that its no longer provided by the cos-immutable-rootfs package and
not integrated into immucore yet

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* Minor improvements

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

---------

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
This commit is contained in:
Itxaka
2023-02-13 14:34:51 +01:00
committed by GitHub
parent 5122a57cc1
commit 56632ca277
7 changed files with 37 additions and 7 deletions

View File

@@ -23,7 +23,6 @@ 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 immucore elemental
@@ -34,5 +33,11 @@ install() {
inst_simple "${moddir}/immucore.service" "${systemdsystemunitdir}/immucore.service"
mkdir -p "${initdir}/${systemdsystemunitdir}/initrd-fs.target.requires"
ln_r "../immucore.service" "${systemdsystemunitdir}/initrd-fs.target.requires/immucore.service"
# Until this is done on immucore, we need to ship it as part of the dracut module
inst_simple "${moddir}/kairos-setup-initramfs.service" "${systemdsystemunitdir}/kairos-setup-initramfs.service"
mkdir -p "${initdir}/${systemdsystemunitdir}/initrd.target.requires"
ln_r "../kairos-setup-initramfs.service" "${systemdsystemunitdir}/initrd.target.requires/kairos-setup-initramfs.service"
dracut_need_initqueue
}