Re: [OpenWrt-Devel] [PATCH 1/1] use NTP server received via DHCP

2016-01-15 Thread Bastian Bittorf
* Amine Aouled Hamed [15.01.2016 10:03]: > > please make var 'iface' local and while you are there, move > > all the 'local' declaration to the head of the function. > > Wouldn't be better if the local vars inside of the if and for statements > stay inside? maybe thats

Re: [OpenWrt-Devel] [PATCH 1/1] use NTP server received via DHCP

2016-01-15 Thread Amine Aouled Hamed
> > please make var 'iface' local and while you are there, move > all the 'local' declaration to the head of the function. Wouldn't be better if the local vars inside of the if and for statements stay inside? I mean what is the point of declaring ifaces if I will be using all the ifaces? in term

Re: [OpenWrt-Devel] [PATCH 1/1] use NTP server received via DHCP

2016-01-14 Thread Bastian Bittorf
* amine ahd [14.01.2016 10:29]: thank you, patch applies... > start_service() { > - local server enabled enable_server peer > + local server enabled enable_server peer ntpservers > + local use_dhcp="$(uci -q get system.ntp.use_dhcp)" > >

[OpenWrt-Devel] [PATCH 1/1] use NTP server received via DHCP

2016-01-14 Thread amine ahd
--- package/utils/busybox/Makefile | 3 ++ package/utils/busybox/files/sysntpd | 30 ++-- package/utils/busybox/files/sysntpd.hotplug | 53 + 3 files changed, 83 insertions(+), 3 deletions(-) create mode 100644

Re: [OpenWrt-Devel] [PATCH 1/1] use NTP server received via DHCP

2016-01-13 Thread Amine Aouled Hamed
Apologies, I was working with an old fork of Openwrt. another version (hopefully the last) will be sent soon. Regards, Amine. On Tue, Jan 12, 2016 at 10:20 AM, Bastian Bittorf wrote: > * amine ahd [12.01.2016 10:08]: > > --- > >

[OpenWrt-Devel] [PATCH 1/1] use NTP server received via DHCP

2016-01-12 Thread amine ahd
--- package/utils/busybox/Makefile | 3 ++ package/utils/busybox/files/sysntpd| 26 ++- package/utils/busybox/files/sysntpd.hotplug| 53 ++ 3 files changed, 80 insertions(+), 2 deletions(-) create mode 100755

Re: [OpenWrt-Devel] [PATCH 1/1] use NTP server received via DHCP

2016-01-12 Thread Bastian Bittorf
* amine ahd [12.01.2016 10:08]: > + [ "$use_dhcp" = 1 ] && { > + if [ -z "$dhcp_ifaces" ]; then > + local dump=$(ubus call network.interface dump) > + ntpservers=$(jsonfilter -s "$dump" -e >

Re: [OpenWrt-Devel] [PATCH 1/1] use NTP server received via DHCP

2016-01-12 Thread Bastian Bittorf
* amine ahd [12.01.2016 10:08]: > --- > package/utils/busybox/Makefile | 3 ++ > package/utils/busybox/files/sysntpd| 26 ++- > package/utils/busybox/files/sysntpd.hotplug| 53 ++ > 3 files changed, 80 insertions(+), 2

Re: [OpenWrt-Devel] [PATCH 1/1] use NTP server received via DHCP

2016-01-07 Thread Bastian Bittorf
* amine ahd [07.01.2016 19:41]: > --- > package/utils/busybox/Makefile | 3 ++ > package/utils/busybox/files/sysntpd| 28 +++- > .../package/utils/busybox/files/sysntpd.hotplug| 53 > ++ the path for "sysntpd.hotplug" is