#!/bin/bash
# file   : umount_clients
# author : Jacek Radajewski
# date   : 22 May 1997
#
# Script to unmount "spare" partition on all hosts


#-------------------------------------------------------------------
# check if started from alpha 
#-------------------------------------------------------------------

if [ $(/bin/uname -n) != "alpha.beowulf.usq.edu.au" ] ; then
    echo "$0 : I must be started from alpha.beowulf.usq.edu.au"
    echo "$0 : I was started from $(/bin/uname -n)"
    exit 1
fi

#-------------------------------------------------------------------
# unmount all /spare 
#-------------------------------------------------------------------

for host in $(cat /usr/local/admin/hosts) ; do
    for directory in $(cat /usr/local/admin/hosts) ; do
	echo -n "unmounting /$directory on $host ... "
	rsh $host "/bin/umount -v /$directory &"
    done;
done;




