Copy /etc/dhclient-DEV.conf file to target system (#476364)
> @@ -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,)
I know how much we hate catching exceptions, but perhaps you want to
try...except around shutil.copy?
Otherwise, looks fine.
- Chris
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
|