[PATCH f17-branch 1/3] Set ONBOOT=yes for at least one wired netdev by default (#806466)

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

 



loader used to set ONBOOT=yes for any device it activated, so having an
active netdev implied that at least one of them had ONBOOT=yes.

This logic doesn't necessarily work anymore, so let's just check to see
if any of them have ONBOOT=yes directly.
---
 pyanaconda/installclasses/fedora.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/installclasses/fedora.py b/pyanaconda/installclasses/fedora.py
index 409ec8f..d2c95a5 100644
--- a/pyanaconda/installclasses/fedora.py
+++ b/pyanaconda/installclasses/fedora.py
@@ -129,9 +129,12 @@ class InstallClass(BaseInstallClass):
         return newVer >= oldVer and newVer - oldVer <= 2
 
     def setNetworkOnbootDefault(self, network):
-        if hasActiveNetDev():
-            return
+        # if something's already enabled, we can just leave the config alone
+        for devName, dev in network.netdevices.items():
+            if dev.get('ONBOOT') == 'yes':
+                return
 
+        # the default otherwise: bring up the first wired netdev with link
         for devName, dev in network.netdevices.items():
             if (not isys.isWirelessDevice(devName) and
                 isys.getLinkStatus(devName)):
-- 
1.7.7.6

_______________________________________________
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