[PATCH] Preserve ipv6.disable=1 on target system (#1040751)

Will Woods wwoods at redhat.com
Tue Feb 18 17:58:49 UTC 2014


In Olden Times anaconda had the "noipv6" boot argument, which disabled
ipv6 in the installer and on the target system. It did this by adding
"options ipv6 disable=1" to /etc/modprobe.d/ipv6.conf, so ipv6 would be
disabled before the network came up.

Now that ipv6 isn't modular, we can't do that. In an attempt to retain
backward-compatibility, "noipv6" now causes anaconda to disable ipv6 via
sysctl (i.e. in /etc/sysctl.d/anaconda.conf) - *iff* all network devices
have ipv6 disabled (by 'network --noipv6' kickstart commands or the
'ipv6.disable=1' boot argument).

This can be a bit confusing:
 * If you netboot with 'noipv6' but no kickstart, the system gets ipv6.
 * If you netboot with 'noipv6 ipv6.disable=1', the system does ipv6 for
   a moment, then disables it via sysctl.
 * Neither boot argument is preserved, so it's unclear to users
   how/whether the system has ipv6 disabled.

This patch adds 'ipv6.disable' to global_preserve_args. This way,
booting with "ipv6.disable=1" will:
  a) disable ipv6 in the installer, and
  b) disable ipv6 on the target system before the network comes up.
This is a lot closer to the original behavior, and a lot simpler for us
as well.
---
 docs/boot-options.txt    | 6 ++++--
 pyanaconda/bootloader.py | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/docs/boot-options.txt b/docs/boot-options.txt
index 10c85d4..c98c93c 100644
--- a/docs/boot-options.txt
+++ b/docs/boot-options.txt
@@ -400,8 +400,10 @@ All this option actually did was set `TERM=vt100`. The default `TERM` setting
 works fine these days, so this was no longer necessary.
 
 === noipv6  ===
-ipv6 is built into the kernel and can't be removed. You should be able to
-disable it with `ipv6.disable`, though.
+ipv6 is built into the kernel and can't be removed by anaconda.
+
+You can disable ipv6 with `ipv6.disable=1`. This setting will be carried onto
+the installed system.
 
 === upgradeany ===
 Anaconda doesn't handle upgrades anymore.
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index fb593c3..e2748e6 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -254,7 +254,7 @@ class BootLoader(object):
     global_preserve_args = ["speakup_synth", "apic", "noapic", "apm", "ide",
                             "noht", "acpi", "video", "pci", "nodmraid",
                             "nompath", "nomodeset", "noiswmd", "fips",
-                            "selinux", "biosdevname"]
+                            "selinux", "biosdevname", "ipv6.disable"]
     preserve_args = []
 
     _trusted_boot = False
-- 
1.8.5.3



More information about the anaconda-patches mailing list