From 38553b5ef8e88ae52f841516852232ade5ed572c Mon Sep 17 00:00:00 2001 From: zijiehe Date: Mon, 22 Feb 2016 17:23:43 +0800 Subject: [PATCH 1/2] Mount SD card as RW on kobo, but ignore errors, since we may not have sd card installed. --- platform/kobo/koreader.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/kobo/koreader.sh b/platform/kobo/koreader.sh index f85ee00be..5327d2d9a 100755 --- a/platform/kobo/koreader.sh +++ b/platform/kobo/koreader.sh @@ -80,6 +80,9 @@ 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 + ./reader.lua "${args}" 2> crash.log if [ "${from_nickel}" == "true" ] ; then From e7b8bdcde241a2485e5c3a42900cb9495149a087 Mon Sep 17 00:00:00 2001 From: zijiehe Date: Tue, 23 Feb 2016 20:46:57 +0800 Subject: [PATCH 2/2] 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