FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-17-2008, 01:00 AM
Chris Lumens
 
Default 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
 

Thread Tools




All times are GMT. The time now is 04:46 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org