dracut/0007-network-reintroduce-rd.neednet.patch

42 lines
1.5 KiB
Diff
Raw Normal View History

From 48dba7f9ace186871528eb4d83cd96e92e853c6c Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 21 Aug 2012 14:47:14 +0200
Subject: [PATCH] network: reintroduce rd.neednet
rd.neednet is used by anaconda and the network interfaces cannot
be known in advance.
---
dracut.cmdline.7.asc | 3 +++
modules.d/40network/net-genrules.sh | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
index 71d02ca..c376d79 100644
--- a/dracut.cmdline.7.asc
+++ b/dracut.cmdline.7.asc
@@ -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),
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
index 8aeee2d..6a58ab5 100755
--- a/modules.d/40network/net-genrules.sh
+++ b/modules.d/40network/net-genrules.sh
@@ -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
{