[PATCH 2/2] handle "ks=cdrom[:<path>]" on systems with multiple CDs (#1049237)
Will Woods
wwoods at redhat.com
Fri Jan 10 16:40:07 UTC 2014
We can't just use /dev/cdrom - what if that's the wrong drive?
Instead, try every cdrom device that appears, until we find the one that
contains the requested file (or /ks.cfg if no path was given).
Also, factor out the bit that checks for "ks=bd:..." and clarify its
error message.
---
dracut/kickstart-genrules.sh | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/dracut/kickstart-genrules.sh b/dracut/kickstart-genrules.sh
index 452d6bc..3b83d6c 100755
--- a/dracut/kickstart-genrules.sh
+++ b/dracut/kickstart-genrules.sh
@@ -8,21 +8,20 @@ case "${kickstart%%:*}" in
# handled by fetch-kickstart-net in the online hook
wait_for_kickstart
;;
- cdrom|hd|bd) # cdrom, cdrom:<dev>:<path>, hd:<dev>:<path>, bd:<dev>:<path>
+ cdrom|hd) # cdrom, cdrom:<path>, hd:<dev>:<path>
splitsep ":" "$kickstart" kstype ksdev kspath
if [ "$kstype" = "cdrom" ] && [ -z "$kspath" ]; then
kspath="$ksdev"
- ksdev="/dev/cdrom"
- fi
- 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=""
+ when_any_cdrom_appears \
+ fetch-kickstart-disk \$env{DEVNAME} "$kspath"
else
+ ksdev=$(disk_to_dev_path $ksdev)
when_diskdev_appears "$ksdev" \
fetch-kickstart-disk \$env{DEVNAME} "$kspath"
- wait_for_kickstart
fi
+ wait_for_kickstart
+ ;;
+ bd) # bd:<dev>:<path> - biospart (TODO... if anyone uses this anymore)
+ warn "inst.ks: can't get kickstart - biospart (bd:) isn't supported yet"
;;
esac
--
1.8.4.2
More information about the anaconda-patches
mailing list