FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 03-27-2012, 10:35 PM
Will Woods
 
Default make ks=file:... parse kickstart earlier (#806931)

ks=file:... was parsing the kickstart *after* the 'cmdline' hook
finished, so the new arguments weren't being used.

Move the parsing into the 'cmdline' hook so the new arguments can get
used by the rest of dracut.
---
dracut/kickstart-genrules.sh | 11 -----------
dracut/parse-anaconda-kickstart.sh | 21 ++++++++++++++++++---
2 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/dracut/kickstart-genrules.sh b/dracut/kickstart-genrules.sh
index c3e04c7..87a08b7 100755
--- a/dracut/kickstart-genrules.sh
+++ b/dracut/kickstart-genrules.sh
@@ -2,17 +2,6 @@
# generate udev rules for fetching kickstarts.

case "${kickstart%%:*}" in
- file|path) # file:<path> (we accept path: but that's deprecated)
- splitsep ":" "$kickstart" kstype kspath
- if [ -f "$kspath" ]; then
- cp $kspath /tmp/ks.cfg
- parse_kickstart /tmp/ks.cfg
- unset CMDLINE
- else
- warn "inst.ks='$kickstart'"
- warn "can't find $kspath!"
- fi
- ;;
http|https|ftp|nfs)
# handled by fetch-kickstart-net in the online hook
wait_for_kickstart
diff --git a/dracut/parse-anaconda-kickstart.sh b/dracut/parse-anaconda-kickstart.sh
index f530f99..c426ced 100755
--- a/dracut/parse-anaconda-kickstart.sh
+++ b/dracut/parse-anaconda-kickstart.sh
@@ -2,7 +2,7 @@
# parse-anaconda-kickstart.sh: handle kickstart settings

# no need to do this twice
-[ -f /tmp/ks.cfg ] && return
+[ -f /tmp/ks.cfg.done ] && return

# inst.ks: provide a "URI" for the kickstart file
kickstart="$(getarg ks= inst.ks=)"
@@ -12,8 +12,23 @@ fi
# no root? the kickstart will probably tell us what our root device is.
[ "$kickstart" ] && [ -z "$root" ] && root="anaconda-kickstart"

-case "$kickstart" in
- http:*|https:*|ftp:*|nfs:*|nfs4:*) set_neednet ;;
+case "${kickstart%%:*}" in
+ http|https|ftp|nfs|nfs4) # network kickstart? set "neednet"!
+ set_neednet
+ ;;
+ file|path) # "file:<path>" - "path:<path>" is accepted but deprecated
+ splitsep ":" "$kickstart" kstype kspath
+ if [ -f "$kspath" ]; then
+ info "anaconda: parsing kickstart $kspath"
+ cp $kspath /tmp/ks.cfg
+ parse_kickstart /tmp/ks.cfg
+ [ "$root" = "anaconda-kickstart" ] && root=""
+ > /tmp/ks.cfg.done
+ else
+ warn "inst.ks='$kickstart'"
+ warn "can't find $kspath!"
+ fi
+ ;;
esac
export kickstart

--
1.7.7.6

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

Thread Tools




All times are GMT. The time now is 09:59 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org