diff options
author | Richard Purdie <richard@openedhand.com> | 2006-03-23 23:32:58 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-03-23 23:32:58 +0000 |
commit | 7f60e4b4e7d9b45bfe4b76802a2e82bb4edbba9f (patch) | |
tree | b1ca54365729e3a4ac05c93616beb1207e497873 /openembedded/packages/initscripts/initscripts-1.0/openslug/umountnfs.sh | |
parent | 5d530ad71d08c3ebf127c6844969359c3a06a6ed (diff) | |
download | poky-7f60e4b4e7d9b45bfe4b76802a2e82bb4edbba9f.tar.gz |
Sync initscripts with OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@331 311d38ba-8fff-0310-9ca6-ca027cbcb966
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 | ||