[OE-core] [PATCH v1] initscripts: do not save timestamp for readonly system
Ming Liu
liu.ming50 at gmail.com
Mon Nov 23 09:42:28 UTC 2015
From: Ming Liu <peter.x.liu at external.atlascopco.com>
To avoid reporting errors for /etc/timestamp is not writeable in a
readonly system.
Reported-by: Niklas Soderlund <niklas.soderlund at external.atlascopco.com>
Signed-off-by: Ming Liu <peter.x.liu at external.atlascopco.com>
---
meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
index b038fc5..6e5be79 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
@@ -9,5 +9,5 @@
# Description:
### END INIT INFO
-# Update the timestamp
-date -u +%4Y%2m%2d%2H%2M%2S > /etc/timestamp
+# Update the timestamp for writeable system
+[ -w /etc/timestamp ] && date -u +%4Y%2m%2d%2H%2M%2S > /etc/timestamp
--
1.9.1
More information about the Openembedded-core
mailing list