[type/__interface] Add --onchange parameter

This commit is contained in:
Dennis Camera 2020-06-24 13:38:51 +02:00
parent c83f90ed2c
commit be59047488
4 changed files with 18 additions and 0 deletions

View file

@ -92,6 +92,11 @@ then
set -- "$@" --comment "$(cat "${__object}/parameter/comment")"
fi
if test -s "${__object}/parameter/onchange"
then
set -- "$@" --onchange "$(cat "${__object}/parameter/onchange")"
fi
if test -s "${__object}/parameter/extra-config"
then
while read -r _opt

View file

@ -57,6 +57,17 @@ extra-config
Using this option makes the configuration non-portable to other backends.
If this option is used extensively, it is recommended to use the respective
backend type directly.
onchange
The action to perform if the interface configuration has changed.
Available options are:
leave (default)
Do nothing.
up
Bring the interface up if it is down.
down
Bring the interface down if it is up.
refresh
Refresh the interface (down && up).
BOOLEAN PARAMETERS

View file

@ -0,0 +1 @@
leave

View file

@ -3,5 +3,6 @@ comment
gateway
name
netmask
onchange
state
type