[PATCH 05/10] dracut: fix set_neednet

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


'rd.neednet' is no longer used by dracut. Instead it checks for the
presence of /tmp/net.ifaces. So, if we need network, make sure that file
exists.
---
 dracut/anaconda-lib.sh | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/dracut/anaconda-lib.sh b/dracut/anaconda-lib.sh
index cdae49f..715f49c 100755
--- a/dracut/anaconda-lib.sh
+++ b/dracut/anaconda-lib.sh
@@ -142,11 +142,10 @@ when_diskdev_appears() {
     } >> $rulesfile
 }
 
+# network doesn't come up unless /tmp/net.ifaces exists (or $netroot is set).
+# 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
+    [ -z "$netroot" ] && >> /tmp/net.ifaces
 }
 
 parse_kickstart() {
-- 
1.7.11.2



More information about the anaconda-patches mailing list