FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Server Development

 
 
LinkBack Thread Tools
 
Old 02-06-2012, 01:43 PM
Radek Vykydal
 
Default 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.

Resolves: rhbz#735791
---
network.py | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/network.py b/network.py
index 8bdd096..b03c755 100644
--- a/network.py
+++ b/network.py
@@ -47,6 +47,7 @@ log = logging.getLogger("anaconda")
sysconfigDir = "/etc/sysconfig"
netscriptsDir = "%s/network-scripts" % (sysconfigDir)
networkConfFile = "%s/network" % (sysconfigDir)
+ipv6ConfFile = "/etc/modprobe.d/ipv6.conf"
ifcfgLogFile = "/tmp/ifcfg.log"
CONNECTION_TIMEOUT = 45

@@ -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
 

Thread Tools




All times are GMT. The time now is 03:44 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org