aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2003-10-23 20:57:22 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2003-10-23 20:57:22 +0000
commita76434685e633018c6479b39610aead35dad748a (patch)
tree466611b663413a78f26b28ff3dbb1ab8c039f21d
parentbe3a5962cca0ce95e2a66af3a2d9fa7a2e5b4dad (diff)
downloadsrc-a76434685e633018c6479b39610aead35dad748a.tar.gz
src-a76434685e633018c6479b39610aead35dad748a.zip
MFC: fix, improve & extend NFS support.
Submitted by: hmp Approved by: re (murray)
Notes
Notes: svn path=/releng/4.9/; revision=121442
-rw-r--r--release/sysinstall/install.c2
-rw-r--r--release/sysinstall/nfs.c10
-rw-r--r--release/sysinstall/options.c4
-rw-r--r--release/sysinstall/sysinstall.h2
4 files changed, 15 insertions, 3 deletions
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index 1b1f5436a704..ca6ef4b686eb 100644
--- a/release/sysinstall/install.c
+++ b/release/sysinstall/install.c
@@ -1139,6 +1139,8 @@ installVarDefaults(dialogMenuItem *self)
variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/links", 0);
variable_set2(VAR_FTP_STATE, "passive", 0);
variable_set2(VAR_NFS_SECURE, "NO", -1);
+ variable_set2(VAR_NFS_TCP, "NO", -1);
+ variable_set2(VAR_NFS_V3, "YES", -1);
if (OnVTY)
variable_set2(VAR_FIXIT_TTY, "standard", 0);
else
diff --git a/release/sysinstall/nfs.c b/release/sysinstall/nfs.c
index 2838e1427dd4..34e405c717dc 100644
--- a/release/sysinstall/nfs.c
+++ b/release/sysinstall/nfs.c
@@ -60,9 +60,13 @@ mediaInitNFS(Device *dev)
return FALSE;
msgNotify("Mounting %s over NFS on %s", dev->name, mountpoint);
- if (vsystem("mount_nfs %s %s %s %s",
- variable_get(VAR_SLOW_ETHER) ? "-r 1024 -w 1024" : "",
- variable_get(VAR_NFS_SECURE) ? "-P" : "", dev->name, mountpoint)) {
+ if (vsystem("mount_nfs %s %s %s %s %s %s",
+ !variable_cmp(VAR_NFS_TCP, "YES") ? "-T" : "",
+ !variable_cmp(VAR_NFS_V3, "YES") ? "-3" : "",
+ !variable_cmp(VAR_SLOW_ETHER, "YES") ?
+ "-r 1024 -w 1024" : "-r 4096 -w 4096",
+ !variable_cmp(VAR_NFS_SECURE, "YES") ? "-P" : "",
+ dev->name, mountpoint)) {
msgConfirm("Error mounting %s on %s: %s.", dev->name, mountpoint, strerror(errno));
if (netDevice)
DEVICE_SHUTDOWN(netDevice);
diff --git a/release/sysinstall/options.c b/release/sysinstall/options.c
index c9e4215923af..128c84a09218 100644
--- a/release/sysinstall/options.c
+++ b/release/sysinstall/options.c
@@ -112,6 +112,10 @@ static Option Options[] = {
OPT_IS_VAR, NULL, VAR_NFS_SECURE, varCheck },
{ "NFS Slow", "User is using a slow PC or ethernet card",
OPT_IS_VAR, NULL, VAR_SLOW_ETHER, varCheck },
+{ "NFS TCP", "Use TCP protocol for NFS",
+ OPT_IS_VAR, NULL, VAR_NFS_TCP, varCheck },
+{ "NFS version 3", "Use NFS version 3",
+ OPT_IS_VAR, NULL, VAR_NFS_V3, varCheck },
{ "Debugging", "Emit extra debugging output on VTY2 (ALT-F2)",
OPT_IS_VAR, NULL, VAR_DEBUG, varCheck },
{ "No Warnings", "Don't Warn the user when a setting seems incorrect",
diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h
index 8b0a6f5bcb96..651262ffd779 100644
--- a/release/sysinstall/sysinstall.h
+++ b/release/sysinstall/sysinstall.h
@@ -147,6 +147,8 @@
#define VAR_NEWFS_ARGS "newfsArgs"
#define VAR_NFS_PATH "nfs"
#define VAR_NFS_HOST "nfsHost"
+#define VAR_NFS_V3 "nfs_use_v3"
+#define VAR_NFS_TCP "nfs_use_tcp"
#define VAR_NFS_SECURE "nfs_reserved_port_only"
#define VAR_NFS_SERVER "nfs_server_enable"
#define VAR_NO_CONFIRM "noConfirm"