[type/__interface] Add --onchange parameter
This commit is contained in:
parent
c83f90ed2c
commit
be59047488
4 changed files with 18 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
1
cdist/conf/type/__interface/parameter/default/onchange
Normal file
1
cdist/conf/type/__interface/parameter/default/onchange
Normal file
|
@ -0,0 +1 @@
|
|||
leave
|
|
@ -3,5 +3,6 @@ comment
|
|||
gateway
|
||||
name
|
||||
netmask
|
||||
onchange
|
||||
state
|
||||
type
|
||||
|
|
Loading…
Reference in a new issue