[OpenWrt-Devel] [PATCH 1/1] netifd: add pre-up/down post-up/down callback handling

Felix Fietkau nbd at nbd.name
Fri Mar 20 10:59:53 EDT 2020

On 2020-03-20 15:21, Florian Eckert wrote:
> network
>>> With this change we can decide if this is a user interaction with 
>>> CLI/LuCI,
>>> because with the new callback mechanism I can set/delete a uci config 
>>> flag so
>>> that the connection should really disconnected. And so does not 
>>> restart on a
>>> failed connetion tracking again because the uci config flag is not 
>>> set.
>>> Signed-off-by: Florian Eckert <fe at dev.tdt.de>
>> netifd already tracks for every interface if the user requested it to 
>> be
>> enabled or not via the 'autostart' flag, which you can query via ubus.
> I know this is done wit the uci option auto for this interface.
> But if I disable this flag, then on the next boot this interface does 
> not start
> on boot anymore. I have to start this manual. So I think this is not an 
> option.
No, I'm talking about the internal per-interface 'autostart' variable,
which gets set to false if the user does a manual ifdown of an interface
(but not if it just failed to start up).
It's not backed by configuration and you can query it via ubus.
(e.g. ifstatus wan)

- Felix

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list