mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-03 02:10:04 +00:00
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>
This commit is contained in:
committed by
Joe MacDonald
parent
246bedc1c6
commit
24a2c46d77
@@ -114,14 +114,10 @@ INITSCRIPT_NAME = "ntpd"
|
|||||||
INITSCRIPT_PARAMS = "defaults"
|
INITSCRIPT_PARAMS = "defaults"
|
||||||
|
|
||||||
pkg_postinst_ntpdate() {
|
pkg_postinst_ntpdate() {
|
||||||
if test "x$D" != "x"; then
|
if ! grep -q -s ntpdate $D/var/spool/cron/root; then
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
if ! grep -q -s ntpdate /var/spool/cron/root; then
|
|
||||||
echo "adding crontab"
|
echo "adding crontab"
|
||||||
test -d /var/spool/cron || mkdir -p /var/spool/cron
|
test -d $D/var/spool/cron || mkdir -p $D/var/spool/cron
|
||||||
echo "30 * * * * ${bindir}/ntpdate-sync silent" >> /var/spool/cron/root
|
echo "30 * * * * ${bindir}/ntpdate-sync silent" >> $D/var/spool/cron/root
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user