[PATCH master] Take over dhcp connection by NM for network root (eg nfs) (#883451, #893656)

Brian C. Lane bcl at redhat.com
Mon Jan 14 20:25:12 UTC 2013


On Mon, Jan 14, 2013 at 01:33:10PM +0100, Radek Vykydal wrote:
> On 01/12/2013 01:57 AM, Brian C. Lane wrote:
> >On Fri, Jan 11, 2013 at 04:41:34PM +0100, Radek Vykydal wrote:
> >>We need to pass dhcp lease file to NM's dhclient also in case of
> >>kickstart installs. For non-kickstart case, this is done in dracut,
> >>modules.d/45ifcfg/write-ifcfg.sh.
> >>See dracut's commit 66666c670a462548df4ea4c8069d54b8c309ecf4
> >>---
> >>  dracut/parse-kickstart | 13 ++++++++++++-
> >>  1 file changed, 12 insertions(+), 1 deletion(-)
> >>
> >>diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
> >>index 333849b..24d0488 100755
> >>--- a/dracut/parse-kickstart
> >>+++ b/dracut/parse-kickstart
> >>@@ -267,7 +267,8 @@ def ksnet_to_ifcfg(net, filename=None):
> >>              os.makedirs("/tmp/ifcfg")
> >>      ifcfg['DEVICE'] = dev
> >>      ifcfg['HWADDR'] = readsysfile("/sys/class/net/%s/address" % dev)
> >>-    ifcfg['UUID'] = readsysfile("/proc/sys/kernel/random/uuid")
> >>+    uuid = readsysfile("/proc/sys/kernel/random/uuid")
> >>+    ifcfg['UUID'] = uuid
> >I know this was pre-existing code, but why read a system-dependent file
> >instead of using str(uuid.uuid4())?
> 
> It is a question for Will, I suppose it is because dracut itself is
> using the same. Also I got used to not improve code when not
> necessary in areas I'm not so familiar with.
> Is there a reason to use python module instead? I saw parse-kickstart
> as rather linked to dracut.

I don't think there's a strong reason either way. I feel like we should
do a bit more improvement between releases though, and I tend to favor
native modules instead of system paths which may change at time point
in the distant future :)

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20130114/f1bae63f/attachment.sig>


More information about the anaconda-patches mailing list