diff options
author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-05-30 05:13:24 +0000 |
---|---|---|
committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-05-30 05:13:24 +0000 |
commit | e34d8f08ab4842e8d077bb64d72fddfc695cdc9a (patch) | |
tree | 7efd057a82ea2fc63d0dc4ee19469ce63d7fbc43 /usr.sbin/sysinstall/nfs.c | |
parent | d1de348dff23ea6aa8d6bff7a94a7417166662b5 (diff) | |
download | src-e34d8f08ab4842e8d077bb64d72fddfc695cdc9a.tar.gz src-e34d8f08ab4842e8d077bb64d72fddfc695cdc9a.zip |
NFS installation was broken - try to fix it.
Notes
Notes:
svn path=/head/; revision=8860
Diffstat (limited to 'usr.sbin/sysinstall/nfs.c')
-rw-r--r-- | usr.sbin/sysinstall/nfs.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/nfs.c b/usr.sbin/sysinstall/nfs.c index 2ed22f64b64b..044e959f7722 100644 --- a/usr.sbin/sysinstall/nfs.c +++ b/usr.sbin/sysinstall/nfs.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: media.c,v 1.21 1995/05/28 03:04:58 jkh Exp $ + * $Id: nfs.c,v 1.2 1995/05/29 11:01:35 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -53,17 +53,23 @@ Boolean NFSMounted; Boolean mediaInitNFS(Device *dev) { + Device *netDevice = (Device *)dev->private; + if (NFSMounted) return TRUE; + if (netDevice->init) + if (!(*netDevice->init)(netDevice)) + return FALSE; + if (Mkdir("/nfs", NULL)) return FALSE; if (!vsystem("mount_nfs %s %s %s /nfs", getenv("nfsSlowPC") ? "-r 1024 -w 1024" : "", - getenv("nfsServerSecure") ? "-P" : "", dev->private)) + getenv("nfsServerSecure") ? "-P" : "", dev->name)) return TRUE; else { - msgConfirm("Error mounting %s on /nfs: %s (%u)\n", dev->private, strerror(errno), errno); + msgConfirm("Error mounting %s on /nfs: %s (%u)\n", dev->name, strerror(errno), errno); return FALSE; } NFSMounted = TRUE; @@ -85,6 +91,8 @@ mediaGetNFS(char *file) void mediaShutdownNFS(Device *dev) { + Device *netdev = (Device *)dev->private; + if (!NFSMounted) return; msgDebug("Unmounting /nfs\n"); @@ -92,6 +100,8 @@ mediaShutdownNFS(Device *dev) msgConfirm("Could not unmount the NFS partition: %s\n", strerror(errno)); if (isDebug()) msgDebug("Unmount returned\n"); + if (netdev->shutdown) + (*netdev->shutdown)(netdev); NFSMounted = FALSE; return; } |