[PATCH 2/2] fix ks=cdrom (#828589)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We weren't handling the "empty $ksdev" case, which (as it turns out) is
legit for 'ks=cdrom'.

Note that the old option was "ks=cdrom[:<path>]". Rather than trying
to cleverly detect the difference between a device and path, we're
making it "cdrom:<dev>:<path>", which matches the "hd:.." argument.

Thus if you want to specify a path for the kickstart but not the CDROM
device, do: ks=cdrom::<path>

<path> defaults to '/ks.cfg', as always.
---
 dracut/kickstart-genrules.sh |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dracut/kickstart-genrules.sh b/dracut/kickstart-genrules.sh
index 7a69fa5..880c553 100755
--- a/dracut/kickstart-genrules.sh
+++ b/dracut/kickstart-genrules.sh
@@ -6,16 +6,17 @@ case "${kickstart%%:*}" in
         # handled by fetch-kickstart-net in the online hook
         wait_for_kickstart
     ;;
-    cdrom|hd|bd) # cdrom:<dev>, hd:<dev>:<path>, bd:<dev>:<path>
+    cdrom|hd|bd) # cdrom, cdrom:<dev>:<path>, hd:<dev>:<path>, bd:<dev>:<path>
         splitsep ":" "$kickstart" kstype ksdev kspath
+        [ "$kstype" = "cdrom" ] && [ -z "$ksdev" ] && ksdev="/dev/cdrom"
         ksdev=$(disk_to_dev_path $ksdev)
         if [ "$kstype" = "bd" ]; then # TODO FIXME: no biospart support yet
             warn "inst.ks='$kickstart'"
             warn "can't get kickstart: biospart isn't supported yet"
             ksdev=""
         else
-            when_diskdev_appears $ksdev \
-                fetch-kickstart-disk \$env{DEVNAME} $kspath
+            when_diskdev_appears "$ksdev" \
+                fetch-kickstart-disk \$env{DEVNAME} "$kspath"
             wait_for_kickstart
         fi
     ;;
-- 
1.7.10.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux