From: Jim Thomas <jimthomasembedded@yahoo.com>
To: buildroot@busybox.net
Subject: [Buildroot] Best way to run ntpdate at startup
Date: Sat, 13 Feb 2010 22:27:11 -0800 (PST) [thread overview]
Message-ID: <368044.7338.qm@web44815.mail.sp1.yahoo.com> (raw)
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>
next reply other threads:[~2010-02-14 6:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-14 6:27 Jim Thomas [this message]
2010-02-14 10:43 ` [Buildroot] Best way to run ntpdate at startup Thomas Petazzoni
2010-02-14 21:17 ` Jim Thomas
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=368044.7338.qm@web44815.mail.sp1.yahoo.com \
--to=jimthomasembedded@yahoo.com \
--cc=buildroot@busybox.net \
/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