plan9port/bin/unmount

11 lines
216 B
Text
Raw Normal View History

#!/usr/local/plan9/bin/rc
2006-07-23 02:46:53 +00:00
if(! ~ $#* 1){
echo 'usage: unmount mtpt' >[1=2]
exit usage
}
f=`{u mount | grep $1}
if(echo $f | 9 grep -s 'type fuse' && ! ~ `{uname} Darwin)
2006-07-23 02:46:53 +00:00
exec fusermount -u -z $1
exec u umount $1