diff options
Diffstat (limited to 'openembedded/packages/initscripts/initscripts-1.0/openslug/umountnfs.sh')
-rw-r--r-- | openembedded/packages/initscripts/initscripts-1.0/openslug/umountnfs.sh | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/openembedded/packages/initscripts/initscripts-1.0/openslug/umountnfs.sh b/openembedded/packages/initscripts/initscripts-1.0/openslug/umountnfs.sh deleted file mode 100644 index 994a919225..0000000000 --- a/openembedded/packages/initscripts/initscripts-1.0/openslug/umountnfs.sh +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # umountnfs.sh Unmount all network filesystems. | ||
4 | # | ||
5 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
6 | |||
7 | # Write a reboot record to /var/log/wtmp before unmounting | ||
8 | halt -w | ||
9 | |||
10 | # Ensure /proc is mounted | ||
11 | test -r /proc/mounts || mount -t proc proc /proc | ||
12 | |||
13 | echo "Unmounting remote filesystems..." | ||
14 | |||
15 | # | ||
16 | # Read the list of mounted file systems and -f umount the | ||
17 | # known network file systems. -f says umount it even if | ||
18 | # the server is unreachable. Do not attempt to umount | ||
19 | # the root file system. Unmount in reverse order from | ||
20 | # that given by /proc/mounts (otherwise it may not work). | ||
21 | # | ||
22 | unmount() { | ||
23 | local dev mp type opts | ||
24 | if read dev mp type opts | ||
25 | then | ||
26 | # recurse - unmount later items | ||
27 | unmount | ||
28 | # skip /, /proc and /dev | ||
29 | case "$mp" in | ||
30 | /|/proc)return 0;; | ||
31 | /dev) return 0;; | ||
32 | esac | ||
33 | # then unmount this, if nfs | ||
34 | case "$type" in | ||
35 | nfs|smbfs|ncpfs) umount -f "$mp";; | ||
36 | esac | ||
37 | fi | ||
38 | } | ||
39 | |||
40 | unmount </proc/mounts | ||