[OpenWrt-Devel] [PATCH 1/1] netifd: add pre-up/down post-up/down callback handling
fe at dev.tdt.de
Fri Mar 20 10:21:00 EDT 2020
>> With this change we can decide if this is a user interaction with
>> 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
>> Signed-off-by: Florian Eckert <fe at dev.tdt.de>
> netifd already tracks for every interface if the user requested it to
> 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
on boot anymore. I have to start this manual. So I think this is not an
> Is it enough for your use case to track that flag?
As far as I can tell at this point, it's not an option to use this flag.
> If not, please go into more detail, because I don't think hacking
In the LuCI and in the CLI the command ifup/ifdown is used, if the
user wants to start/stop this interface explicitly manual.
The auto option is not touched.
The ifup/ifdown script executes an ubus call to set the interface
After the execution is preformed by netifd (proto) then the hotplug
execute with different ACTION (up/down/ifup-failed.
If I want to know if the Command is execute by an
user interaction by the CLI (ifup/ifdown) or LuCI  the only
I have is to hook into the ifup/ifdown command.
I would also like to point out that debian also has this possibility 
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel