diff options
author | Stephane Desneux <stephane.desneux@iot.bzh> | 2016-06-14 11:51:43 +0200 |
---|---|---|
committer | Stephane Desneux <stephane.desneux@iot.bzh> | 2016-06-14 11:51:51 +0200 |
commit | e2472c7b1d061aef8bb05a4d7940fd8159c4a329 (patch) | |
tree | d02452b65c994c373f88199028f53020722d9815 /dung-3.4.25-m2/common/mount-device.sh | |
parent | 87cdfd4626c0cb47fc22f328867e49d6268df85c (diff) |
add dung-3.4.25-m2, required by some JTA Functional.* testsblowfish_2.0.12.0.1
collection of shell scripts Used in multiple tests:
* Functional.arch_timer/arch_timer.sh
* Functional.scifab/scifab.sh
* Functional.cmt/cmt.sh
* Functional.sdhi_0/sdhi_0.sh
Change-Id: I268c426071890554518e8b4927620fe6df587c34
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'dung-3.4.25-m2/common/mount-device.sh')
-rwxr-xr-x | dung-3.4.25-m2/common/mount-device.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dung-3.4.25-m2/common/mount-device.sh b/dung-3.4.25-m2/common/mount-device.sh new file mode 100755 index 0000000..a5e4b78 --- /dev/null +++ b/dung-3.4.25-m2/common/mount-device.sh @@ -0,0 +1,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 |