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
24 . /etc/sysconfig/network
26 # Check that networking is up.
27 if is_yes "${NETWORKING}"; then
28 if [ ! -f /var/lock/subsys/network ]; then
29 msg_network_down nfsfs
37 # See how we were called.
40 show "Mounting NFS filesystems"
44 touch /var/lock/subsys/nfsfs
47 if [ -f /proc/mounts ] ; then
53 show "Unmounting NFS filesystems"
55 remaining=$(awk '$3 == "nfs" {print $2}' $fsfile)
56 while [ -n "$remaining" -a 3 -gt 0 ]
58 fuser -msk -TERM `awk '$3 == "nfs" {print $2}' < $fsfile`
60 fuser -msk -KILL `awk '$3 == "nfs" {print $2}' < $fsfile`
62 remaining=$(awk '$3 == "nfs" {print $2}' $fsfile)
65 rm -f /var/lock/subsys/nfsfs
68 if [ -f /proc/mounts ] ; then
69 echo "Configured NFS mountpoints:"
70 grep -v '^#' /etc/fstab | \
71 awk '{ if ($3 ~ /^nfs$/ && $4 !~ /noauto/) print $2}'
72 echo "Active NFS mountpoints:"
73 grep -v '^#' /proc/mounts | \
74 awk '{ if ($3 ~ /^nfs$/ && $4 !~ /noauto/) print $2}'
76 echo "/proc filesystem unavailable"
87 msg_usage "$0 {start|stop|restart|reload|status}"