diff options
author | David Cantrell <dcantrell@redhat.com> | 2008-12-16 17:55:39 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2008-12-16 18:09:08 -1000 |
commit | 5a97cd9db04ba482521d4a673a7897e4a7bebac0 (patch) | |
tree | 99162a47595f8303cd1542de6940f4995849ee9b | |
parent | 49d0de52709c79129572c0ea83e4b97297a139fd (diff) | |
download | anaconda-5a97cd9db04ba482521d4a673a7897e4a7bebac0.tar.gz anaconda-5a97cd9db04ba482521d4a673a7897e4a7bebac0.tar.xz anaconda-5a97cd9db04ba482521d4a673a7897e4a7bebac0.zip |
Copy /etc/dhclient-DEV.conf file to target system (#476364)
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 for
_something_ that read it, but it doesn't look like anything reads it
from this location anymore (or ever).
[rawhide]
-rw-r--r-- | network.py | 11 | ||||
-rw-r--r-- | packages.py | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/network.py b/network.py index b5ecad426..adde7cbcd 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,15 @@ 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,) + try: + shutil.copy(dhclientconf, destdhclientconf) + except: + log.warning("unable to copy %s to target system" % (dhclientconf,)) + # /etc/sysconfig/network if not os.path.isfile(destnetwork): newnetwork = "%s.new" % (destnetwork,) diff --git a/packages.py b/packages.py index c141c9248..cfc6ba2ae 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: |