3 # nfsfs Mount NFS filesystems.
5 # Version: @(#) /etc/init.d/skeleton 1.01 26-Oct-1993
7 # Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
10 # description: Mounts and unmounts all Network File System (NFS) \
15 # Source networking configuration.
16 if [ ! -f /etc/sysconfig/network ]; then
20 # Source function library.
21 . /etc/rc.d/init.d/functions
23 . /etc/sysconfig/network
25 # Check that networking is up.
26 if is_no "${NETWORKING}"; then
27 msg_network_down nfsfs
31 # See how we were called.
34 show "Mounting NFS filesystems"
39 touch /var/lock/subsys/nfsfs
42 if [ -f /proc/mounts ] ; then
48 show "Unmounting NFS filesystems"
50 remaining=$(awk '$3 == "nfs" {print $2}' $fsfile)
51 while [ -n "$remaining" -a 3 -gt 0 ]
53 fuser -msk -TERM `awk '$3 == "nfs" {print $2}' < $fsfile`
55 fuser -msk -KILL `awk '$3 == "nfs" {print $2}' < $fsfile`
57 remaining=$(awk '$3 == "nfs" {print $2}' $fsfile)
61 rm -f /var/lock/subsys/nfsfs
64 if [ -f /proc/mounts ] ; then
65 echo "Configured NFS mountpoints:"
66 grep -v '^#' /etc/fstab | \
67 awk '{ if ($3 ~ /^nfs$/ && $4 !~ /noauto/) print $2}'
68 echo "Active NFS mountpoints:"
69 grep -v '^#' /proc/mounts | \
70 awk '{ if ($3 ~ /^nfs$/ && $4 !~ /noauto/) print $2}'
72 echo "/proc filesystem unavailable"
83 msg_usage "$0 {start|stop|restart|reload|status}"