__bird_static: update to use channel
param instead of ipv4
switch.
This commit is contained in:
parent
42a44ffed6
commit
cbc91a500f
4 changed files with 7 additions and 12 deletions
|
@ -13,12 +13,7 @@ printf "protocol static %s {\n" "${__object_id:?}"
|
||||||
[ -n "${description?}" ] && printf "\tdescription \"%s\";\n" "${description:?}"
|
[ -n "${description?}" ] && printf "\tdescription \"%s\";\n" "${description:?}"
|
||||||
|
|
||||||
# Channel choice
|
# Channel choice
|
||||||
if [ -f "${__object:?}/parameter/ipv4" ];
|
printf "%s;\n" "$(cat "${__object:?}/parameter/channel")"
|
||||||
then
|
|
||||||
printf "\tipv4;\n"
|
|
||||||
else
|
|
||||||
printf "\tipv6;\n"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Routes
|
# Routes
|
||||||
while read -r route
|
while read -r route
|
||||||
|
|
|
@ -16,6 +16,11 @@ used unless the `ipv4` flag is passed. This type **expects** to depend on the
|
||||||
`cdist-type__bird_core(7)` type.
|
`cdist-type__bird_core(7)` type.
|
||||||
|
|
||||||
|
|
||||||
|
REQUIRED PARAMETERS
|
||||||
|
-------------------
|
||||||
|
channel
|
||||||
|
The channel to use between the protocol and the table.
|
||||||
|
|
||||||
REQUIRED MULTIPLE PARAMETERS
|
REQUIRED MULTIPLE PARAMETERS
|
||||||
----------------------------
|
----------------------------
|
||||||
route
|
route
|
||||||
|
@ -28,11 +33,6 @@ OPTIONAL PARAMETERS
|
||||||
description
|
description
|
||||||
An instance desciption to be printed when `birdc show protocols` is called.
|
An instance desciption to be printed when `birdc show protocols` is called.
|
||||||
|
|
||||||
BOOLEAN PARAMETERS
|
|
||||||
------------------
|
|
||||||
ipv4
|
|
||||||
Use the ipv4 channel instead of the default ipv6 one.
|
|
||||||
|
|
||||||
|
|
||||||
EXAMPLES
|
EXAMPLES
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
ipv4
|
|
1
type/__bird_static/parameter/required
Normal file
1
type/__bird_static/parameter/required
Normal file
|
@ -0,0 +1 @@
|
||||||
|
channel
|
Loading…
Reference in a new issue