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

[PATCH 2/2 master f14-branch] Preset default config for immediate Close in nm-c-e enablement (#636526)



It used to leave a config unusable for minimal install which doesn't
have NM. Configure enabled device to use ipv4 dhcp (BOOTPROTO=dhcp)
so it can be brought up with ifcfg eth0.
---
 pyanaconda/gui.py     |    2 ++
 pyanaconda/network.py |    5 +++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/gui.py b/pyanaconda/gui.py
index c42dcea..c4b3756 100755
--- a/pyanaconda/gui.py
+++ b/pyanaconda/gui.py
@@ -922,6 +922,8 @@ class InstallInterface(InstallInterfaceBase):
 
             # update ifcfg files for nm-c-e
             self.anaconda.network.setNMControlledDevices(nm_controlled_devices)
+            if not just_setup:
+                self.anaconda.network.presetDefaultConfiguration([install_device])
 
             # we might want to do this only once
             if self.anaconda.network.hasWirelessDev():
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index ae06f1e..9c77c9d 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -491,6 +491,11 @@ class Network:
             else:
                 device.set(('ONBOOT', 'yes'))
 
+    def presetDefaultConfiguration(self, devices=None):
+        for devname, device in self.netdevices.items():
+            if not devices or devname in devices:
+                device.set(('BOOTPROTO', 'dhcp'))
+
     def getOnbootControlledIfaces(self):
         ifaces = []
         for iface, device in self.netdevices.items():
-- 
1.7.2


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