[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH f17-alpha] Add support for network --device=link in stage2 kickstart (#790332)



Without it we hit KickstartValueError in stage 2.

---
 pyanaconda/kickstart.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 27cf6d1..4a968f9 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -688,7 +688,15 @@ class NetworkData(commands.network.F16_NetworkData):
         else:
             if self.device.lower() == "ibft":
                 return
-            if self.device.lower() == "bootif":
+            if self.device.lower() == "link":
+                for dev in sorted(devices):
+                    if isys.getLinkStatus(dev):
+                        device = dev
+                        break
+                else:
+                    raise KickstartValueError, formatErrorMsg(self.lineno, msg="No device with link found")
+
+            elif self.device.lower() == "bootif":
                 if "BOOTIF" in flags.cmdline:
                     # MAC address like 01-aa-bb-cc-dd-ee-ff
                     device = flags.cmdline["BOOTIF"][3:]
-- 
1.7.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]