[rhel7-branch 4/5] dracut: fix missing messages for inst.ks=cdrom

wgwoods installerbot-noreply at redhat.com
Wed Jul 22 21:55:08 UTC 2015


From: Will Woods <wwoods at redhat.com>

fetch-kickstart-disk and anaconda-diskroot are *executed*, not sourced,
so they don't get the default dracut environment, so "$kickstart" isn't
set, so "str_starts $kickstart cdrom" is always false, so the user never
gets any of the "Please insert CDROM containing '$path'..." messages.

Set "$kickstart" from the boot args, and then this all works as
expected.

Related: rhbz#1168902
(cherry picked from commit 672ee4fe918a54ef94c62e86bc71e0993b6f1dd1)
---
 dracut/anaconda-diskroot    | 1 +
 dracut/fetch-kickstart-disk | 1 +
 2 files changed, 2 insertions(+)

diff --git a/dracut/anaconda-diskroot b/dracut/anaconda-diskroot
index 36fd49e..4ae7112 100755
--- a/dracut/anaconda-diskroot
+++ b/dracut/anaconda-diskroot
@@ -32,6 +32,7 @@ run_checkisomd5() {
 
 dev="$1"
 path="$2" # optional, could be empty
+kickstart="$(getarg ks= inst.ks=)"
 
 [ -e "/dev/root" ] && exit 1 # we already have a root device!
 
diff --git a/dracut/fetch-kickstart-disk b/dracut/fetch-kickstart-disk
index 37a1050..7eb769e 100755
--- a/dracut/fetch-kickstart-disk
+++ b/dracut/fetch-kickstart-disk
@@ -6,6 +6,7 @@ command -v getarg >/dev/null || . /lib/dracut-lib.sh
 
 dev="$1"
 path="${2:-/ks.cfg}"
+kickstart="$(getarg ks= inst.ks=)"
 
 [ -e /tmp/ks.cfg.done ] && exit 1
 [ -b "$dev" ] || exit 1


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/f200ac3aaebc4ea5f8f824ec564bf7f7b5f45c26


More information about the anaconda-patches mailing list