diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-30 05:13:24 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-30 05:13:24 +0000 |
commit | 1ad077026642249754a723d17ecee9f12fc5215a (patch) | |
tree | 7efd057a82ea2fc63d0dc4ee19469ce63d7fbc43 /release/sysinstall/nfs.c | |
parent | 73f2e484c4769cc4482cf7315dc29e404cd0a789 (diff) | |
download | FreeBSD-src-1ad077026642249754a723d17ecee9f12fc5215a.zip FreeBSD-src-1ad077026642249754a723d17ecee9f12fc5215a.tar.gz |
NFS installation was broken - try to fix it.
Diffstat (limited to 'release/sysinstall/nfs.c')
-rw-r--r-- | release/sysinstall/nfs.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/release/sysinstall/nfs.c b/release/sysinstall/nfs.c index 2ed22f6..044e959 100644 --- a/release/sysinstall/nfs.c +++ b/release/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; } |