Many misc changes

- dbus and seatd in preparation for freedesktop standard sessions
- sysctl bundles for commonly set defaults
- binfmt bundle for binfmt_misc translations
- usage of s6-netdev scripts for networks
- irqbanace for lower latencies
- prometheus-node-exporter for monitoring
This commit is contained in:
Alex D. 2023-11-22 07:21:33 +00:00
parent 9898be1559
commit 111440216a
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
80 changed files with 153 additions and 11 deletions

View File

@ -3,8 +3,8 @@
. ../../APKBUILD.template
pkgname=nnd-s6-services
pkgver=2.56
pkgrel=0
pkgver=2.60
pkgrel=3
pkgdesc="Base services for s6"
depends="s6-rc s6-portable-utils s6-linux-utils"
builddir="$srcdir/"

View File

@ -0,0 +1 @@
bundle

View File

@ -0,0 +1 @@
bundle

View File

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

View File

@ -0,0 +1,7 @@
#!/bin/execlineb -P
s6-envdir -i /etc/s6/env/path
emptyenv -p
fdmove -c 2 1
dbus-daemon --system --nopidfile --nosyslog --nofork

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1,4 @@
#!/bin/execlineb -P
export DIR /run/dbus
/usr/libexec/nnd/s6/dir

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1,14 @@
#!/bin/execlineb -P
define GROUP seat
s6-envdir -i /etc/s6/env/path
emptyenv -p
ifelse -n {
# Silence output
redirfd -w 1 /dev/null
fdmove -c 2 1
id -g $GROUP
} {
addgroup $GROUP
} true

View File

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

View File

@ -0,0 +1,10 @@
#!/bin/execlineb -P
s6-envdir -I /etc/s6/env/irqbalance
importas -D 10 INTERVAL INTERVAL
s6-envdir -i /etc/s6/env/path
emptyenv -p
fdmove -c 2 1
irqbalance -fd -t $INTERVAL

View File

@ -0,0 +1 @@
longrun

View File

@ -0,0 +1 @@
dbus

View File

@ -0,0 +1 @@
3

View File

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

View File

@ -0,0 +1 @@
longrun

View File

@ -0,0 +1 @@
irqbalance

View File

@ -0,0 +1 @@
3

View File

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

View File

@ -0,0 +1 @@
longrun

View File

@ -0,0 +1 @@
prometheus-node-exporter

View File

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

View File

@ -0,0 +1 @@
longrun

View File

@ -0,0 +1 @@
seatd

View File

@ -0,0 +1 @@
3

View File

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

View File

@ -0,0 +1 @@
longrun

View File

@ -1 +1 @@
udhcpc.br0
interface.br0.dhcp

View File

@ -0,0 +1 @@
logger.prometheus-node-exporter

View File

@ -0,0 +1,7 @@
#!/bin/execlineb -P
s6-envdir -i /etc/s6/env/path
emptyenv -p
fdmove -c 2 1
node_exporter --web.listen-address=:9100 --collector.tcpstat --collector.processes --collector.mountstats

View File

@ -0,0 +1 @@
longrun

View File

@ -0,0 +1 @@
3

View File

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

View File

@ -1,9 +1,7 @@
#!/bin/execlineb -P
define INTERFACE br0
s6-envdir -i /etc/s6/env/path
emptyenv -p
fdmove -c 2 1
udhcpc -i $INTERFACE -f -S
seatd -n 3 -u seat -g seat

View File

@ -0,0 +1 @@
longrun

View File

@ -0,0 +1,4 @@
#!/bin/execlineb -P
export VAL 0
export SYSCTL dev/tty/legacy_tiocsti
/usr/libexec/nnd/sysctl

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1,6 @@
#!/bin/execlineb -P
export VAL 0
s6-envdir -I /etc/s6/env/sysctl.dev-tty-legacy_tiocsti
export SYSCTL dev/tty/legacy_tiocsti
/usr/libexec/nnd/s6/sysctl

View File

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

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1,6 @@
#!/bin/execlineb -P
export VAL 0
s6-envdir -I /etc/s6/env/sysctl.net-ipv4-ip_unprivileged_port_start
export SYSCTL net/ipv4/ip_unprivileged_port_start
/usr/libexec/nnd/s6/sysctl

View File

@ -0,0 +1,4 @@
#!/bin/execlineb -P
export VAL 0
export SYSCTL vm/overcommit_memory
/usr/libexec/nnd/sysctl

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1,6 @@
#!/bin/execlineb -P
export VAL 2
s6-envdir -I /etc/s6/env/sysctl.vm-overcommit_memory
export SYSCTL vm/overcommit_memory
/usr/libexec/nnd/s6/sysctl

View File

@ -0,0 +1,4 @@
#!/bin/execlineb -P
export VAL 0
export SYSCTL vm/overcommit_ratio
/usr/libexec/nnd/sysctl

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1,6 @@
#!/bin/execlineb -P
export VAL 95
s6-envdir -I /etc/s6/env/sysctl.vm-overcommit_ratio
export SYSCTL vm/overcommit_ratio
/usr/libexec/nnd/s6/sysctl

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1,15 @@
#!/bin/execlineb -P
define SHELL /sbin/nologin
define USER seat
s6-envdir -i /etc/s6/env/path
emptyenv -p
ifelse -n {
# Silence output
redirfd -w 1 /dev/null
fdmove -c 2 1
id -u $USER
} {
adduser -s $SHELL -H -D $USER
} true

View File

@ -5,9 +5,11 @@ define USER sshd
s6-envdir -i /etc/s6/env/path
emptyenv -p
# TODO: Handle user already being present
foreground {
ifelse -n {
# Silence output
fdmove -c 2 1
redirfd -w 1 /dev/null
id -u $USER
} {
adduser -s $SHELL -H -D $USER
} if -nt {
importas status ? test $status -eq 1
}
} true