summaryrefslogtreecommitdiffstats
path: root/dracut
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2012-08-17 17:19:54 -0400
committerWill Woods <wwoods@redhat.com>2012-08-20 13:26:16 -0400
commit861d6e3fc9d9cd3f719f7e2dbbff31244dc80142 (patch)
tree3b5991dd7cdda8e0d226310209bce9b86018c7ee /dracut
parent74590166a5c841f03f1d39ba43ee56b33467c8c8 (diff)
downloadanaconda-861d6e3fc9d9cd3f719f7e2dbbff31244dc80142.tar.gz
anaconda-861d6e3fc9d9cd3f719f7e2dbbff31244dc80142.tar.xz
anaconda-861d6e3fc9d9cd3f719f7e2dbbff31244dc80142.zip
dracut: fix set_neednet so network comes up (#849672)
'rd.neednet' is no longer used by dracut. Instead it checks for the presence of /tmp/net.ifaces or $netroot. So, if we need network (and $netroot isn't set), make sure /tmp/net.ifaces exists.
Diffstat (limited to 'dracut')
-rwxr-xr-xdracut/anaconda-lib.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/dracut/anaconda-lib.sh b/dracut/anaconda-lib.sh
index cdae49f01..6b9a70734 100755
--- a/dracut/anaconda-lib.sh
+++ b/dracut/anaconda-lib.sh
@@ -142,11 +142,15 @@ when_diskdev_appears() {
} >> $rulesfile
}
+# dracut doesn't bring up the network unless:
+# a) $netroot is set (i.e. you have a network root device), or
+# b) /tmp/net.ifaces exists.
+# So for non-root things that need the network (like kickstart) we need to
+# make sure /tmp/net.ifaces exists.
+# For details see 40network/net-genrules.sh (and the rest of 40network).
set_neednet() {
- if ! getargbool 0 rd.neednet; then
- echo "rd.neednet=1" > /etc/cmdline.d/80-anaconda-neednet.conf
- fi
- unset CMDLINE
+ # if there's no netroot, make sure /tmp/net.ifaces exists
+ [ -z "$netroot" ] && >> /tmp/net.ifaces
}
parse_kickstart() {