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

Radek Vykydal rvykydal at redhat.com
Mon Jan 14 12:33:10 UTC 2013


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.




More information about the anaconda-patches mailing list