diff options
author | Martin Sivak <msivak@redhat.com> | 2007-11-06 08:41:25 +0100 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2007-11-06 08:41:25 +0100 |
commit | 96190505a047ad859a1571a4c3e9410d6e8ac87a (patch) | |
tree | e9811657629ce51d41c967841236a2850562ebeb /loader2 | |
parent | 920153a5e26f633f9e04011972ddc124cf784818 (diff) | |
download | anaconda-96190505a047ad859a1571a4c3e9410d6e8ac87a.tar.gz anaconda-96190505a047ad859a1571a4c3e9410d6e8ac87a.tar.xz anaconda-96190505a047ad859a1571a4c3e9410d6e8ac87a.zip |
Add the nicdelay command line option (#349521)
Diffstat (limited to 'loader2')
-rw-r--r-- | loader2/loader.c | 3 | ||||
-rw-r--r-- | loader2/net.c | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/loader2/loader.c b/loader2/loader.c index 8f39c6543..cd6fb3ee4 100644 --- a/loader2/loader.c +++ b/loader2/loader.c @@ -114,6 +114,7 @@ uint64_t flags = LOADER_FLAGS_SELINUX; #endif int num_link_checks = 5; +int post_link_sleep = 0; static struct installMethod installMethods[] = { #if !defined(__s390__) && !defined(__s390x__) @@ -862,6 +863,8 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData, loaderData->wepkey = strdup(argv[i] + 7); else if (!strncasecmp(argv[i], "linksleep=", 10)) num_link_checks = atoi(argv[i] + 10); + else if (!strncasecmp(argv[i], "nicdelay=", 9)) + post_link_sleep = atoi(argv[i] + 9); else if (!strncasecmp(argv[i], "selinux=0", 9)) flags &= ~LOADER_FLAGS_SELINUX; else if (!strncasecmp(argv[i], "selinux", 7)) diff --git a/loader2/net.c b/loader2/net.c index d7138e870..693b641ba 100644 --- a/loader2/net.c +++ b/loader2/net.c @@ -160,12 +160,21 @@ static void v6MethodCallback(newtComponent co, void *dptr) { static int waitForLink(char * dev) { extern int num_link_checks; + extern int post_link_sleep; int tries = 0; /* try to wait for a valid link -- if the status is unknown or * up continue, else sleep for 1 second and try again for up * to five times */ logMessage(DEBUGLVL, "waiting for link %s...", dev); + + /* Networks with STP set up will give link when the port + * is isolated from the network, and won't forward packets + * until they decide we're not a switch. */ + logMessage(DEBUGLVL, "sleep (nicdelay) for %d secs first", post_link_sleep); + sleep(post_link_sleep); + logMessage(DEBUGLVL, "continuing..."); + while (tries < num_link_checks) { if (get_link_status(dev) != 0) break; |