diff options
author | David Cantrell <dcantrell@redhat.com> | 2006-10-18 21:33:24 +0000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2006-10-18 21:33:24 +0000 |
commit | 0d9b4b5a0c609ad72395b3c1576d081c84f8b16c (patch) | |
tree | 21378cf32fb3edfde430ba5aea50eafcd6636102 | |
parent | 7193f7923b457cb659b7d40becb0c7f72600b8b4 (diff) | |
download | anaconda-0d9b4b5a0c609ad72395b3c1576d081c84f8b16c.tar.gz anaconda-0d9b4b5a0c609ad72395b3c1576d081c84f8b16c.tar.xz anaconda-0d9b4b5a0c609ad72395b3c1576d081c84f8b16c.zip |
* anaconda (parseOptions): Add the --noipv4 and --noipv6 opts (#208334).
* anaconda (__main__): Set flags.useIPv4 and flags.useIPv6 to false if
we receive one of the --noipv{4,6} options (#208334).
* flags.py (Flags): Add useIPv4 and useIPv6 flags, default to
True (#208334).
* network.py (Network): Initialize self.useIPv4 and self.useIPv6 to
flags.useIPv4 and flags.useIPv6 (#208334).
* loader2/loader.c (doLoaderMain): After readNetConfig() call, set the
noipv4 and noipv6 flags in loaderData (#208334).
* loader2/loader.c (main): If noipv4 or noipv6 flag is set in the
loaderData, add option to pass to anaconda (#208334).
* loader2/net.c (readNetConfig): Set noipv4 and noipv6 flags in newCfg
after configureTCPIP() call (#208334).
* loader2/net.c (readNetConfig): After dialog window closes, copy the
noipv4 and noipv6 flags from newCfg to cfg (#208334).
-rw-r--r-- | ChangeLog | 22 | ||||
-rwxr-xr-x | anaconda | 10 | ||||
-rw-r--r-- | flags.py | 2 | ||||
-rw-r--r-- | loader2/loader.c | 8 | ||||
-rw-r--r-- | loader2/net.c | 5 | ||||
-rw-r--r-- | network.py | 4 |
6 files changed, 49 insertions, 2 deletions
@@ -1,3 +1,25 @@ +2006-10-18 David Cantrell <dcantrell@redhat.com> + + * anaconda (parseOptions): Add the --noipv4 and --noipv6 opts (#208334). + * anaconda (__main__): Set flags.useIPv4 and flags.useIPv6 to false if + we receive one of the --noipv{4,6} options (#208334). + + * flags.py (Flags): Add useIPv4 and useIPv6 flags, default to + True (#208334). + + * network.py (Network): Initialize self.useIPv4 and self.useIPv6 to + flags.useIPv4 and flags.useIPv6 (#208334). + + * loader2/loader.c (doLoaderMain): After readNetConfig() call, set the + noipv4 and noipv6 flags in loaderData (#208334). + * loader2/loader.c (main): If noipv4 or noipv6 flag is set in the + loaderData, add option to pass to anaconda (#208334). + + * loader2/net.c (readNetConfig): Set noipv4 and noipv6 flags in newCfg + after configureTCPIP() call (#208334). + * loader2/net.c (readNetConfig): After dialog window closes, copy the + noipv4 and noipv6 flags from newCfg to cfg (#208334). + 2006-10-18 Chris Lumens <clumens@redhat.com> * kickstart.py (AnacondaKSHandlers.doPartition): Correct --onbiosdisk @@ -189,6 +189,10 @@ def parseOptions(): op.add_option("-G", "--graphical", dest="display_mode", action="store_const", const="g") op.add_option("-T", "--text", dest="display_mode", action="store_const", const="t") + # Network + op.add_option("--noipv4", action="store_true", default=False) + op.add_option("--noipv6", action="store_true", default=False) + # Method of operation op.add_option("--autostep", action="store_true", default=False) op.add_option("-d", "--debug", dest="debug", action="store_true", default=False) @@ -631,6 +635,12 @@ if __name__ == "__main__": # Default is to prompt to mount the installed system. anaconda.rescue_mount = not opts.rescue_nomount + if opts.noipv4: + flags.useIPv4 = False + + if opts.noipv6: + flags.useIPv6 = False + if opts.updateSrc: anaconda.updateSrc = opts.updateSrc @@ -64,6 +64,8 @@ class Flags: self.__dict__['flags']['debug'] = 0 self.__dict__['flags']['targetarch'] = None self.__dict__['flags']['cmdline'] = self.createCmdlineDict() + self.__dict__['flags']['useIPv4'] = True + self.__dict__['flags']['useIPv6'] = True # for non-physical consoles like some ppc and sgi altix, # we need to preserve the console device and not try to # do things like bogl on them. this preserves what that diff --git a/loader2/loader.c b/loader2/loader.c index 56f2e7860..8db660a7e 100644 --- a/loader2/loader.c +++ b/loader2/loader.c @@ -1071,6 +1071,8 @@ static char *doLoaderMain(char * location, setupNetworkDeviceConfig(&netDev, loaderData); rc = readNetConfig(devName, &netDev, loaderData->netCls, methodNum); + loaderData->noipv4 = netDev.noipv4; + loaderData->noipv6 = netDev.noipv6; if ((rc == LOADER_BACK) || (rc == LOADER_ERROR) || ((dir == -1) && (rc == LOADER_NOOP))) { step = STEP_IFACE; @@ -1663,6 +1665,12 @@ int main(int argc, char ** argv) { tmparg++; } + if (loaderData.noipv4) + *argptr++ = "--noipv4"; + + if (loaderData.noipv6) + *argptr++ = "--noipv6"; + if (FL_RESCUE(flags)) { *argptr++ = "--rescue"; if (FL_SERIAL(flags)) diff --git a/loader2/net.c b/loader2/net.c index ea1ed2984..6bdf664dc 100644 --- a/loader2/net.c +++ b/loader2/net.c @@ -572,6 +572,8 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg, while (i == 1) { ret = configureTCPIP(device, cfg, &newCfg, &ipv4Choice, &ipv6Choice, methodNum); + newCfg.noipv4 = (ipv4Choice == '*') ? 0 : 1; + newCfg.noipv6 = (ipv6Choice == '*') ? 0 : 1; if (ret == LOADER_NOOP) { /* dhcp selected, proceed */ @@ -592,6 +594,9 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg, } } + cfg->noipv4 = newCfg.noipv4; + cfg->noipv6 = newCfg.noipv6; + /* preserve extra dns servers for the sake of being nice */ if (cfg->dev.numDns > newCfg.dev.numDns) { for (i = newCfg.dev.numDns; i < cfg->dev.numDns; i++) { diff --git a/network.py b/network.py index 6d9ba8d53..f3735624b 100644 --- a/network.py +++ b/network.py @@ -172,8 +172,8 @@ class Network: self.domains = [] self.isConfigured = 0 self.hostname = "localhost.localdomain" - self.useIPv4 = True - self.useIPv6 = True + self.useIPv4 = flags.useIPv4 + self.useIPv6 = flags.useIPv6 # if we specify a hostname and are using dhcp, do an override # originally used by the gui but overloaded now |