From e7b8bdcde241a2485e5c3a42900cb9495149a087 Mon Sep 17 00:00:00 2001 From: zijiehe Date: Tue, 23 Feb 2016 20:46:57 +0800 Subject: [PATCH] Check whether sd card is presenting and mounting as RO, before do the real remount --- platform/kobo/koreader.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platform/kobo/koreader.sh b/platform/kobo/koreader.sh index 5327d2d9a..0a55964c1 100755 --- a/platform/kobo/koreader.sh +++ b/platform/kobo/koreader.sh @@ -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