[OpenWrt-Devel] [PATCH] use NTP server received via DHCP
Felix Fietkau
nbd at openwrt.org
Thu Jan 7 13:19:13 EST 2016
On 2015-12-30 14:14, Yousong Zhou wrote:
> Hi,
>
> On 30 December 2015 at 20:12, Amine Aouled Hamed <amine.ahd at gmail.com> wrote:
>>
>> Hi,
>> Can you elaborate more on why you prefer uci state? I am just starting with OpenWRT and the first thing I found was procd.
>>
>
> Most of it is really just personal preference. I prefer uci because
> it can provide more structured access/manipulation of the state, e.g.
>
> - disable those ntpservers on interface down
> - when it comes to ntpservers from multiple dhcp interfaces
> - the state can be easily checked with uci command if something went wrong
>
> These can of course also be done with procd data, but uci is already there...
Here's some context for why we stopped using uci state:
Mixing configuration with a state overlay can easily get very messy,
especially when the config changes - it's just too easy for namespace
collisions to creep in.
Cleanup is also difficult when there's no clear separation of which
script is responsible for which part of the state overlay.
Using procd data has the advantange that the state is tied to the
running state of the service. If the service dies or is restarted, its
state is automatically cleaned up too.
- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list