2023-02-01 21:34:07 +00:00
|
|
|
#!/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}
|
2023-02-06 21:06:31 +00:00
|
|
|
declare initdir=${initdir}
|
2023-02-01 21:34:07 +00:00
|
|
|
|
2023-02-06 10:29:28 +00:00
|
|
|
# Add missing elemental binary, drop once we get yip lib inside immucore as its only needed to run the stages
|
2023-02-06 20:45:01 +00:00
|
|
|
inst_multiple immucore elemental
|
2023-02-07 19:16:02 +00:00
|
|
|
# add utils used by elemental or stages
|
|
|
|
inst_multiple partprobe sync udevadm parted mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.vfat mkfs.fat mkfs.xfs blkid e2fsck resize2fs mount xfs_growfs umount sgdisk
|
2023-02-06 20:45:01 +00:00
|
|
|
inst_script "${moddir}/generator.sh" "${systemdutildir}/system-generators/immucore-generator"
|
2023-02-06 21:06:31 +00:00
|
|
|
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"
|
2023-02-01 21:34:07 +00:00
|
|
|
dracut_need_initqueue
|
|
|
|
}
|