[PATCH] Copy /etc/dhclient-DEV.conf file to target system (#476364)

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

 



The vendor-class setting gets written to this file during installation,
but we need to copy the file to the target system to make sure it's
present on reboot.  Previously, we wrote this to the ifcfg file,
but that variable isn't read anymore.
---
 network.py  |    8 ++++++--
 packages.py |    3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/network.py b/network.py
index b5ecad4..9fae956 100644
--- a/network.py
+++ b/network.py
@@ -576,8 +576,6 @@ class Network:
             if (bootproto == 'dhcp' and self.hostname and
                 self.overrideDHCPhostname):
                 f.write("DHCP_HOSTNAME=%s\n" %(self.hostname,))
-            if dev.get('DHCPCLASS'):
-                f.write("DHCP_CLASSID=%s\n" % dev.get('dhcpclass'))
 
             if dev.get('MTU') and dev.get('MTU') != 0:
                 f.write("MTU=%s\n" % dev.get('MTU'))
@@ -614,6 +612,12 @@ class Network:
                 destkey = "%s/keys-%s" % (netscripts, device,)
                 shutil.move(newkey, destkey)
 
+            # /etc/dhclient-DEVICE.conf
+            dhclientconf = '/etc/dhclient-' + device + '.conf'
+            if os.path.isfile(dhclientconf):
+                destdhclientconf = '%s%s' % (instPath, dhclientconf,)
+                shutil.copy(dhclientconf, destdhclientconf)
+
         # /etc/sysconfig/network
         if not os.path.isfile(destnetwork):
             newnetwork = "%s.new" % (destnetwork,)
diff --git a/packages.py b/packages.py
index c141c92..cfc6ba2 100644
--- a/packages.py
+++ b/packages.py
@@ -231,7 +231,8 @@ def setFileCons(anaconda):
                  "/etc/mdadm.conf", "/etc/hosts", "/etc/sysconfig/network",
                  "/etc/udev/rules.d/70-persistent-net.rules",
                  "/root/install.log", "/root/install.log.syslog",
-                 "/etc/shadow", "/etc/shadow-", "/etc/gshadow"]
+                 "/etc/shadow", "/etc/shadow-", "/etc/gshadow"] + \
+                glob.glob('/etc/dhclient-*.conf')
 
         vgs = []
         for entry in anaconda.id.partitions.requests:
-- 
1.6.0.3

_______________________________________________
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