f5fe48aa7481d02ff19f5c64497f39dadaeba62e
[vuplus_openembedded] / packages / initscripts / initscripts-1.0 / umountnfs.sh
1 #! /bin/sh
2 #
3 # umountnfs.sh  Unmount all network filesystems.
4 #
5
6 PATH=/sbin:/bin:/usr/sbin:/usr/bin
7
8 # Write a reboot record to /var/log/wtmp before unmounting
9 halt -w
10
11 echo "Unmounting remote filesystems..."
12
13 test -f /etc/fstab && (
14
15 #
16 #       Read through fstab line by line and unount network file systems
17 #
18 while read device mountpt fstype options
19 do
20         if test "$fstype" = nfs ||  test "$fstype" = smbfs ||  test "$fstype" = ncpfs
21         then
22                 umount -f $mountpt
23         fi
24 done
25 ) < /etc/fstab
26
27 : exit 0
28