summaryrefslogtreecommitdiffstats
path: root/dung-3.4.25-m2/common/mount-device.sh
blob: a5e4b7842a7aa125b2692fb21359713cad105fdf (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
26
27
28
29
30
31
#!/bin/bash
# mount devices

echo "Mount devices"

set -e
#set -x

if [ $# -ne 1 ]; then
        echo "usage: $(basename $0) PATTERN" >& 2
        exit 1
fi

DEV_DIR="$1"

# Mount device
if [ $DEV_DIR  == "/mnt/sd0" ]; then
        mount /dev/mmcblk1p1 /mnt/sd0/
elif [ $DEV_DIR == "/mnt/sd1" ]; then
        mount /dev/mmcblk2p1 /mnt/sd1/
else
        mount -t tmpfs -o size=450M tmpfs /tmp/temp/
fi

# Mount check
if [ $? -eq 0 ];then
	echo "Device have mounted"
else
	echo "Device mount is error" >&2
	exit 1
fi