#!/bin/sh
# This script umounts file systems associated with UNH iSCSI Disks
#

UNH_ISCSI_DEV=/dev

/bin/grep -w ${UNH_ISCSI_DEV} /proc/mounts | \
while read MOUNT JUNK
do
	/sbin/fuser -k -m ${MOUNT} > /dev/null 2>&1
	sleep 2
	sync
	/bin/umount -f ${MOUNT}
done

/bin/grep -w ${UNH_ISCSI_DEV} /proc/swaps | \
while read SWAP JUNK
do
	/sbin/fuser -k -m ${SWAP} > /dev/null 2>&1
	/sbin/swapoff ${SWAP}
done
