Disable ipv6 on target system when using noipv6 option (#735791)
The option can be set in boot command line, in kickstart file using network
command, and in loader UI. The option takes effect only if there is no device
with configured ipv6.
@@ -589,6 +590,9 @@ class Network:
self._copyFileToPath("/etc/udev/rules.d/70-persistent-net.rules",
instPath, overwrite=flags.livecdInstall)
+ self._copyFileToPath(ipv6ConfFile, instPath,
+ overwrite=flags.livecdInstall)
+
def disableNMForStorageDevices(self, anaconda, instPath='):
for devName, device in self.netdevices.items():
if (device.usedByFCoE(anaconda) or
@@ -664,6 +668,19 @@ class Network:
# /etc/resolv.conf is managed by NM
+ # disable ipv6
+ if ('noipv6' in flags.cmdline
+ and not [dev for dev in devices
+ if dev.get('IPV6INIT') == "yes"]):
+ if os.path.exists(ipv6ConfFile):
+ log.warning('Not disabling ipv6, %s exists' % ipv6ConfFile)
+ else:
+ log.info('Disabling ipv6 on target system')
+ f = open(ipv6ConfFile, "w")
+ f.write("# Anaconda disabling ipv6
")
+ f.write("options ipv6 disable=1
")
+ f.close()
+
def waitForDevicesActivation(self, devices):
waited_devs_props = {}
--
1.7.4
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list