Fix a format issue within ifcfg

Change-Id: I957e1a572522f1210707ddf5054f591bfaa4d03b
This commit is contained in:
Jianghua Wang 2017-12-25 11:11:37 +00:00
parent 7b6aa0ad9b
commit fb917711f4
1 changed files with 5 additions and 5 deletions

View File

@ -72,11 +72,11 @@ def persist_eth_cfg(eth, bootproto='dhcp', defroute='no', onboot='yes'):
# Persist eth configure into ifcfg-eth file.
ifcfg_file = '/etc/sysconfig/network-scripts/ifcfg-%s' % eth
with open(ifcfg_file, 'w') as ifcfg:
ifcfg.write('DEVICE="%s\n"' % eth)
ifcfg.write('IPV6INIT="no"')
ifcfg.write('BOOTPROTO="%s\n"' % bootproto)
ifcfg.write('DEFROUTE="%s\n"' % defroute)
ifcfg.write('ONBOOT="%s\n"' % onboot)
ifcfg.write('DEVICE="%s"\n' % eth)
ifcfg.write('IPV6INIT="no"\n')
ifcfg.write('BOOTPROTO="%s"\n' % bootproto)
ifcfg.write('DEFROUTE="%s"\n' % defroute)
ifcfg.write('ONBOOT="%s"\n' % onboot)
def config_himn(himn_dom0_ip):