summaryrefslogtreecommitdiffstats
path: root/pyanaconda/network.py
diff options
context:
space:
mode:
authorRadek Vykydal <rvykydal@redhat.com>2012-07-24 14:46:58 +0200
committerRadek Vykydal <rvykydal@redhat.com>2012-08-27 15:50:37 +0200
commit0ff54af2959121d7e2087e8ba2f143ecb94cced7 (patch)
treed22c3e8e193201e82441ae94f9547aa985458688 /pyanaconda/network.py
parentc8fd4176ead259f7bb3c50998944b1553d2bf8b8 (diff)
downloadanaconda-0ff54af2959121d7e2087e8ba2f143ecb94cced7.tar.gz
anaconda-0ff54af2959121d7e2087e8ba2f143ecb94cced7.tar.xz
anaconda-0ff54af2959121d7e2087e8ba2f143ecb94cced7.zip
networking: disable ipv6 directly in installed system config file
Instead of creating the file in installer and copying it to system.
Diffstat (limited to 'pyanaconda/network.py')
-rw-r--r--pyanaconda/network.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 5a24caa2f..fa2c99851 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -750,9 +750,6 @@ def copyConfigToPath(destPath):
_copyFileToPath("/etc/udev/rules.d/70-persistent-net.rules",
destPath, overwrite=flags.livecdInstall)
- _copyFileToPath(ipv6ConfFile, destPath,
- overwrite=flags.livecdInstall)
-
def get_ksdevice_name(ksspec=""):
if not ksspec:
@@ -831,16 +828,16 @@ def write_sysconfig_network():
if not flags.imageInstall:
shutil.move(newnetwork, networkConfFile)
-# TODO: do it right in sysroot (instead of copying the files later)?
-def disableIPV6():
+def disableIPV6(rootpath):
+ cfgfile = os.path.normpath(rootpath + ipv6ConfFile)
if ('noipv6' in flags.cmdline
and not any(get_ifcfg_value(dev, 'IPV6INIT') == "yes"
for dev in getDevices())):
- if os.path.exists(ipv6ConfFile):
- log.warning('Not disabling ipv6, %s exists' % ipv6ConfFile)
+ if os.path.exists(cfgfile):
+ log.warning('Not disabling ipv6, %s exists' % cfgfile)
else:
log.info('Disabling ipv6 on target system')
- f = open(ipv6ConfFile, "w")
+ f = open(cfgfile, "w")
f.write("# Anaconda disabling ipv6\n")
f.write("options ipv6 disable=1\n")
f.close()
@@ -901,7 +898,7 @@ def usedByRootOnISCSI(iface, storage):
def writeNetworkConf(storage, ksdata, instClass):
write_sysconfig_network()
- disableIPV6()
+ disableIPV6(ROOT_PATH)
copyConfigToPath(ROOT_PATH)
# TODO the default for ONBOOT needs to be lay down
# before newui we didn't set it for kickstart installs