diff options
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh')
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh new file mode 100755 index 0000000000..a4fb821d91 --- /dev/null +++ b/meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh | |||
@@ -0,0 +1,32 @@ | |||
1 | ### BEGIN INIT INFO | ||
2 | # Provides: umountnfs | ||
3 | # Required-Start: | ||
4 | # Required-Stop: umountfs | ||
5 | # Should-Stop: $network $portmap | ||
6 | # Default-Start: | ||
7 | # Default-Stop: 0 6 | ||
8 | # Short-Description: Unmount all network filesystems | ||
9 | ### END INIT INFO | ||
10 | |||
11 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
12 | |||
13 | # Write a reboot record to /var/log/wtmp before unmounting | ||
14 | halt -w | ||
15 | |||
16 | echo "Unmounting remote filesystems..." | ||
17 | |||
18 | test -f /etc/fstab && ( | ||
19 | |||
20 | # | ||
21 | # Read through fstab line by line and unount network file systems | ||
22 | # | ||
23 | while read device mountpt fstype options | ||
24 | do | ||
25 | if test "$fstype" = nfs || test "$fstype" = smbfs || test "$fstype" = ncpfs | ||
26 | then | ||
27 | umount -f $mountpt | ||
28 | fi | ||
29 | done | ||
30 | ) < /etc/fstab | ||
31 | |||
32 | : exit 0 | ||