2023-02-01 22:34:07 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# called by dracut
|
|
|
|
check() {
|
2023-03-08 11:45:11 +01:00
|
|
|
return 0
|
2023-02-01 22:34:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
# called by dracut
|
|
|
|
depends() {
|
2023-03-08 11:45:11 +01:00
|
|
|
echo rootfs-block dm fs-lib
|
2023-02-01 22:34:07 +01:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
# called by dracut
|
|
|
|
installkernel() {
|
|
|
|
instmods overlay
|
|
|
|
}
|
|
|
|
|
|
|
|
# called by dracut
|
|
|
|
install() {
|
|
|
|
declare moddir=${moddir}
|
|
|
|
declare systemdutildir=${systemdutildir}
|
|
|
|
declare systemdsystemunitdir=${systemdsystemunitdir}
|
|
|
|
|
2023-02-06 11:29:28 +01:00
|
|
|
# Add missing elemental binary, drop once we get yip lib inside immucore as its only needed to run the stages
|
2023-02-06 21:45:01 +01:00
|
|
|
inst_multiple immucore elemental
|
2023-02-07 20:16:02 +01:00
|
|
|
# add utils used by elemental or stages
|
2023-02-08 15:59:04 +01:00
|
|
|
inst_multiple partprobe sync udevadm parted mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.vfat mkfs.fat blkid e2fsck resize2fs mount umount sgdisk rsync
|
2023-02-07 20:27:31 +01:00
|
|
|
# missing mkfs.xfs xfs_growfs in image?
|
2023-02-06 21:45:01 +01:00
|
|
|
inst_script "${moddir}/generator.sh" "${systemdutildir}/system-generators/immucore-generator"
|
2023-02-06 22:06:31 +01:00
|
|
|
inst_simple "${moddir}/immucore.service" "${systemdsystemunitdir}/immucore.service"
|
2023-02-13 14:34:51 +01:00
|
|
|
mkdir -p "${initdir}/${systemdsystemunitdir}/initrd.target.requires"
|
2023-03-08 11:45:11 +01:00
|
|
|
ln_r "../immucore.service" "${systemdsystemunitdir}/initrd.target.requires/immucore.service"
|
2023-02-13 14:34:51 +01:00
|
|
|
|
2023-02-01 22:34:07 +01:00
|
|
|
dracut_need_initqueue
|
|
|
|
}
|