diff options
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r-- | usr.sbin/sysinstall/install.c | 2 | ||||
-rw-r--r-- | usr.sbin/sysinstall/nfs.c | 10 | ||||
-rw-r--r-- | usr.sbin/sysinstall/options.c | 4 | ||||
-rw-r--r-- | usr.sbin/sysinstall/sysinstall.h | 2 |
4 files changed, 15 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index 9800efa..4d063d2 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -1167,6 +1167,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/usr.sbin/sysinstall/nfs.c b/usr.sbin/sysinstall/nfs.c index 5c08df7..87788ea 100644 --- a/usr.sbin/sysinstall/nfs.c +++ b/usr.sbin/sysinstall/nfs.c @@ -61,9 +61,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/usr.sbin/sysinstall/options.c b/usr.sbin/sysinstall/options.c index 6ee3d25..8e3a7d9 100644 --- a/usr.sbin/sysinstall/options.c +++ b/usr.sbin/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/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index 684b0e3..244c880 100644 --- a/usr.sbin/sysinstall/sysinstall.h +++ b/usr.sbin/sysinstall/sysinstall.h @@ -160,6 +160,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" |