Tweak the sd is ro check a bit

Inspired from MRPI, but without a strict check of the device name,
because I'm not sure it'll be the same across the whole range of
Kobos...
This commit is contained in:
NiLuJe
2016-03-01 19:43:56 +01:00
parent 150aac1630
commit ea382aea86

View File

@@ -80,11 +80,9 @@ if [ ! -n "${PLATFORM}" ] ; then
fi
# end of value check of PLATFORM
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
# Remount the SD card RW if it's inserted and currently RO
if awk '$4~/(^|,)ro($|,)/' /proc/mounts | grep ' /mnt/sd ' ; then
mount -o remount,rw /mnt/sd
fi
./reader.lua "${args}" 2> crash.log