was trying to understand the "option trigger" syntax in /etc/config/stubby since my need would be to get it work with 2 interface (one is wan and the other is called h3g).
I've tried to state the option 2 times
option trigger 'wan'
option trigger 'h3g'
or
option trigger 'wan h3g'
or to use comma
option trigger 'wan, h3g'
but it doesn't seem to work.. it only works if i state only one interface..
any of you aware of correct syntax or if the config can work with 2 interface?
@AndrewZ thank you for your feedback but it does not work as intended for me. to be more specific:
case 1:
option trigger 'wan'
router reboot, wan gets connectivity stubby gets triggered and starts, clients connect and have full working connectivity. all good.
case 2:
option trigger 'h3g'
i disconnect ethernet cable from wan for testing, router reboot, i manually ifup h3g and gets connectivity stubby gets triggered and starts, clients connect and have full working connectivity. all good.
case3:
option trigger 'wan h3g'
i disconnect ethernet cable from wan for testing, router reboot i manually ifup h3g and gets connectivity stubby does NOT trigger and does NOT start, clients connect and have limited connectivity, no dns obviously. no good.
--
i did other test but it seems that the config is ignoring multiple interfaces, even is no errors are reported for bad configuration file. so my guess is that it is not intended to be triggered by multiple interfaces.
I have created one for the OpenWrt 21.02 branch and OpenWrt 19.07 as it's just a small modification to the init script. I've had running on my own router for a while, works fine.
I like the change, but not the implementation. Multiple values (space-separated) in an option seems like a throwback to ye olde ways. It's much more obvious to use a list of values:
Why not? Both ways are correct & supported. It's all about what you semantically prefer in your configuration file - this doesn't change a single bit in the implementation of the init script.
Yes, stubby doesn't have any LuCI front end app as far as I know. If a LuCI companion app is developed in the future, then it is likely the init script needs revisiting. Although as highlighted by @dibdot, it would appear the original init script itself was copied from 18.06 anyway.
stubby doesn't have any active maintainer either now, so if anyone wants to add to my PR or improve on it, please do so! This was more of small fix to allow multi WAN trigger support.