diff options
author | David Cantrell <dcantrell@redhat.com> | 2009-08-07 14:11:52 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2009-08-10 16:56:56 -1000 |
commit | 1980e9d377aa6089ae96740cd85593ec18d5344d (patch) | |
tree | dbbbf5e71a2795eeff2fc9c52a018563c28243ae | |
parent | 08bc767a0cdce596516a97048fe2582e48e20b2f (diff) | |
download | anaconda-1980e9d377aa6089ae96740cd85593ec18d5344d.tar.gz anaconda-1980e9d377aa6089ae96740cd85593ec18d5344d.tar.xz anaconda-1980e9d377aa6089ae96740cd85593ec18d5344d.zip |
Honor network config boot params for CD-booted ks installs (#433214)
Users booting from CD or DVD media, performing a kickstart install, and
passing network configuration boot parameters were hitting an issue
where loader was insisting on trying to get a DHCP lease to fetch the
kickstart file. Even if you provided 'asknetwork' or 'ip=' settings,
loader was still forcing DHCP at the point where the kickstart file is
downloaded.
This patch makes the 'asknetwork' parameter work if you are booting from
CD or DVD and performing a kickstart install. By default, we would try
DHCP, but asknetwork forces the configureTCPIP() code path to run.
Likewise, if the user boots from media and passes ip=, netmask=,
gateway=, dns=, and ksdevice=, the network is configured using that
information and the kickstart file is downloaded.
-rw-r--r-- | loader/loader.c | 9 | ||||
-rw-r--r-- | loader/net.c | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/loader/loader.c b/loader/loader.c index 93fc4aeeb..d5d663b6e 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -1454,10 +1454,11 @@ static char *doLoaderMain(struct loaderData_s *loaderData, } case STEP_NETWORK: { - if ((installMethods[validMethods[loaderData->method]].type != - DEVICE_NETWORK) && (!hasGraphicalOverride()) && - !FL_ASKNETWORK(flags) && - !FL_EARLY_NETWORKING(flags)) { + if (((installMethods[validMethods[loaderData->method]].type != + DEVICE_NETWORK) && (!hasGraphicalOverride()) && + !FL_ASKNETWORK(flags) && + !FL_EARLY_NETWORKING(flags)) || + (is_nm_connected())) { needsNetwork = 0; if (dir == 1) step = STEP_STAGE2; diff --git a/loader/net.c b/loader/net.c index 486c1607c..3df2acfc4 100644 --- a/loader/net.c +++ b/loader/net.c @@ -445,7 +445,9 @@ int readNetConfig(char * device, iface_t * iface, /* JKFIXME: we really need a way to override this and be able to change * our network config */ - if (!FL_TESTING(flags) && ((iface->ipv4method > 0) || (iface->ipv6method > 0))) { + if (!FL_TESTING(flags) && !FL_ASKNETWORK(flags) && + ((iface->ipv4method > IPV4_UNUSED_METHOD) || + (iface->ipv6method > IPV4_UNUSED_METHOD))) { logMessage(INFO, "doing kickstart... setting it up"); err = writeEnabledNetInfo(iface); @@ -1987,6 +1989,7 @@ int kickstartNetworkUp(struct loaderData_s * loaderData, iface_t * iface) { loaderData->ipinfo_set = 0; free(loaderData->ipv4); loaderData->ipv4 = NULL; + break; } else { break; } |