Skip to content

Commit

Permalink
instead of creating a conf file, pass options to dracut
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrfai committed May 29, 2023
1 parent a9eb93d commit d255614
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions bin/fai-cd
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ create_autodiscover_iso() {
local compress

# boot-only CD does not need those dracut modules
cat <<EOF > $ONFSROOT/etc/dracut.conf.d/02-omit.conf
omit_dracutmodules+=" fs-lib livenet rootfs-block "
EOF

if [ -n "$_OPTJ" ]; then
compress="--xz"
Expand All @@ -159,10 +156,9 @@ EOF
mv $ONFSROOT/boot/initrd.img* $ONFSROOT/tmp
hide_dirs
mountpoint -q $ONFSROOT/proc || mount --bind /proc $ONFSROOT/proc
TMPDIR=/tmp chroot $ONFSROOT dracut --add 'fai-autodiscover' "$compress" /boot/initrd.img-$rel $rel 2>/dev/null
TMPDIR=/tmp chroot $ONFSROOT dracut -o ' fs-lib livenet rootfs-block ' -a 'fai-autodiscover' "$compress" /boot/initrd.img-$rel $rel 2>/dev/null
umount $ONFSROOT/proc
unhide_dirs
rm -f $ONFSROOT/etc/dracut.conf.d/02-omit.conf

fai-cd $arguments -g $grub_config $isoname
mv $ONFSROOT/tmp/initrd.img* $ONFSROOT/boot
Expand Down

0 comments on commit d255614

Please sign in to comment.