From: Ming Liu <liu.ming50@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Ming Liu <peter.x.liu@external.atlascopco.com>
Subject: [PATCH] initscripts: do not save timestamp for readonly system
Date: Sat, 21 Nov 2015 22:55:50 +0100 [thread overview]
Message-ID: <1448142950-5321-1-git-send-email-liu.ming50@gmail.com> (raw)
From: Ming Liu <peter.x.liu@external.atlascopco.com>
To avoid reporting errors for /etc/timestamp is not writeable in a
readonly system.
Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh | 6 ++++--
1 file changed, 4 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..0f7aa20 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,7 @@
# Description:
### END INIT INFO
-# Update the timestamp
-date -u +%4Y%2m%2d%2H%2M%2S > /etc/timestamp
+# Update the timestamp for non-readonly system
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+[ "$ROOTFS_READ_ONLY" = "no" ] && date -u +%4Y%2m%2d%2H%2M%2S > /etc/timestamp
--
1.9.1
next reply other threads:[~2015-11-21 21:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-21 21:55 Ming Liu [this message]
2015-11-22 9:33 ` [PATCH] initscripts: do not save timestamp for readonly system Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448142950-5321-1-git-send-email-liu.ming50@gmail.com \
--to=liu.ming50@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=peter.x.liu@external.atlascopco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.