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

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

 



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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux