exit 1
fi
+CONFIGUREDNFSMOUNTPOINTS="`grep -v '^#' /etc/fstab | \
+ awk '{ if ($3 ~ /^nfs$/ && $4 !~ /noauto/) print $2}'`"
+ACTIVENFSMOUNTPOINTS="`grep -v '^#' /proc/mounts | \
+ awk '{ if ($3 ~ /^nfs$/ && $4 !~ /noauto/) print $2}'`"
+
# See how we were called.
case "$1" in
start)
+ if [ -z "$CONFIGUREDNFSMOUNTPOINTS" ] ; then
+ echo "There are no configured NFS mountpoints!"
+ else
show "Mounting NFS filesystems"
busy
mount -a -t nfs
deltext
ok
touch /var/lock/subsys/nfsfs
+ fi
;;
stop)
if [ -f /proc/mounts ] ; then
else
fsfile="/etc/mtab"
fi
+
+ if [ -z "$CONFIGUREDNFSMOUNTPOINTS" ] ; then
+ echo "There are no configured NFS mountpoints!"
+ elif [ -z "$ACTIVENFSMOUNTPOINTS" ] ; then
+ echo "There are no active NFS mountpoints!"
+ else
show "Unmounting NFS filesystems"
busy
deltext
ok
rm -f /var/lock/subsys/nfsfs
+ fi
;;
status)
if [ -f /proc/mounts ] ; then
echo "Configured NFS mountpoints:"
- grep -v '^#' /etc/fstab | \
- awk '{ if ($3 ~ /^nfs$/ && $4 !~ /noauto/) print $2}'
+ echo "$CONFIGUREDNFSMOUNTPOINTS"
echo "Active NFS mountpoints:"
- grep -v '^#' /proc/mounts | \
- awk '{ if ($3 ~ /^nfs$/ && $4 !~ /noauto/) print $2}'
+ echo "$ACTIVENFSMOUNTPOINTS"
else
echo "/proc filesystem unavailable"
fi