Blame 0030-base-init.sh-don-t-remove-99-cmdline-ask-on-hostonly.patch
|
Harald Hoyer |
b38677 |
From 4ab6447c2a9ed105e7fba26ded2b3f3b725de8e9 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
b38677 |
From: Evgeny Vereshchagin <evvers@ya.ru>
|
|
Harald Hoyer |
b38677 |
Date: Mon, 15 Feb 2016 13:47:18 +0000
|
|
Harald Hoyer |
b38677 |
Subject: [PATCH] base/init.sh: don't remove 99-cmdline-ask on 'hostonly'
|
|
Harald Hoyer |
b38677 |
cleanup
|
|
Harald Hoyer |
b38677 |
|
|
Harald Hoyer |
b38677 |
How to reproduce:
|
|
Harald Hoyer |
b38677 |
host# ./dracut.sh -o 'dracut-systemd systemd systemd-initrd' --local -f ./initramfs.img
|
|
Harald Hoyer |
b38677 |
|
|
Harald Hoyer |
b38677 |
host# qemu-system-x86_64 -initrd ./initramfs.img \
|
|
Harald Hoyer |
b38677 |
-append 'root=/dev/sda1 rd.cmdline=ask rd.hostonly=0' \
|
|
Harald Hoyer |
b38677 |
...
|
|
Harald Hoyer |
b38677 |
|
|
Harald Hoyer |
b38677 |
Enter additional kernel command line parameter (end with ctrl-d or .)
|
|
Harald Hoyer |
b38677 |
> rd.break
|
|
Harald Hoyer |
b38677 |
> .
|
|
Harald Hoyer |
b38677 |
...
|
|
Harald Hoyer |
b38677 |
There is no "Break before switch_root"
|
|
Harald Hoyer |
b38677 |
...
|
|
Harald Hoyer |
b38677 |
|
|
Harald Hoyer |
b38677 |
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
|
|
Harald Hoyer |
b38677 |
---
|
|
Harald Hoyer |
b38677 |
modules.d/99base/init.sh | 2 ++
|
|
Harald Hoyer |
b38677 |
1 file changed, 2 insertions(+)
|
|
Harald Hoyer |
b38677 |
|
|
Harald Hoyer |
b38677 |
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
|
|
Harald Hoyer |
b38677 |
index e2e4029..bd7ef70 100755
|
|
Harald Hoyer |
b38677 |
--- a/modules.d/99base/init.sh
|
|
Harald Hoyer |
b38677 |
+++ b/modules.d/99base/init.sh
|
|
Harald Hoyer |
b38677 |
@@ -120,7 +120,9 @@ if getarg "rd.cmdline=ask"; then
|
|
Harald Hoyer |
b38677 |
fi
|
|
Harald Hoyer |
b38677 |
|
|
Harald Hoyer |
b38677 |
if ! getargbool 1 'rd.hostonly'; then
|
|
Harald Hoyer |
b38677 |
+ [ -f /etc/cmdline.d/99-cmdline-ask.conf ] && mv /etc/cmdline.d/99-cmdline-ask.conf /tmp/99-cmdline-ask.conf
|
|
Harald Hoyer |
b38677 |
remove_hostonly_files
|
|
Harald Hoyer |
b38677 |
+ [ -f /tmp/99-cmdline-ask.conf ] && mv /tmp/99-cmdline-ask.conf /etc/cmdline.d/99-cmdline-ask.conf
|
|
Harald Hoyer |
b38677 |
fi
|
|
Harald Hoyer |
b38677 |
|
|
Harald Hoyer |
b38677 |
# run scriptlets to parse the command line
|