base/init.sh: don't remove 99-cmdline-ask on 'hostonly' cleanup

How to reproduce:
host# ./dracut.sh -o 'dracut-systemd systemd systemd-initrd' --local -f ./initramfs.img

host# qemu-system-x86_64 -initrd ./initramfs.img \
    -append 'root=/dev/sda1 rd.cmdline=ask rd.hostonly=0' \
    ...

Enter additional kernel command line parameter (end with ctrl-d or .)
> rd.break
> .
...
There is no "Break before switch_root"
...

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
master
Evgeny Vereshchagin 2016-02-15 13:47:18 +00:00
parent 6a97d2fc89
commit 4ab6447c2a
1 changed files with 2 additions and 0 deletions

View File

@ -120,7 +120,9 @@ if getarg "rd.cmdline=ask"; then
fi fi


if ! getargbool 1 'rd.hostonly'; then if ! getargbool 1 'rd.hostonly'; then
[ -f /etc/cmdline.d/99-cmdline-ask.conf ] && mv /etc/cmdline.d/99-cmdline-ask.conf /tmp/99-cmdline-ask.conf
remove_hostonly_files remove_hostonly_files
[ -f /tmp/99-cmdline-ask.conf ] && mv /tmp/99-cmdline-ask.conf /etc/cmdline.d/99-cmdline-ask.conf
fi fi


# run scriptlets to parse the command line # run scriptlets to parse the command line