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

 
 
LinkBack Thread Tools
 
Old 05-05-2010, 11:24 AM
Radek Vykydal
 
Default Use separate method for copying network configuration to system (#520146).

Steffen Maier wrote:

Radek, I got one question below.

On 05/05/2010 09:15 AM, Radek Vykydal wrote:


# /etc/udev/rules.d/70-persistent-net.rules
rules = "/etc/udev/rules.d/70-persistent-net.rules"
- destRules = instPath + rules
- if (not instPath) or (not os.path.isfile(destRules)) or
- flags.livecdInstall:
- if not os.path.isdir("%s/etc/udev/rules.d" %(instPath,)):
- iutil.mkdirChain("%s/etc/udev/rules.d" %(instPath,))
-
- if os.path.isfile(rules) and rules != destRules:
- shutil.copy(rules, destRules)



Sorry, I couldn't follow the whole thread on your patch set, so please
bear with me if my question has been answered already.
Is this part that copies an existing rules file if it already exists
moved to somewhere else or dropped completely?
We need this for network on s390x and other platforms. David introduced
it in 0ba6cb516da384e30efdd0dbd70a6c12336fd4f5 for bug 526322 (and
updated it in d1efd7c6ef7e68639a778bedf8250c86db86df2f for bug 527707).



It is copied in copyConfigToPath() to which I moved copying
from write() method in the patch, see below (*)

+ def copyConfigToPath(self, instPath='):

- if len(devices) == 0:
+ if len(self.netdevices) == 0:
return

- sysconfig = instPath + sysconfigDir
- netscripts = instPath + netscriptsDir
- destnetwork = instPath + networkConfFile
+ # /etc/sysconfig/network-scripts/ifcfg-DEVICE
+ # /etc/sysconfig/network-scripts/keys-DEVICE
+ # /etc/dhclient-DEVICE.conf
+ # TODORV: do we really don't want overwrite on live cd?
+ for devName, device in self.netdevices.items():
+ self._copyFileToPath(device.path, instPath)
+ self._copyFileToPath(device.keyfilePath, instPath)
+ dhclientfile = os.path.join("/etc/dhclient-%s.conf" % devName)
+ self._copyFileToPath(dhclientfile, instPath)
+
+ # /etc/sysconfig/network
+ self._copyFileToPath(networkConfFile, instPath,
+ overwrite=flags.livecdInstall)

- if not os.path.isdir(netscripts):
- iutil.mkdirChain(netscripts)
+ # /etc/resolv.conf
+ self._copyFileToPath("/etc/resolv.conf", instPath,
+ overwrite=flags.livecdInstall)
+
+ # /etc/udev/rules.d/70-persistent-net.rules
+ self._copyFileToPath("/etc/udev/rules.d/70-persistent-net.rules",
+ instPath, overwrite=flags.livecdInstall)

(*) here

Radek

_______________________________________________
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 02:52 PM.

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