From 615d4c3eb3e2fa3eb3c0954995df991b3c8b4fc0 Mon Sep 17 00:00:00 2001 From: Locutus73 Date: Mon, 7 Dec 2020 18:22:20 +0100 Subject: [PATCH] Version 1.0.2 - Fixed a permission issue. Fixed a filesystem permission issue. --- rtc.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rtc.sh b/rtc.sh index 7ea3b20..14acba2 100644 --- a/rtc.sh +++ b/rtc.sh @@ -18,6 +18,7 @@ # You can download the latest version of this script from: # https://github.com/MiSTer-devel/Scripts_MiSTer +# Version 1.0.2 - 2020-12-07 - Fixed a filesystem permission issue. # Version 1.0.1 - 2019-06-10 - Pinging the NTP server for testing Internet connectivity instead of google.com. # Version 1.0 - 2019-01-08 - First commit. @@ -35,12 +36,15 @@ if ntpdate -s -b -u $NTP_SERVER then echo "Date and time is:" echo "$(date)" + mount | grep "on / .*[(,]ro[,$]" -q && RO_ROOT="true" + [ "$RO_ROOT" == "true" ] && mount / -o remount,rw if hwclock -wu then echo "RTC set." else echo "Unable to set the RTC." fi + [ "$RO_ROOT" == "true" ] && mount / -o remount,ro else echo "Unable to sync." fi