#!/bin/bash ################################################################################ ############ UNMOUNT ################# ################################################################################ ### This script makes sure that when the student logs off the nfs mounts ############################# are unmounted ################################### ##Created by FAHAD SAEED on 15 JULY 2005 ##Assumes that only one nfs is mounted /only one student has logged in and is working ## on one terminal mount |grep "\" > /home/script/reqline sed 's/[ ][ ]*/\ /g' /home/script/reqline >/home/script/reqline1 sed -n '1p' /home/script/reqline1 > /home/script/reqline2 read a < /home/script/reqline2 echo $a sed -n '3p' /home/script/reqline1 > /home/script/reqline3 read b < /home/script/reqline3 echo $b umount -t nfs $a $b rm -f /home/script/reqline rm -f /home/script/reqline1 rm -f /home/script/reqline2 rm -f /home/script/reqline3