Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Joe MacDonald <Joe.MacDonald@windriver.com>
To: <openembedded-devel@lists.openembedded.org>
Subject: Re: [meta-networking][PATCH] ntp: allow to run pkg_postinst_ntpdate in do_rootfs
Date: Thu, 1 Aug 2013 08:51:54 -0400	[thread overview]
Message-ID: <20130801125154.GC3673@windriver.com> (raw)
In-Reply-To: <1375340966-597-1-git-send-email-Martin.Jansa@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]

Herged.  Thanks.
-J.

[[oe] [meta-networking][PATCH] ntp: allow to run pkg_postinst_ntpdate in do_rootfs] On 13.08.01 (Thu 09:09) Martin Jansa wrote:

> * 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>
> ---
>  meta-networking/recipes-support/ntp/ntp.inc | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc
> index 9367d41..6e8b452 100644
> --- a/meta-networking/recipes-support/ntp/ntp.inc
> +++ b/meta-networking/recipes-support/ntp/ntp.inc
> @@ -114,14 +114,10 @@ INITSCRIPT_NAME = "ntpd"
>  INITSCRIPT_PARAMS = "defaults"
>  
>  pkg_postinst_ntpdate() {
> -if test "x$D" != "x"; then
> -    exit 1
> -else
> -    if ! grep -q -s ntpdate /var/spool/cron/root; then
> +    if ! grep -q -s ntpdate $D/var/spool/cron/root; then
>          echo "adding crontab"
> -        test -d /var/spool/cron || mkdir -p /var/spool/cron
> -        echo "30 * * * *    ${bindir}/ntpdate-sync silent" >> /var/spool/cron/root
> +        test -d $D/var/spool/cron || mkdir -p $D/var/spool/cron
> +        echo "30 * * * *    ${bindir}/ntpdate-sync silent" >> $D/var/spool/cron/root
>      fi
> -fi
>  }
>  
-- 
-Joe MacDonald.
:wq

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

      reply	other threads:[~2013-08-01 12:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-01  7:09 [meta-networking][PATCH] ntp: allow to run pkg_postinst_ntpdate in do_rootfs Martin Jansa
2013-08-01 12:51 ` Joe MacDonald [this message]

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=20130801125154.GC3673@windriver.com \
    --to=joe.macdonald@windriver.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox