[PATCH 08/10] dracut: set "$netif" correctly in initqueue/online scripts

Will Woods wwoods at redhat.com
Fri Aug 17 22:30:45 UTC 2012


Dracut now passes $netif as the first argument to the script rather than
setting it in the scripts environment. So we need to do netif=$1.
---
 dracut/anaconda-netroot.sh    | 3 +++
 dracut/fetch-kickstart-net.sh | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/dracut/anaconda-netroot.sh b/dracut/anaconda-netroot.sh
index 043a51f..3ab873a 100755
--- a/dracut/anaconda-netroot.sh
+++ b/dracut/anaconda-netroot.sh
@@ -4,6 +4,9 @@
 
 command -v getarg >/dev/null || . /lib/dracut-lib.sh
 
+# initqueue/online hook passes interface name as $1
+netif="$1"
+
 # get repo info
 # splitsep ":" "$root" prefix repo # FIXME: doesn't work as documented!
 prefix=${root%%:*}; repo=${root#*:}
diff --git a/dracut/fetch-kickstart-net.sh b/dracut/fetch-kickstart-net.sh
index d871eae..274071d 100755
--- a/dracut/fetch-kickstart-net.sh
+++ b/dracut/fetch-kickstart-net.sh
@@ -2,6 +2,9 @@
 # fetch-kickstart-net - fetch kickstart file from the network.
 # runs from the "initqueue/online" hook whenever a net interface comes online
 
+# initqueue/online hook passes interface name as $1
+netif="$1"
+
 # we already processed the kickstart - exit
 [ -e /tmp/ks.cfg.done ] && return 0
 
-- 
1.7.11.2



More information about the anaconda-patches mailing list