1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-29 12:02:04 +02:00
openwrt-xburst/package/base-files/files/etc
jow cff1bc811e enable ntpd server for busybox
hi

Another version, in this one the enable_server option is in the timeserver ntp part of the "system" config file
You can patch trunk and bacfire (tested both)
You can put busybox ntpd in client mode (if you put server), in client & server (by putting enable_server to 1, ntpd listen to udp 123), and also in server mode only (if you didn't put any servers in the config and still put enable_server 1,  ntpd will answer with the time of the router)

I've replaced "config_foreach getpeers timeserver" with "config_get peers ntp server" because we want ntp timeserver, not random ones (to pre-answer if someone want to say that it's intrusive ...)

 Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>

Le 27/03/2012 20:41, Etienne Champetier a écrit :
> I've now tested my trunk patch and it works fine
> But I still can't find were $PROG is defined (is this a mistake, or some sort of built in variable???)
> (I've made some grep and nothing)
>
> Le 23/03/2012 02:19, Philip Prindeville a écrit :
>> Maybe:
>>
>> [ -n "$PROG" -a -x "$PROG" ] || return 1
>>
>> instead?
>>
>>
>> On 3/22/12 4:34 PM, Etienne Champetier wrote:
>>> Hi
>>>
>>> The 2 attached patchs (trunk & bacfire) add busybox ntpd enable_server option, as busybox ntpd server is compiled by default.
>>> We only need 1 client/server daemon (olipro patch was launching 2 daemons)
>>> I've fully tested the bacfire patch, and as i don't have a running openwrt trunk i'm not sure for the trunk patch (i'm sure about my modifications, but i'm not sure about "[ -x $PROG ] || return 1", as "$PROG" isn't defined ?!)
>>>
>>> Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>
>>>
>>>
>>> Le 16/01/2012 01:57, Philip Prindeville a écrit :
>>>> On 1/14/12 11:37 AM, Olipro wrote:
>>>>> On Saturday 14 Jan 2012 02:45:59 Philip Prindeville wrote:
>>>>>> Don't we already have a 'disabled' option?  Now we're adding an
>>>>>> 'enable_server' option?
>>>>>>
>>>>>> That seems confusing for no useful reason.
>>>>>>
>>>>> have you bothered to read what I originally wrote? your response would make
>>>>> me inclined to believe that you didn't.
>>>>>
>>>>> currently the ntpd initscript only runs it as a CLIENT - this patch enables
>>>>> you to have one instance running as a client and another as a SERVER that
>>>>> other hosts can synchronise with.
>>>>>
>>>>> Or perhaps I'm misunderstanding, what would you propose for allowing the
>>>>> built-in busybox ntpd to be utilised as a server? a separate init script
>>>>> entirely perhaps?
>>>> Or separate config sections... instead of 'config ntp' have 'config ntp-server' and 'config ntp-client'.
>>>>
>>>> -Philip
>>>>
>>>>
>>>> _______________________________________________
>>>> openwrt-devel mailing list
>>>> openwrt-devel@lists.openwrt.org
>>>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31374 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-04-20 15:05:38 +00:00
..
config enable ntpd server for busybox 2012-04-20 15:05:38 +00:00
hotplug.d [package] base-files: remove rdate integration, add busybox ntpd init script and server list in /etc/config/system 2011-10-27 00:21:53 +00:00
init.d enable ntpd server for busybox 2012-04-20 15:05:38 +00:00
uci-defaults [package] base-files: add a uci-defaults script which will migrate the root password to /etc/shadow if needed 2012-01-22 22:25:42 +00:00
banner [package] base-files: reformat banner to better work with varying version string lengths, do not set image options if menu is disabled (#11280) 2012-04-15 15:21:55 +00:00
diag.sh [package] base-files: make diag.sh stub working in bash 2009-04-30 21:00:57 +00:00
functions.sh package/base-files: move /etc/functions.sh to /lib/functions.sh 2011-11-08 14:14:29 +00:00
group base-files: add an ftp group as well 2011-03-13 19:04:32 +00:00
hosts base_files: Remove . from end of localhost entry 2010-08-06 08:00:40 +00:00
hotplug2-common.rules base-files: process platform hotplug calls in the early launch of hotplug2 to avoid having crda calls get stuck at boot time (fixes #10350, #10354) 2011-11-05 17:16:01 +00:00
hotplug2-init.rules [package] hotplug2: Use stricter matching for rule regular expressions 2011-02-01 16:37:53 +00:00
inittab [base-files]: nuke another 2.4 skeleton 2011-11-10 13:39:06 +00:00
openwrt_release [buildroot] include, base-files, opkg: introduce version configuration to override the embedded version info of generated images 2012-04-12 17:31:16 +00:00
openwrt_version [buildroot] include, base-files, opkg: introduce version configuration to override the embedded version info of generated images 2012-04-12 17:31:16 +00:00
passwd [package] base-files: prime root password with "x" to notify programs that there is a shadow record, fix /bin/login.sh password detection accordingly. 2011-11-14 19:02:01 +00:00
preinit [package] base-files: preinit: Fixed sourcing of diag.sh in /etc/preinit. This caused errors due to frequent use of /proc/cpuinfo to determine board name to pick led layout. Now diag.sh (which only defines set_state and any helper functions) is sourced by a proper preinit function during preinit_main, which is after /proc has been brought up, unlike in /etc/preinit 2011-07-07 02:52:02 +00:00
profile [package] base-files: fix arp() procedure to properly detect /usr/bin/arp 2011-08-12 14:34:39 +00:00
protocols rename default/ to files/ 2006-11-22 23:30:57 +00:00
rc.common base-files: split service related functions off to /lib/functions/service.sh 2012-03-20 14:29:50 +00:00
rc.local [package] base-files: introduce a ready-to-use /etc/rc.local to let users run custom commands on init without creating custom init scripts 2009-09-11 21:35:03 +00:00
services Add munin to /etc/services 2012-03-18 19:41:57 +00:00
shells rename default/ to files/ 2006-11-22 23:30:57 +00:00
sysctl.conf [package] base-files: enable conntrack accounting in sysctl. It used to be a compile time option which got deprecated 2012-03-04 14:53:17 +00:00
sysupgrade.conf [package] base-files: 2010-10-05 19:24:12 +00:00