2 ################################################################################
6 # Description: A script to unmount all nfs mounts. Note if the automounter is
7 # running then this script will first shutdown the automounter.
8 # This script returns 0 for success or non zero if it was unable
9 # to umount all nfs mounts. This script must run as root.
10 # Author: Andrew DeFaria, California Language Labs
11 # Created: Fri Jun 6 10:31:51 PDT 1997
13 # Language: Korn Shell
15 # (c) Copyright 2001, Andrew@DeFaria.com, all rights reserved
17 ################################################################################
18 export me=`basename $0`
19 export OS=$(/bin/uname -r | /usr/bin/cut -f2 -d.)
21 if [ $(id -u) -ne 0 ]; then
22 print -u2 "$me: Error: You must be root to use this command"
26 # First try to mount any nfs mounts listed in /etc/checklist
27 print "Re-establishing all static NFS mounts..."
28 if [ "$OS" = "10" ]; then
29 /usr/sbin/mount -aQF nfs
34 # Restart automounter if necessary
35 if [ -f /etc/automounter_was_here ]; then
36 print "Restarting automounter..."
37 if [ "$OS" = "10" ]; then
38 /usr/sbin/automount -f /etc/auto_master
40 /usr/etc/automount -f /etc/auto_master
42 rm -f /etc/automounter_was_here