diff options
author | Stefan Schmidt <stefan@datenfreihafen.org> | 2009-09-17 18:01:23 +0000 |
---|---|---|
committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2009-09-17 18:38:25 +0000 |
commit | e8622747c60b148e94f095c4bb7fe40fc52bba0a (patch) | |
tree | 76274bb2dfc0fdc63e419144deccc3a85a087378 /recipes/shr/initscripts-shr/umountnfs.sh | |
parent | 80c55c2574e99f025d88608966b09fcc578ed4f5 (diff) |
initscripts-shr: Add SHR initscripts (from SHR)
Diffstat (limited to 'recipes/shr/initscripts-shr/umountnfs.sh')
-rw-r--r-- | recipes/shr/initscripts-shr/umountnfs.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/recipes/shr/initscripts-shr/umountnfs.sh b/recipes/shr/initscripts-shr/umountnfs.sh new file mode 100644 index 0000000000..f5fe48aa74 --- /dev/null +++ b/recipes/shr/initscripts-shr/umountnfs.sh @@ -0,0 +1,28 @@ +#! /bin/sh +# +# umountnfs.sh Unmount all network filesystems. +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +# Write a reboot record to /var/log/wtmp before unmounting +halt -w + +echo "Unmounting remote filesystems..." + +test -f /etc/fstab && ( + +# +# Read through fstab line by line and unount network file systems +# +while read device mountpt fstype options +do + if test "$fstype" = nfs || test "$fstype" = smbfs || test "$fstype" = ncpfs + then + umount -f $mountpt + fi +done +) < /etc/fstab + +: exit 0 + |