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

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

 



> @@ -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@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