summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2007-03-08 23:14:29 +0000
committerDavid Cantrell <dcantrell@redhat.com>2007-03-08 23:14:29 +0000
commit3cc724e575f6499e6ff827e164b7d2fdc2af3968 (patch)
tree3496e974e96ca750801531b2f4a13c7b27333f6b /loader2
parenta99f0d25cd8524a5ef65373e99f02d169bacb28d (diff)
downloadanaconda-3cc724e575f6499e6ff827e164b7d2fdc2af3968.tar.gz
anaconda-3cc724e575f6499e6ff827e164b7d2fdc2af3968.tar.xz
anaconda-3cc724e575f6499e6ff827e164b7d2fdc2af3968.zip
* loader2/loader.c (parseCmdLineFlags): If BOOTIF= is passed as a boot
argument, pull the MAC address from it and replace hyphens with colons so that the MAC address is usable in loader (#209284).
Diffstat (limited to 'loader2')
-rw-r--r--loader2/loader.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/loader2/loader.c b/loader2/loader.c
index 807ccf0fd..9874bca04 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -578,6 +578,7 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData,
int argc;
int numExtraArgs = 0;
int i;
+ char *front;
/* if we have any explicit cmdline (probably test mode), we don't want
* to parse /proc/cmdline */
@@ -693,6 +694,17 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData,
else if (!strncmp(argv[i], "BOOTIF=", 7)) {
/* +10 so that we skip over the leading 01- */
loaderData->bootIf = strdup(argv[i] + 10);
+
+ /* scan the BOOTIF value and replace '-' with ':' */
+ front = loaderData->bootIf;
+ if (front) {
+ while (*front != '\0') {
+ if (*front == '-')
+ *front = ':';
+ front++;
+ }
+ }
+
loaderData->bootIf_set = 1;
} else if (!strncasecmp(argv[i], "dhcpclass=", 10)) {
loaderData->netCls = strdup(argv[i] + 10);