diff options
author | Matt Wilson <msw@redhat.com> | 2001-07-20 19:36:22 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-07-20 19:36:22 +0000 |
commit | 2f7c1e362e73d81419b628f41df127391f822e21 (patch) | |
tree | 7e8234c12569fd8b90326bac348b8eb36da1e405 | |
parent | a590e54474bbd5c3ceb7fbb4f7b8de1e85e0d7f0 (diff) | |
download | anaconda-2f7c1e362e73d81419b628f41df127391f822e21.tar.gz anaconda-2f7c1e362e73d81419b628f41df127391f822e21.tar.xz anaconda-2f7c1e362e73d81419b628f41df127391f822e21.zip |
retry NFS mounts in kickstart
-rw-r--r-- | loader/loader.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/loader/loader.c b/loader/loader.c index b24b4670e..7b5333158 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -1778,13 +1778,21 @@ static char * setupKickstart(char * location, struct knownDevices * kd, #ifdef INCLUDE_NETWORK if (ksType == KS_CMD_NFS) { + int count = 0; mlLoadModule("nfs", NULL, modLoaded, *modDepsPtr, NULL, modInfo, flags); fullPath = alloca(strlen(host) + strlen(dir) + 2); sprintf(fullPath, "%s:%s", host, dir); logMessage("mounting nfs path %s", fullPath); - if (doPwMount(fullPath, "/mnt/source", "nfs", 1, 0, NULL, NULL)) + while (count < 3 + && doPwMount(fullPath, "/mnt/source", "nfs", 1, 0, NULL, NULL)) { + logMessage("mount failed, retrying after 3 second sleep"); + sleep(3); + count++; + } + + if (count == 3) return NULL; if (mountLoopback("/mnt/source/RedHat/base/stage2.img", |