summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2006-04-28 14:34:23 +0000
committerPeter Jones <pjones@redhat.com>2006-04-28 14:34:23 +0000
commit43778f680678533bec895271db70775e5961b724 (patch)
tree2e7c37fc78bc5bdd989f43527f8c27bb6a0054aa /loader2
parent27e19b964ea231690a9e1be8e15040b302d79844 (diff)
downloadanaconda-43778f680678533bec895271db70775e5961b724.tar.gz
anaconda-43778f680678533bec895271db70775e5961b724.tar.xz
anaconda-43778f680678533bec895271db70775e5961b724.zip
- make nfs mount options user specifiable.
Diffstat (limited to 'loader2')
-rw-r--r--loader2/loader.c2
-rw-r--r--loader2/loader.h1
-rw-r--r--loader2/nfsinstall.c10
3 files changed, 11 insertions, 2 deletions
diff --git a/loader2/loader.c b/loader2/loader.c
index 610c29e24..e500d66c9 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -677,6 +677,8 @@ static int parseCmdLineFlags(int flags, struct loaderData_s * loaderData,
flags &= ~LOADER_FLAGS_SELINUX;
else if (!strncasecmp(argv[i], "selinux", 7))
flags |= LOADER_FLAGS_SELINUX;
+ else if (!strncasecmp(argv[i], "nfsmountopts=", 13))
+ loaderData->nfsmountopts = strdup(argv[i] + 13);
else if (numExtraArgs < (MAX_EXTRA_ARGS - 1)) {
/* go through and append args we just want to pass on to */
/* the anaconda script, but don't want to represent as a */
diff --git a/loader2/loader.h b/loader2/loader.h
index f58ccab40..29a018259 100644
--- a/loader2/loader.h
+++ b/loader2/loader.h
@@ -107,6 +107,7 @@ struct loaderData_s {
void * methodData;
char * logLevel;
char * updatessrc;
+ char * nfsmountopts;
moduleList modLoaded;
moduleDeps * modDepsPtr;
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c
index 03ea6ea82..08ac3ab17 100644
--- a/loader2/nfsinstall.c
+++ b/loader2/nfsinstall.c
@@ -120,6 +120,7 @@ char * mountNfsImage(struct installMethod * method,
int foundinvalid = 0;
char * buf;
struct in_addr ip;
+ char * nfsMountOpts = NULL;
if (loaderData->noDns && !(inet_aton(host, &ip))) {
newtWinMessage(_("Error"), _("OK"),
@@ -134,7 +135,12 @@ char * mountNfsImage(struct installMethod * method,
fullPath = alloca(strlen(host) + strlen(directory) + 2);
sprintf(fullPath, "%s:%s", host, directory);
- logMessage(INFO, "mounting nfs path %s", fullPath);
+ if (loaderData->nfsmountopts && *loaderData->nfsmountopts) {
+ nfsMountOpts = strdup(loaderData->nfsmountopts);
+ logMessage("mounting nfs path %s with options %s", fullPath, nfsMountOpts);
+ } else {
+ logMessage(INFO, "mounting nfs path %s", fullPath);
+ }
if (FL_TESTING(flags)) {
stage = NFS_STAGE_DONE;
@@ -145,7 +151,7 @@ char * mountNfsImage(struct installMethod * method,
stage = NFS_STAGE_NFS;
if (!doPwMount(fullPath, "/mnt/source", "nfs",
- IMOUNT_RDONLY, NULL)) {
+ IMOUNT_RDONLY, nfsMountOpts)) {
char mntPath[1024];
snprintf(mntPath, sizeof(mntPath), "/mnt/source/%s/base/stage2.img", getProductPath());