diff options
| author | Martin Jansa <martin.jansa@gmail.com> | 2013-08-01 09:09:26 +0200 |
|---|---|---|
| committer | Joe MacDonald <joe.macdonald@windriver.com> | 2013-08-01 06:56:25 -0400 |
| commit | 24a2c46d775b956ffdfc949834af6b43e67028c4 (patch) | |
| tree | 833c5a58fe539a5f45404af876efb92c454af540 | |
| parent | 246bedc1c6b3e2830ca0a8fae8c30b8624f46ab2 (diff) | |
| download | meta-openembedded-24a2c46d775b956ffdfc949834af6b43e67028c4.tar.gz | |
ntp: allow to run pkg_postinst_ntpdate in do_rootfs
* read-only rootfs cannot run postinsts on first boot and in this case
it doesn't really have to as we can create cron task in do_rootfs
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
| -rw-r--r-- | meta-networking/recipes-support/ntp/ntp.inc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc index 9367d41732..6e8b452cc9 100644 --- a/meta-networking/recipes-support/ntp/ntp.inc +++ b/meta-networking/recipes-support/ntp/ntp.inc | |||
| @@ -114,14 +114,10 @@ INITSCRIPT_NAME = "ntpd" | |||
| 114 | INITSCRIPT_PARAMS = "defaults" | 114 | INITSCRIPT_PARAMS = "defaults" |
| 115 | 115 | ||
| 116 | pkg_postinst_ntpdate() { | 116 | pkg_postinst_ntpdate() { |
| 117 | if test "x$D" != "x"; then | 117 | if ! grep -q -s ntpdate $D/var/spool/cron/root; then |
| 118 | exit 1 | ||
| 119 | else | ||
| 120 | if ! grep -q -s ntpdate /var/spool/cron/root; then | ||
| 121 | echo "adding crontab" | 118 | echo "adding crontab" |
| 122 | test -d /var/spool/cron || mkdir -p /var/spool/cron | 119 | test -d $D/var/spool/cron || mkdir -p $D/var/spool/cron |
| 123 | echo "30 * * * * ${bindir}/ntpdate-sync silent" >> /var/spool/cron/root | 120 | echo "30 * * * * ${bindir}/ntpdate-sync silent" >> $D/var/spool/cron/root |
| 124 | fi | 121 | fi |
| 125 | fi | ||
| 126 | } | 122 | } |
| 127 | 123 | ||
