[oe-commits] acid-burn : properly unmount network filesystems on shutdown
GIT User account
git at amethyst.openembedded.net
Fri Feb 13 14:24:31 UTC 2009
Module: openembedded.git
Branch: org.openembedded.dreambox
Commit: a4205dfee718842b6f994ff8f1b15bee61f9f387
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=a4205dfee718842b6f994ff8f1b15bee61f9f387
Author: acid-burn <acidburn at opendreambox.org>
Date: Fri Feb 13 10:02:40 2009 +0100
properly unmount network filesystems on shutdown
---
packages/initscripts/initscripts-1.0/umountnfs.sh | 29 ++++++++++++++++++++
.../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 f8a1741..5c88635 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
old mode 100644
new mode 100755
index d12e2f5..8d4cc71
--- 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)}"
More information about the Openembedded-commits
mailing list