Files
immucore/dracut/28immucore/module-setup.sh
2023-02-07 21:05:30 +01:00

38 lines
1.2 KiB
Bash
Executable File

#!/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}
# 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 blkid e2fsck resize2fs mount umount sgdisk
# missing mkfs.xfs xfs_growfs in image?
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"
dracut_need_initqueue
}