More templates and services

- Added VRF template
- Added routing services
	- bird
	- gortr
- Added more sysctls
- Migrated from brctl to iproute2
This commit is contained in:
Alex D. 2023-03-25 10:19:50 +00:00
parent 1836c92f38
commit 85180a63b8
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
57 changed files with 138 additions and 6 deletions

View File

@ -3,7 +3,7 @@
. ../../APKBUILD.template
pkgname=nnd-s6-services
pkgver=2.13
pkgver=2.15
pkgrel=0
pkgdesc="Base services for s6"
depends="s6-rc s6-portable-utils s6-linux-utils"

1
main/nnd-s6-services/env/bird/CONFIG vendored Normal file
View File

@ -0,0 +1 @@
/etc/bird/bird.conf

View File

@ -0,0 +1 @@
https://dn42.burble.com/roa/dn42_roa_46.json

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1 @@
10

View File

@ -0,0 +1 @@
logger.bird

View File

@ -0,0 +1,10 @@
#!/bin/execlineb -P
s6-envdir -i /etc/s6/env/bird
importas -i CONFIG CONFIG
s6-envdir -i /etc/s6/env/path
emptyenv -p
fdmove -c 2 1
bird -c $CONFIG -f

View File

@ -0,0 +1 @@
longrun

View File

@ -1,8 +1,7 @@
#!/bin/execlineb -P
define BRINFACE br0
define SLAVEIFACE eth0
s6-envdir -i /etc/s6/env/path
emptyenv -p
brctl delif $BRINFACE $SLAVEIFACE
ip link set dev $SLAVEIFACE nomaster

View File

@ -5,4 +5,4 @@ define SLAVEIFACE eth0
s6-envdir -i /etc/s6/env/path
emptyenv -p
brctl addif $BRINFACE $SLAVEIFACE
ip link set dev $SLAVEIFACE master $BRINFACE

View File

@ -4,4 +4,4 @@ define INTERFACE br0
s6-envdir -i /etc/s6/env/path
emptyenv -p
brctl delbr $INTERFACE
ip link del $INTERFACE

View File

@ -4,4 +4,4 @@ define INTERFACE br0
s6-envdir -i /etc/s6/env/path
emptyenv -p
brctl addbr $INTERFACE
ip link add name $INTERFACE type bridge

View File

@ -0,0 +1 @@
logger.gortr

View File

@ -0,0 +1,10 @@
#!/bin/execlineb -P
s6-envdir -i /etc/s6/env/gortr
importas -i ENDPOINT ENDPOINT
s6-envdir -i /etc/s6/env/path
emptyenv -p
fdmove -c 2 1
gortr -cache $ENDPOINT -refresh 60 -verify=false -checktime=false -bind [::1]:8082

View File

@ -0,0 +1 @@
longrun

View File

@ -0,0 +1 @@
bird

View File

@ -0,0 +1 @@
3

View File

@ -0,0 +1,4 @@
#!/bin/execlineb -P
export NAME bird
/usr/libexec/nnd/s6/logger

View File

@ -0,0 +1 @@
longrun

View File

@ -0,0 +1 @@
gortr

View File

@ -0,0 +1 @@
3

View File

@ -0,0 +1,4 @@
#!/bin/execlineb -P
export NAME gortr
/usr/libexec/nnd/s6/logger

View File

@ -0,0 +1 @@
longrun

View File

@ -0,0 +1,5 @@
#!/bin/execlineb -P
export SYSCTL net/ipv4/tcp_l3mdev_accept
export VAL 0
/usr/libexec/nnd/s6/sysctl

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1,5 @@
#!/bin/execlineb -P
s6-envdir -i /etc/s6/env/sysctl.net-ipv4.tcp_l3mdev_accept
export SYSCTL net/ipv4/tcp_l3mdev_accept
/usr/libexec/nnd/s6/sysctl

View File

@ -0,0 +1,5 @@
#!/bin/execlineb -P
export SYSCTL net/ipv4/udp_l3mdev_accept
export VAL 0
/usr/libexec/nnd/s6/sysctl

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1,5 @@
#!/bin/execlineb -P
s6-envdir -i /etc/s6/env/sysctl.net-ipv4.udp_l3mdev_accept
export SYSCTL net/ipv4/udp_l3mdev_accept
/usr/libexec/nnd/s6/sysctl

View File

@ -0,0 +1,6 @@
#!/bin/execlineb -P
export SYSCTL net/ipv6/conf/all/keep_addr_on_down
export VAL 0
/usr/libexec/nnd/s6/sysctl

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1,6 @@
#!/bin/execlineb -P
export SYSCTL net/ipv6/conf/all/keep_addr_on_down
s6-envdir -i /etc/s6/env/sysctl.net-ipv6-conf-all-keep_addr_on_down
/usr/libexec/nnd/s6/sysctl

View File

@ -0,0 +1,7 @@
#!/bin/execlineb -P
define INTERFACE vrf-mynet
s6-envdir -i /etc/s6/env/path
emptyenv -p
ip link set dev $INTERFACE down

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1,7 @@
#!/bin/execlineb -P
define INTERFACE vrf-mynet
s6-envdir -i /etc/s6/env/path
emptyenv -p
ip link set dev $INTERFACE up

View File

@ -0,0 +1,10 @@
#!/bin/execlineb -P
define INTERFACE vrf-mynet
s6-envdir -i /etc/s6/env/vrf.${INTERFACE}
importas -i TABLE TABLE
s6-envdir -i /etc/s6/env/path
emptyenv -p
ip -6 route del default dev $INTERFACE table $TABLE

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1,10 @@
#!/bin/execlineb -P
define INTERFACE vrf-mynet
s6-envdir -i /etc/s6/env/vrf.${INTERFACE}
importas -i TABLE TABLE
s6-envdir -i /etc/s6/env/path
emptyenv -p
ip -6 route add unreachable default metric 4278198272 table $TABLE

View File

@ -0,0 +1,7 @@
#!/bin/execlineb -P
define INTERFACE vrf-mynet
s6-envdir -i /etc/s6/env/path
emptyenv -p
ip -6 link del $INTERFACE

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1,10 @@
#!/bin/execlineb -P
define INTERFACE vrf-mynet
s6-envdir -i /etc/s6/env/vrf.${INTERFACE}
importas -i TABLE TABLE
s6-envdir -i /etc/s6/env/path
emptyenv -p
ip -6 link add $INTERFACE type vrf table $TABLE