On Tue, Mar 18, 2014 at 10:15:21PM +0100, Harald Becker wrote: > Hi Mike ! > > On 18-03-2014 15:12 Mike Dean <md...@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