summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/nfs.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1997-01-24 19:24:51 +0000
committerjkh <jkh@FreeBSD.org>1997-01-24 19:24:51 +0000
commitea4f82e353a9946587bb951abdf055807de19e85 (patch)
treedd1c8a0c2facff37bca8e7cce5cbf8da441b17ba /usr.sbin/sysinstall/nfs.c
parent04cbebd0add1fa8f9192b002813594194b3b35e8 (diff)
downloadFreeBSD-src-ea4f82e353a9946587bb951abdf055807de19e85.zip
FreeBSD-src-ea4f82e353a9946587bb951abdf055807de19e85.tar.gz
OK, I've got two ideas to file in the "really seemed like a good idea
at the time, but on further reflection..." bucket with these changes. 1. Checking the media before frobbing the disks was a fine idea, and I wish it could have worked, but that leads to a rather difficult situation when you need to mount the media someplace and you're about to: a) Chroot away from your present root. b) Newfs the root to be. You're basically screwed since there's no place to stick the mount point where it will be found following the newfs/chroot (and eliminating the chroot in favor of just using the "root bias" feature would work great for the distributions but not the pkg_add calls done by the package installer). 2. Automatic timeout handling. I don't know why, but alarm() frequently returns no residual even when the alarm didn't go off, which defies the man page but hey, since when was that so unusual? Take out timeouts but retain the code which temporarily replaces the SIGINT handler in favor of a more media-specific handler. This way, at least, if it's hanging you can at least whap it. I think the timeout code would have been losing over *really slow* links anyway, so it's probably best that it go. This should fix NFS, tape & CDROM installs again (serves me right for getting complacent and using just the FTP installs in my testing).
Diffstat (limited to 'usr.sbin/sysinstall/nfs.c')
-rw-r--r--usr.sbin/sysinstall/nfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/nfs.c b/usr.sbin/sysinstall/nfs.c
index 38b2e05..4e4be22 100644
--- a/usr.sbin/sysinstall/nfs.c
+++ b/usr.sbin/sysinstall/nfs.c
@@ -46,7 +46,7 @@ Boolean NFSMounted;
Boolean
mediaInitNFS(Device *dev)
{
- char *mountpoint = (!Chrooted && RunningAsInit) ? "/mnt/dist" : "/dist";
+ char *mountpoint = "/dist";
Device *netDevice = (Device *)dev->private;
if (NFSMounted)
@@ -58,7 +58,7 @@ mediaInitNFS(Device *dev)
if (Mkdir(mountpoint))
return FALSE;
- msgNotify("Mounting %s over NFS.", dev->name);
+ 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)) {
@@ -96,7 +96,7 @@ void
mediaShutdownNFS(Device *dev)
{
/* Device *netdev = (Device *)dev->private; */
- char *mountpoint = (!Chrooted && RunningAsInit) ? "/mnt/dist" : "/dist";
+ char *mountpoint = "/dist";
if (!NFSMounted)
return;
OpenPOWER on IntegriCloud