2018-10-31 22:48:36 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
lsmod | grep -q g_file_storage || exit 1
|
|
|
|
|
|
|
|
modprobe -r g_file_storage
|
|
|
|
sleep 1
|
|
|
|
|
|
|
|
PCB_ID=$(/usr/bin/ntxinfo /dev/mmcblk0 | grep pcb | cut -d ":" -f2)
|
|
|
|
DISK=/dev/mmcblk
|
|
|
|
|
2020-02-02 19:35:21 +00:00
|
|
|
if [ "${PCB_ID}" -eq 22 ] || [ "${PCB_ID}" -eq 23 ]; then
|
2018-10-31 22:48:36 +00:00
|
|
|
PARTITION="${DISK}0p7"
|
|
|
|
else
|
|
|
|
PARTITION="${DISK}0p4"
|
|
|
|
fi
|
|
|
|
|
|
|
|
MOUNT_ARGS="noatime,nodiratime,shortname=mixed,utf8"
|
|
|
|
|
2020-02-02 19:35:21 +00:00
|
|
|
dosfsck -a -w "${PARTITION}" >dosfsck.log 2>&1
|
2018-10-31 22:48:36 +00:00
|
|
|
|
2020-02-02 19:35:21 +00:00
|
|
|
mount -o "${MOUNT_ARGS}" -t vfat "${PARTITION}" /mnt/onboard
|
2018-10-31 22:48:36 +00:00
|
|
|
|
|
|
|
PARTITION=${DISK}1p1
|
|
|
|
|
2020-02-02 19:35:21 +00:00
|
|
|
[ -e "${PARTITION}" ] && mount -o "${MOUNT_ARGS}" -t vfat "${PARTITION}" /mnt/sd
|
2018-10-31 22:48:36 +00:00
|
|
|
|