aboutsummaryrefslogtreecommitdiffstats
path: root/dung-3.4.25-m2/common/umount-device.sh
blob: 59a829af39c26d721ca4fd862858b37acd217ea9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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