summaryrefslogtreecommitdiffstats
path: root/network.py
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2007-04-24 17:24:27 +0000
committerDavid Cantrell <dcantrell@redhat.com>2007-04-24 17:24:27 +0000
commitd8060962c8aa5ceb9d2c6d7159e673ce47201990 (patch)
tree038d107534861e4db89c1807a73f5462a5f47737 /network.py
parent36127ed90ea48a010fe4136d9071f791285b5640 (diff)
downloadanaconda-d8060962c8aa5ceb9d2c6d7159e673ce47201990.tar.gz
anaconda-d8060962c8aa5ceb9d2c6d7159e673ce47201990.tar.xz
anaconda-d8060962c8aa5ceb9d2c6d7159e673ce47201990.zip
* network.py (Network.write): Only write out one disable-ipv6 file to
the /etc/modprobe.d directory as the setting is global (#237642).
Diffstat (limited to 'network.py')
-rw-r--r--network.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/network.py b/network.py
index 5fb0c57c9..523a311bb 100644
--- a/network.py
+++ b/network.py
@@ -480,19 +480,14 @@ class Network:
f.close()
# /etc/modprobe.d/disable-ipv6
- if not useIPv6:
- mpdir = "%s/etc/modprobe.d" % (instPath,)
+ mpdir = "%s/etc/modprobe.d" % (instPath,)
+ blacklist = "%s/disable-ipv6" % (mpdir,)
+ if not useIPv6 and not os.path.isfile(blacklist):
if not os.path.isdir(mpdir):
os.makedirs(mpdir, 0755)
- fn = "%s/disable-ipv6" % (mpdir,)
- idx = 0
- while os.path.isfile(fn):
- fn = "%s/disable-ipv6-%d" % (mpdir, idx,)
- idx += 1
-
- f = open(fn, "w")
- os.chmod(fn, 0644)
+ f = open(blacklist, "w")
+ os.chmod(blacklist, 0644)
f.write("install ipv6 /bin/true\n")
f.close()