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:
parent
9898be1559
commit
111440216a
|
@ -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/"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
bundle
|
|
@ -0,0 +1 @@
|
|||
bundle
|
|
@ -0,0 +1 @@
|
|||
logger.dbus
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/execlineb -P
|
||||
export DIR /run/dbus
|
||||
|
||||
/usr/libexec/nnd/s6/dir
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
logger.irqbalance
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
longrun
|
|
@ -0,0 +1 @@
|
|||
dbus
|
|
@ -0,0 +1 @@
|
|||
3
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/execlineb -P
|
||||
export NAME dbus
|
||||
|
||||
/usr/libexec/nnd/s6/logger
|
|
@ -0,0 +1 @@
|
|||
longrun
|
|
@ -0,0 +1 @@
|
|||
irqbalance
|
|
@ -0,0 +1 @@
|
|||
3
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/execlineb -P
|
||||
export NAME irqbalance
|
||||
|
||||
/usr/libexec/nnd/s6/logger
|
|
@ -0,0 +1 @@
|
|||
longrun
|
|
@ -0,0 +1 @@
|
|||
prometheus-node-exporter
|
|
@ -0,0 +1 @@
|
|||
3
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/execlineb -P
|
||||
export NAME prometheus-node-exporter
|
||||
|
||||
/usr/libexec/nnd/s6/logger
|
|
@ -0,0 +1 @@
|
|||
longrun
|
|
@ -0,0 +1 @@
|
|||
seatd
|
|
@ -0,0 +1 @@
|
|||
3
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/execlineb -P
|
||||
export NAME seatd
|
||||
|
||||
/usr/libexec/nnd/s6/logger
|
|
@ -0,0 +1 @@
|
|||
longrun
|
|
@ -1 +1 @@
|
|||
udhcpc.br0
|
||||
interface.br0.dhcp
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
logger.prometheus-node-exporter
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
longrun
|
|
@ -0,0 +1 @@
|
|||
3
|
|
@ -0,0 +1 @@
|
|||
logger.seatd
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
longrun
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/execlineb -P
|
||||
export VAL 0
|
||||
export SYSCTL dev/tty/legacy_tiocsti
|
||||
/usr/libexec/nnd/sysctl
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
|
@ -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
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/execlineb -P
|
||||
export VAL 0
|
||||
export SYSCTL net/ipv4/ip_unprivileged_port_start
|
||||
/usr/libexec/nnd/sysctl
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
|
@ -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
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/execlineb -P
|
||||
export VAL 0
|
||||
export SYSCTL vm/overcommit_memory
|
||||
/usr/libexec/nnd/sysctl
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
|
@ -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
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/execlineb -P
|
||||
export VAL 0
|
||||
export SYSCTL vm/overcommit_ratio
|
||||
/usr/libexec/nnd/sysctl
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue