* [Buildroot] Best way to run ntpdate at startup
@ 2010-02-14 6:27 Jim Thomas
2010-02-14 10:43 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Jim Thomas @ 2010-02-14 6:27 UTC (permalink / raw)
To: buildroot
I enabled BR2_PACKAGE_NTP=y, and Buildroot added ntpd and /etc/init.d/S49ntp to the RFS. Good.
But I need to run ntpdate at startup to set the initial time, before ntpd runs.
So I manually created S48ntpdate to run ntpdate (S48) before ntpd (S49) at startup:
/etc/init.d/S48ntpdate
#! /bin/sh
ntpdate 0.us.pool.ntp.org
exit 0
That works, but I noticed S49ntp includes support for running ntpdate before ntpd during startup:
/etc/init.d/S49ntp
case "$1" in
start)
if test x$NTPDATE = xyes ; then
echo -n "Getting initial time via ntp"
$NTPDATE_BIN $NTPDATE_OPTS $NTPSERVERS > /dev/null 2>&1
echo "."
fi
Where should I configure NTPDATE=yes and NTPSERVERS=0.us.pool.ntp.org?
I could add this to the top of S49ntp, but is there some other startup config file that is intended for such options so S49ntp remains unaltered?
Is this done manually, or through Buildroot 'make menuconfig'?
Ideally, these edits would not be clobbered when I rebuild the RFS.
Thanks.
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100213/8f358369/attachment.htm>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] Best way to run ntpdate at startup
2010-02-14 6:27 [Buildroot] Best way to run ntpdate at startup Jim Thomas
@ 2010-02-14 10:43 ` Thomas Petazzoni
2010-02-14 21:17 ` Jim Thomas
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2010-02-14 10:43 UTC (permalink / raw)
To: buildroot
Hello Jim,
On Sat, 13 Feb 2010 22:27:11 -0800 (PST)
Jim Thomas <jimthomasembedded@yahoo.com> wrote:
> Where should I configure NTPDATE=yes and NTPSERVERS=0.us.pool.ntp.org?
>
> I could add this to the top of S49ntp, but is there some other
> startup config file that is intended for such options so S49ntp
> remains unaltered?
>
> Is this done manually, or through Buildroot 'make menuconfig'?
The ntpd script reads /etc/default/ntpd, in which you can set NTPDATE,
NTPD and other variables.
Cheers,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] Best way to run ntpdate at startup
2010-02-14 10:43 ` Thomas Petazzoni
@ 2010-02-14 21:17 ` Jim Thomas
0 siblings, 0 replies; 3+ messages in thread
From: Jim Thomas @ 2010-02-14 21:17 UTC (permalink / raw)
To: buildroot
> The ntpd script reads /etc/default/ntpd, in which you can set NTPDATE,
> NTPD and other variables.
Perfect solution. Thanks.
________________________________
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot at busybox.net
Sent: Sun, February 14, 2010 4:43:04 AM
Subject: Re: [Buildroot] Best way to run ntpdate at startup
Hello Jim,
On Sat, 13 Feb 2010 22:27:11 -0800 (PST)
Jim Thomas <jimthomasembedded@yahoo.com> wrote:
> Where should I configure NTPDATE=yes and NTPSERVERS=0.us.pool.ntp.org?
>
> I could add this to the top of S49ntp, but is there some other
> startup config file that is intended for such options so S49ntp
> remains unaltered?
>
> Is this done manually, or through Buildroot 'make menuconfig'?
The ntpd script reads /etc/default/ntpd, in which you can set NTPDATE,
NTPD and other variables.
Cheers,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100214/0a1129d1/attachment.htm>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-02-14 21:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-14 6:27 [Buildroot] Best way to run ntpdate at startup Jim Thomas
2010-02-14 10:43 ` Thomas Petazzoni
2010-02-14 21:17 ` Jim Thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox