diff --git a/type/__bird_radv/man.rst b/type/__bird_radv/man.rst index 118fd60..819b213 100644 --- a/type/__bird_radv/man.rst +++ b/type/__bird_radv/man.rst @@ -15,12 +15,17 @@ autoconfigure IPv6 hosts, this type is a rudimentary implementation to generate configuration for Bird to do so. -REQUIRED MULTIPLE PARAMETERS ----------------------------- +REQUIRED PARAMETERS +------------------- interface The interfaces to activate the protocol on. RAs will be sent using the prefixes configured on these interfaces. +OPTIONAL PARAMETERS +------------------- +mtu + An optional MTU setting to include in the router advertisements. + OPTIONAL MULTIPLE PARAMETERS ---------------------------- @@ -41,6 +46,7 @@ EXAMPLES __bird_radv datacenter \ --interface eth1 \ + --mtu 9000 \ --route ::/0 \ --ns 2001:DB8:cafe::4 \ --ns 2001:DB8:cafe::14 \ diff --git a/type/__bird_radv/manifest b/type/__bird_radv/manifest index a95e88e..aee8690 100755 --- a/type/__bird_radv/manifest +++ b/type/__bird_radv/manifest @@ -55,6 +55,12 @@ then DNSSL=$(sed -e 's/^/\tdnssl "/' -e 's/$/";/' "${__object:?}/parameter/dnssl") fi +MTU= +if [ -f "${__object:?}/parameter/mtu" ]; +then + MTU="link mtu $(cat "${__object:?}/parameter/mtu")" +fi + __file "${confdir:?}/radv-${__object_id:?}.conf" \ --mode 0640 --owner root --group bird \ --source - << EOF @@ -71,7 +77,9 @@ protocol radv ${__object_id:?} { propagate routes ${have_routes:?}; ipv6 { table radv_routes; export all; }; -$(sed -e 's/^/\tinterface "/' -e 's/$/";/' "${__object:?}/parameter/interface") + interface "$(cat "${__object:?}/parameter/interface")" { + $MTU + }; $RDNS diff --git a/type/__bird_radv/parameter/optional b/type/__bird_radv/parameter/optional new file mode 100644 index 0000000..ee48c5c --- /dev/null +++ b/type/__bird_radv/parameter/optional @@ -0,0 +1 @@ +mtu diff --git a/type/__bird_radv/parameter/required_multiple b/type/__bird_radv/parameter/required similarity index 100% rename from type/__bird_radv/parameter/required_multiple rename to type/__bird_radv/parameter/required diff --git a/type/__systemd_network/gencode-remote b/type/__systemd_network/gencode-remote index af16ca6..13c16c9 100755 --- a/type/__systemd_network/gencode-remote +++ b/type/__systemd_network/gencode-remote @@ -17,4 +17,4 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . -systemctl enable systemd-networkd +echo "systemctl enable systemd-networkd" diff --git a/type/__systemd_network/manifest b/type/__systemd_network/manifest index a2c1805..49eb792 100755 --- a/type/__systemd_network/manifest +++ b/type/__systemd_network/manifest @@ -35,6 +35,7 @@ esac # sections in the same order as they are in the manpage. This will make hacking # and maintaining this type much easier. +mkdir "${__object:?}/files" output_file="${__object:?}/files/${__object_id:?}.network" cat << EOF > "$output_file" @@ -81,4 +82,5 @@ then fi __file "/etc/systemd/network/${__object_id:?}.network" \ - --source "$output_file" + --source "$output_file" \ + --mode 0644