summaryrefslogtreecommitdiffstats
path: root/dung-3.4.25-m2/common/umount-device.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dung-3.4.25-m2/common/umount-device.sh')
-rwxr-xr-xdung-3.4.25-m2/common/umount-device.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/dung-3.4.25-m2/common/umount-device.sh b/dung-3.4.25-m2/common/umount-device.sh
new file mode 100755
index 0000000..59a829a
--- /dev/null
+++ b/dung-3.4.25-m2/common/umount-device.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# umount devices
+
+echo "Umount devices"
+
+set -e
+#set -x
+
+if [ $# -ne 1 ]; then
+ echo "usage: $(basename $0) PATTERN" >& 2
+ exit 1
+fi
+
+DEV_DIR="$1"
+
+# Umount device
+umount ${DEV_DIR}/
+
+# Umount check
+if [ $? -eq 0 ];then
+ echo "Device have umounted"
+else
+ echo "Device umount is error" >&2
+ exit 1
+fi