|
|
|
@ -831,29 +831,7 @@ def write_sysconfig_network(rootpath, ksdata, overwrite=False):
|
|
|
|
|
f = open(cfgfile, "w")
|
|
|
|
|
f.write("# Generated by anaconda\n")
|
|
|
|
|
f.write("NETWORKING=no\n")
|
|
|
|
|
|
|
|
|
|
gateway = ipv6_defaultgw = None
|
|
|
|
|
for iface in reversed(getDevices()):
|
|
|
|
|
if isys.isWirelessDevice(iface):
|
|
|
|
|
continue
|
|
|
|
|
dev = NetworkDevice(netscriptsDir, iface)
|
|
|
|
|
dev.loadIfcfgFile()
|
|
|
|
|
if dev.get('DEFROUTE') != "no":
|
|
|
|
|
continue
|
|
|
|
|
if dev.get('GATEWAY'):
|
|
|
|
|
gateway = dev.get('GATEWAY')
|
|
|
|
|
if dev.get('IPV6_DEFAULTGW'):
|
|
|
|
|
ipv6_defaultgw = dev.get('IPV6_DEFAULTGW')
|
|
|
|
|
if gateway and ipv6_defaultgw:
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
if gateway:
|
|
|
|
|
f.write("GATEWAY=%s\n" % gateway)
|
|
|
|
|
|
|
|
|
|
if ipv6_defaultgw:
|
|
|
|
|
f.write("IPV6_DEFAULTGW=%s\n" % ipv6_defaultgw)
|
|
|
|
|
f.close()
|
|
|
|
|
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def disableIPV6(rootpath):
|
|
|
|
@ -932,12 +910,6 @@ def write_network_config(storage, ksdata, instClass, rootpath):
|
|
|
|
|
copyIfcfgFiles(rootpath)
|
|
|
|
|
copyDhclientConfFiles(rootpath)
|
|
|
|
|
copyFileToPath("/etc/resolv.conf", rootpath, overwrite=flags.livecdInstall)
|
|
|
|
|
# TODO the default for ONBOOT needs to be lay down
|
|
|
|
|
# before newui we didn't set it for kickstart installs
|
|
|
|
|
instClass.setNetworkOnbootDefault(ksdata)
|
|
|
|
|
# NM_CONTROLLED is not mirrored in ksdata
|
|
|
|
|
disableNMForStorageDevices(rootpath, storage)
|
|
|
|
|
autostartFCoEDevices(rootpath, storage, ksdata)
|
|
|
|
|
|
|
|
|
|
def wait_for_dhcp():
|
|
|
|
|
"""If NM is in connecting state, wait for connection.
|
|
|
|
|