Check whether sd card is presenting and mounting as RO, before do the real remount

pull/1845/head
zijiehe 8 years ago
parent 38553b5ef8
commit e7b8bdcde2

@ -80,8 +80,12 @@ if [ ! -n "${PLATFORM}" ] ; then
fi
# end of value check of PLATFORM
# Remount SD to RW, ignore errors since we may not have sd card
mount -o remount,rw /mnt/sd || true
grep ' /mnt/sd ' /proc/mounts | grep 'ro'
# Remount SD to RW if it's RO
if [ $? -eq 0 ]
then
mount -o remount,rw /mnt/sd
fi
./reader.lua "${args}" 2> crash.log

Loading…
Cancel
Save