summaryrefslogtreecommitdiff
path: root/package/base-files/src/etc/init.d
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-07-16 18:36:19 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2013-07-16 18:36:19 +0200
commit4d7e58f6be98eb1446e6b86434da0f1472934612 (patch)
tree865558e17b2e4285ebf05258b30caf0510d98b94 /package/base-files/src/etc/init.d
parent67b446e46200c81339dde33e3501d17807e7e7ee (diff)
umount all filesystems before network is going down
Diffstat (limited to 'package/base-files/src/etc/init.d')
-rwxr-xr-xpackage/base-files/src/etc/init.d/umount14
1 files changed, 14 insertions, 0 deletions
diff --git a/package/base-files/src/etc/init.d/umount b/package/base-files/src/etc/init.d/umount
new file mode 100755
index 000000000..bcd545999
--- /dev/null
+++ b/package/base-files/src/etc/init.d/umount
@@ -0,0 +1,14 @@
+#!/bin/sh
+#INIT 55
+
+case $1 in
+autostop)
+ cd /
+ sync
+ for i in $(grep -v ^# /etc/fstab 2>/dev/null|awk '{ print $2 }');do
+ umount $i 2>/dev/null
+ done
+ ;;
+esac
+exit 0
+