diff options
author | acid-burn <acidburn@opendreambox.org> | 2009-02-13 10:02:40 +0100 |
---|---|---|
committer | ghost <andreas.monzner@multimedia-labs.de> | 2009-07-18 11:02:17 +0200 |
commit | 40107a8c5af8d058f18dbe9845cdc47ee46a614e (patch) | |
tree | 2b9eb1019f19aa14048cb56165c28e691d0bdba7 /packages | |
parent | eb1ca463c5b4101d96439a098c319b91c0e311d0 (diff) | |
download | openembedded-40107a8c5af8d058f18dbe9845cdc47ee46a614e.tar.gz |
properly unmount network filesystems on shutdown
Diffstat (limited to 'packages')
-rwxr-xr-x | packages/initscripts/initscripts-1.0/umountnfs.sh | 29 | ||||
-rwxr-xr-x[-rw-r--r--] | packages/initscripts/initscripts-opendreambox_1.0.bb | 2 |
2 files changed, 30 insertions, 1 deletions
diff --git a/packages/initscripts/initscripts-1.0/umountnfs.sh b/packages/initscripts/initscripts-1.0/umountnfs.sh index f8a1741e33..5c88635a8c 100755 --- a/packages/initscripts/initscripts-1.0/umountnfs.sh +++ b/packages/initscripts/initscripts-1.0/umountnfs.sh @@ -21,5 +21,34 @@ do done ) < /etc/fstab +echo "Unmounting other remote filesystems..." + +# +# Read the list of mounted file systems and -f umount the +# known network file systems. -f says umount it even if +# the server is unreachable. Do not attempt to umount +# the root file system. Unmount in reverse order from +# that given by /proc/mounts (otherwise it may not work). +# +unmount() { + local dev mp type opts + if read dev mp type opts + then + # recurse - unmount later items + unmount + # skip /, /proc and /dev + case "$mp" in + /|/proc)return 0;; + /dev) return 0;; + esac + # then unmount this, if nfs + case "$type" in + nfs|smbfs|ncpfs|cifs) umount -f "$mp";; + esac + fi +} + +unmount </proc/mounts + : exit 0 diff --git a/packages/initscripts/initscripts-opendreambox_1.0.bb b/packages/initscripts/initscripts-opendreambox_1.0.bb index d12e2f54e6..8d4cc71c02 100644..100755 --- a/packages/initscripts/initscripts-opendreambox_1.0.bb +++ b/packages/initscripts/initscripts-opendreambox_1.0.bb @@ -5,7 +5,7 @@ PRIORITY = "required" DEPENDS = "makedevs" RDEPENDS = "makedevs" LICENSE = "GPL" -PR = "r20" +PR = "r21" FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/${P}', '${FILE_DIRNAME}/initscripts-${PV}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}" |