[rhel7-branch 3/5] Wait forever for kickstarts on CDROM (#1168902)

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


From: Will Woods <wwoods at redhat.com>

Commit 5d016ef added support for doing cdrom-swapping while doing
"inst.ks=cdrom[:...]". But it turns out that if you're slow to swap the
discs, we'll hit dracut's retry timeout and it'll drop to the emergency
shell.

So, in response to User Requests, we now disable the timeout entirely
when using "inst.ks=cdrom[:...]"; dracut will wait forever for the
kickstart and/or installer media, and if anything goes wrong you're just
stuck and you'll need to reset.

Resolves: rhbz#1168902
(cherry picked from commit bc6378b2fed442e2f5a5d723ada9f87baed1e835)
---
 dracut/kickstart-genrules.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dracut/kickstart-genrules.sh b/dracut/kickstart-genrules.sh
index 3b83d6c1..7edfacd 100755
--- a/dracut/kickstart-genrules.sh
+++ b/dracut/kickstart-genrules.sh
@@ -19,6 +19,12 @@ case "${kickstart%%:*}" in
             when_diskdev_appears "$ksdev" \
                 fetch-kickstart-disk \$env{DEVNAME} "$kspath"
         fi
+        # "cdrom:" also means "wait forever for kickstart" because rhbz#1168902
+        if [ "$kstype" = "cdrom" ]; then
+            # if we reset main_loop to 0 every loop, we never hit the timeout.
+            # (see dracut's dracut-initqueue.sh for details on the mainloop)
+            echo "main_loop=0" > "$hookdir/initqueue/ks-cdrom-wait-forever.sh"
+        fi
         wait_for_kickstart
     ;;
     bd) # bd:<dev>:<path> - biospart (TODO... if anyone uses this anymore)


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


More information about the anaconda-patches mailing list