[__bird_radv] add --default-lifetime parameter
This commit is contained in:
parent
f101ea4afa
commit
f01f110463
3 changed files with 13 additions and 0 deletions
|
@ -34,6 +34,11 @@ route-preference
|
||||||
This option specifies the default value of advertised route preference for
|
This option specifies the default value of advertised route preference for
|
||||||
specific routes. Default: medium.
|
specific routes. Default: medium.
|
||||||
|
|
||||||
|
default-lifetime
|
||||||
|
This option specifies the time (in seconds) how long (since the receipt of RA)
|
||||||
|
hosts may use the router as a default router. 0 means do not use as a default
|
||||||
|
router. Default: 3.
|
||||||
|
|
||||||
OPTIONAL MULTIPLE PARAMETERS
|
OPTIONAL MULTIPLE PARAMETERS
|
||||||
----------------------------
|
----------------------------
|
||||||
route
|
route
|
||||||
|
|
|
@ -73,6 +73,12 @@ then
|
||||||
ROUTE_PREFERENCE="route preference $(cat "${__object:?}/parameter/route-preference");"
|
ROUTE_PREFERENCE="route preference $(cat "${__object:?}/parameter/route-preference");"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
DEFAULT_LIFETIME=
|
||||||
|
if [ -f "${__object:?}/parameter/default-lifetime" ];
|
||||||
|
then
|
||||||
|
DEFAULT_LIFETIME="default lifetime $(cat "${__object:?}/parameter/default-lifetime");"
|
||||||
|
fi
|
||||||
|
|
||||||
__file "${confdir:?}/radv-${__object_id:?}.conf" \
|
__file "${confdir:?}/radv-${__object_id:?}.conf" \
|
||||||
--mode 0640 --owner root --group bird \
|
--mode 0640 --owner root --group bird \
|
||||||
--source - << EOF
|
--source - << EOF
|
||||||
|
@ -91,6 +97,7 @@ protocol radv ${__object_id:?} {
|
||||||
|
|
||||||
interface "$(cat "${__object:?}/parameter/interface")" {
|
interface "$(cat "${__object:?}/parameter/interface")" {
|
||||||
$MTU
|
$MTU
|
||||||
|
$DEFAULT_LIFETIME
|
||||||
$DEFAULT_PREFERENCE
|
$DEFAULT_PREFERENCE
|
||||||
$ROUTE_PREFERENCE
|
$ROUTE_PREFERENCE
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
mtu
|
mtu
|
||||||
default-preference
|
default-preference
|
||||||
route-preference
|
route-preference
|
||||||
|
default-lifetime
|
||||||
|
|
Loading…
Reference in a new issue