diff options
author | David Cantrell <dcantrell@redhat.com> | 2008-11-07 11:44:08 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2008-11-08 09:14:17 -1000 |
commit | 620bdb978bfe46f96f04865e776edd15728b85d8 (patch) | |
tree | 686eb6f3c003a940739ed57d201896f8af89b394 /loader | |
parent | 823437ee38d36cce226f29bd5b4c9d56afe8f60d (diff) | |
download | anaconda-620bdb978bfe46f96f04865e776edd15728b85d8.tar.gz anaconda-620bdb978bfe46f96f04865e776edd15728b85d8.tar.xz anaconda-620bdb978bfe46f96f04865e776edd15728b85d8.zip |
Bring up networking early enough for syslog= param (#470513)
If a user boots from boot.iso and specifies syslog=HOST, we need
to send them through the network configuration steps in loader so
that networking is available by the time anaconda starts.
Diffstat (limited to 'loader')
-rw-r--r-- | loader/loader.c | 11 | ||||
-rw-r--r-- | loader/loader.h | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/loader/loader.c b/loader/loader.c index af83effde..575aa7fee 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -1121,6 +1121,11 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData, flags |= LOADER_FLAGS_GRAPHICAL; } + if (!strncasecmp(argv[i], "syslog", 6)) { + logMessage(INFO, "early networking required for syslog"); + flags |= LOADER_FLAGS_EARLY_NETWORKING; + } + if (!strncasecmp(argv[i], "vesa", 4)) { if (asprintf(&extraArgs[numExtraArgs], "--xdriver=vesa") == -1) { @@ -1377,7 +1382,8 @@ static char *doLoaderMain(struct loaderData_s *loaderData, } case STEP_DRIVER: { - if (class == -1 || haveDeviceOfType(class)) { + if ((FL_EARLY_NETWORKING(flags) && haveDeviceOfType(DEVICE_NETWORK)) || + (class == -1 || haveDeviceOfType(class))) { step = STEP_NETWORK; dir = 1; class = -1; @@ -1437,7 +1443,8 @@ static char *doLoaderMain(struct loaderData_s *loaderData, case STEP_NETWORK: { if ((installMethods[validMethods[loaderData->method]].type != DEVICE_NETWORK) && (!hasGraphicalOverride()) && - !FL_ASKNETWORK(flags)) { + !FL_ASKNETWORK(flags) && + !FL_EARLY_NETWORKING(flags)) { needsNetwork = 0; if (dir == 1) step = STEP_STAGE2; diff --git a/loader/loader.h b/loader/loader.h index 96190710f..a6e2d057c 100644 --- a/loader/loader.h +++ b/loader/loader.h @@ -36,7 +36,7 @@ #define LOADER_FLAGS_POWEROFF (((uint64_t) 1) << 6) #define LOADER_FLAGS_NOPROBE (((uint64_t) 1) << 7) #define LOADER_FLAGS_MODDISK (((uint64_t) 1) << 8) -/* #9 is the most delicious of all flags, also available for use */ +#define LOADER_FLAGS_EARLY_NETWORKING (((uint64_t) 1) << 9) #define LOADER_FLAGS_SERIAL (((uint64_t) 1) << 10) #define LOADER_FLAGS_UPDATES (((uint64_t) 1) << 11) #define LOADER_FLAGS_KSFILE (((uint64_t) 1) << 12) @@ -77,6 +77,7 @@ #define FL_POWEROFF(a) ((a) & LOADER_FLAGS_POWEROFF) #define FL_NOPROBE(a) ((a) & LOADER_FLAGS_NOPROBE) #define FL_MODDISK(a) ((a) & LOADER_FLAGS_MODDISK) +#define FL_EARLY_NETWORKING(a) ((a) & LOADER_FLAGS_EARLY_NETWORKING) #define FL_SERIAL(a) ((a) & LOADER_FLAGS_SERIAL) #define FL_UPDATES(a) ((a) & LOADER_FLAGS_UPDATES) #define FL_KSFILE(a) ((a) & LOADER_FLAGS_KSFILE) |