[PATCH] In dracut, do not display a warning for network lines with just a hostname.

Chris Lumens clumens at redhat.com
Tue May 12 13:49:20 UTC 2015


We define the hostname for the system with a line like "network --hostname=",
with no device provided.  The rest of anaconda and pykickstart are okay with
this, but parse-kickstart is not.

Resolves: rhbz#1201512
---
 dracut/parse-kickstart | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
index f366155..7d2371c 100755
--- a/dracut/parse-kickstart
+++ b/dracut/parse-kickstart
@@ -153,11 +153,12 @@ class Network(commands.network.F22_Network):
         '''
         netline = None
 
+        # Setting only hostname in kickstart
+        if not net.device and net.hostname and not self.handler.ksdevice:
+            return None
+
         # first 'network' line
         if len(self.network) == 1:
-            # Setting only hostname in kickstart
-            if not net.device and net.hostname and not self.handler.ksdevice:
-                return None
             net.activate = True
             if net.device == "link" or not net.device:
                 # NOTE: this might still be empty (e.g. 'ks=file:...')
-- 
2.2.2



More information about the anaconda-patches mailing list