diff options
| -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 | ||
