[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: Ntpd config file support (sample sed)
From: ibid.ag () gmail ! com
Date: 2014-03-19 15:46:43
Message-ID: 20140319154642.GA1812 () Caracal
[Download RAW message or body]
On Tue, Mar 18, 2014 at 10:15:21PM +0100, Harald Becker wrote:
> Hi Mike !
>
> On 18-03-2014 15:12 Mike Dean <mdean@emacinc.com> wrote:
> ># Put your ntp nameservers here
>
> To clarify: It's not a name server, it's a time server (NTP =
> network time protocol).
>
> ... and what makes it difficult to write such things in a file,
> use an sed filter to read that config into a script variable,
> then use the arguments from variable when invoking Busybox ntpd?
>
> With some clever sed rules you can filter out empty lines and
> comments, pick lines which start with "timeserver" then add the
> required "-p" parameter prefix to any such lines
Here's what that sed could look like:
[ -e /etc/ntp.conf ] && NTP_SERVERS="`sed -ne 's/#.*//' -e 's/^timeserver/-p/p'`"
Just saying this because it's not even clever.
HTH,
Isaac Dunham
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic