immucore/dracut/28immucore/module-setup.sh

37 lines
1.2 KiB
Bash
Raw Normal View History

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}
declare initdir=${initdir}
2023-02-01 21:34:07 +00:00
# Add missing elemental binary, drop once we get yip lib inside immucore as its only needed to run the stages
inst_multiple immucore elemental
# 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
inst_script "${moddir}/generator.sh" "${systemdutildir}/system-generators/immucore-generator"
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
}