From: Aaron Klingaman Date: Tue, 20 Dec 2005 05:56:06 +0000 (+0000) Subject: patch from E Jaffe to fix eth0 config files with mac address (if specified) X-Git-Tag: planetlab-3_3-branch-point~19 X-Git-Url: http://git.onelab.eu/?p=bootmanager.git;a=commitdiff_plain;h=af3808cf90bfca176410645f3dc33ede1d639b0f patch from E Jaffe to fix eth0 config files with mac address (if specified) --- diff --git a/source/steps/InstallWriteConfig.py b/source/steps/InstallWriteConfig.py index 45c7156..b9fd28f 100644 --- a/source/steps/InstallWriteConfig.py +++ b/source/steps/InstallWriteConfig.py @@ -359,6 +359,7 @@ def write_network_configuration( vars, log ): network= network_settings['network'] netmask= network_settings['netmask'] dns1= network_settings['dns1'] + mac= network_settings['mac'] except KeyError, e: raise BootManagerException, "Missing value %s in network settings." % str(e) @@ -390,6 +391,8 @@ def write_network_configuration( vars, log ): else: eth0_file.write( "BOOTPROTO=dhcp\n" ) eth0_file.write( "DHCP_HOSTNAME=%s\n" % hostname ) + if mac != "": + eth0_file.write( "HWADDR=%s\n" % mac ) eth0_file.write( "ONBOOT=yes\n" ) eth0_file.write( "USERCTL=no\n" ) eth0_file.close()