network: reintroduce rd.neednet
authorHarald Hoyer <harald@redhat.com>
Tue, 21 Aug 2012 12:47:14 +0000 (14:47 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 21 Aug 2012 16:46:20 +0000 (18:46 +0200)
rd.neednet is used by anaconda and the network interfaces cannot
be known in advance.

dracut.cmdline.7.asc
modules.d/40network/net-genrules.sh

index 71d02ca..c376d79 100644 (file)
@@ -384,6 +384,9 @@ interface name. Better name it "bootnet" or "bluesocket".
 **biosdevname=0**::
     boolean, turn off biosdevname network interface renaming
 
+**rd.neednet=1**::
+    boolean, bring up network even without netroot set
+
 **vlan=_<vlanname>_:_<phydevice>_**::
     Setup vlan device named <vlanname> on <phydeivce>.
     We support the four styles of vlan names: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
index 8aeee2d..6a58ab5 100755 (executable)
@@ -15,7 +15,9 @@ fix_bootif() {
 }
 
 # Don't continue if we don't need network
-[ -z "$netroot" ] && ! [ -e "/tmp/net.ifaces" ] && return;
+if [ -z "$netroot" ] && [ ! -e "/tmp/net.ifaces" ] && ! getargbool 0 rd.neednet >/dev/null; then
+    return
+fi
 
 # Write udev rules
 {