commit 31b7898d0cdaba2df0ab4f277affbb9bb40c6ae3 Author: Nathan Fisher Date: Tue Oct 4 14:17:35 2022 +0000 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..144f5d1 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +These are s6 compatible service definitions for HitchHiker linux. Edit to match your +actual setup, drop them into /etc/s6/sv and then rebuild the service database with +the `s6-rc-compile` program. +```Sh +s6-rc-compile /tmp/my-bundle /etc/s6/sv +``` diff --git a/sv/dbus-log/consumer-for b/sv/dbus-log/consumer-for new file mode 100644 index 0000000..3821a13 --- /dev/null +++ b/sv/dbus-log/consumer-for @@ -0,0 +1 @@ +dbus-srv diff --git a/sv/dbus-log/notification-fd b/sv/dbus-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/sv/dbus-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/sv/dbus-log/pipeline-name b/sv/dbus-log/pipeline-name new file mode 100644 index 0000000..e2182f1 --- /dev/null +++ b/sv/dbus-log/pipeline-name @@ -0,0 +1 @@ +dbus diff --git a/sv/dbus-log/run b/sv/dbus-log/run new file mode 100644 index 0000000..b0775c6 --- /dev/null +++ b/sv/dbus-log/run @@ -0,0 +1,9 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/dbus.conf +importas -sCuD "n3 s2000000 T" DIRECTIVES DIRECTIVES +ifelse { test -w /var/log } { + foreground { install -d -o s6log -g s6log /var/log/dbus } + s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/dbus +} +foreground { install -d -o s6log -g s6log /run/log/dbus } +s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/dbus diff --git a/sv/dbus-log/timeout-down b/sv/dbus-log/timeout-down new file mode 100644 index 0000000..573541a --- /dev/null +++ b/sv/dbus-log/timeout-down @@ -0,0 +1 @@ +0 diff --git a/sv/dbus-log/type b/sv/dbus-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/sv/dbus-log/type @@ -0,0 +1 @@ +longrun diff --git a/sv/dbus-srv/notification-fd b/sv/dbus-srv/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/sv/dbus-srv/notification-fd @@ -0,0 +1 @@ +3 diff --git a/sv/dbus-srv/producer-for b/sv/dbus-srv/producer-for new file mode 100644 index 0000000..7be2401 --- /dev/null +++ b/sv/dbus-srv/producer-for @@ -0,0 +1 @@ +dbus-log diff --git a/sv/dbus-srv/run b/sv/dbus-srv/run new file mode 100644 index 0000000..d4dc9b0 --- /dev/null +++ b/sv/dbus-srv/run @@ -0,0 +1,11 @@ +#!/bin/execlineb -P +foreground { /usr/pkg/bin/dbus-uuidgen --ensure=/etc/machine-id } +foreground { install -m755 -g 81 -o 81 -d /run/dbus } +foreground { + envfile /etc/s6/config/dbus.conf + importas -uD "no" DBUS_UUIDGEN DBUS_UUIDGEN + if { test ${DBUS_UUIDGEN} = "yes" } + redirfd -w 1 /etc/machine-id dbus-uuidgen +} +fdmove -c 2 1 +exec /usr/pkg/bin/dbus-daemon --system --nofork --nopidfile --print-pid=3 diff --git a/sv/dbus-srv/timeout-down b/sv/dbus-srv/timeout-down new file mode 100644 index 0000000..573541a --- /dev/null +++ b/sv/dbus-srv/timeout-down @@ -0,0 +1 @@ +0 diff --git a/sv/dbus-srv/type b/sv/dbus-srv/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/sv/dbus-srv/type @@ -0,0 +1 @@ +longrun diff --git a/sv/dhcpcd-log/consumer-for b/sv/dhcpcd-log/consumer-for new file mode 100644 index 0000000..a9ce984 --- /dev/null +++ b/sv/dhcpcd-log/consumer-for @@ -0,0 +1 @@ +dhcpcd-srv diff --git a/sv/dhcpcd-log/notification-fd b/sv/dhcpcd-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/sv/dhcpcd-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/sv/dhcpcd-log/pipeline-name b/sv/dhcpcd-log/pipeline-name new file mode 100644 index 0000000..43e0241 --- /dev/null +++ b/sv/dhcpcd-log/pipeline-name @@ -0,0 +1 @@ +dhcpcd diff --git a/sv/dhcpcd-log/run b/sv/dhcpcd-log/run new file mode 100644 index 0000000..30ec154 --- /dev/null +++ b/sv/dhcpcd-log/run @@ -0,0 +1,9 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/dhcpcd.conf +importas -sCuD "n3 s2000000 T" DIRECTIVES DIRECTIVES +ifelse { test -w /var/log } { + foreground { install -d -o s6log -g s6log /var/log/dhcpcd } + s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/dhcpcd +} +foreground { install -d -o s6log -g s6log /run/log/dhcpcd } +s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/dhcpcd diff --git a/sv/dhcpcd-log/timeout-down b/sv/dhcpcd-log/timeout-down new file mode 100644 index 0000000..573541a --- /dev/null +++ b/sv/dhcpcd-log/timeout-down @@ -0,0 +1 @@ +0 diff --git a/sv/dhcpcd-log/type b/sv/dhcpcd-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/sv/dhcpcd-log/type @@ -0,0 +1 @@ +longrun diff --git a/sv/dhcpcd-srv/dependencies.d/udevd b/sv/dhcpcd-srv/dependencies.d/udevd new file mode 100644 index 0000000..e69de29 diff --git a/sv/dhcpcd-srv/producer-for b/sv/dhcpcd-srv/producer-for new file mode 100644 index 0000000..a8b3dd1 --- /dev/null +++ b/sv/dhcpcd-srv/producer-for @@ -0,0 +1 @@ +dhcpcd-log diff --git a/sv/dhcpcd-srv/run b/sv/dhcpcd-srv/run new file mode 100644 index 0000000..786ab1b --- /dev/null +++ b/sv/dhcpcd-srv/run @@ -0,0 +1,3 @@ +#!/bin/execlineb -P +fdmove -c 2 1 +exec dhcpcd -B -M diff --git a/sv/dhcpcd-srv/timeout-down b/sv/dhcpcd-srv/timeout-down new file mode 100644 index 0000000..573541a --- /dev/null +++ b/sv/dhcpcd-srv/timeout-down @@ -0,0 +1 @@ +0 diff --git a/sv/dhcpcd-srv/timeout-kill b/sv/dhcpcd-srv/timeout-kill new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/sv/dhcpcd-srv/timeout-kill @@ -0,0 +1 @@ +10 diff --git a/sv/dhcpcd-srv/type b/sv/dhcpcd-srv/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/sv/dhcpcd-srv/type @@ -0,0 +1 @@ +longrun diff --git a/sv/gpm-log/consumer-for b/sv/gpm-log/consumer-for new file mode 100644 index 0000000..b5f45d8 --- /dev/null +++ b/sv/gpm-log/consumer-for @@ -0,0 +1 @@ +gpm-srv diff --git a/sv/gpm-log/notification-fd b/sv/gpm-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/sv/gpm-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/sv/gpm-log/pipeline-name b/sv/gpm-log/pipeline-name new file mode 100644 index 0000000..677418d --- /dev/null +++ b/sv/gpm-log/pipeline-name @@ -0,0 +1 @@ +gpm diff --git a/sv/gpm-log/run b/sv/gpm-log/run new file mode 100644 index 0000000..1bffafb --- /dev/null +++ b/sv/gpm-log/run @@ -0,0 +1,8 @@ +#!/bin/execlineb -P +importas -sCuD "n3 s2000000 T" DIRECTIVES DIRECTIVES +ifelse { test -w /var/log } { + foreground { install -d -o s6log -g s6log /var/log/gpm } + s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/gpm +} +foreground { install -d -o s6log -g s6log /run/log/gpm } +s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/gpm diff --git a/sv/gpm-log/timeout-down b/sv/gpm-log/timeout-down new file mode 100644 index 0000000..573541a --- /dev/null +++ b/sv/gpm-log/timeout-down @@ -0,0 +1 @@ +0 diff --git a/sv/gpm-log/type b/sv/gpm-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/sv/gpm-log/type @@ -0,0 +1 @@ +longrun diff --git a/sv/gpm-srv/producer-for b/sv/gpm-srv/producer-for new file mode 100644 index 0000000..80dfdbb --- /dev/null +++ b/sv/gpm-srv/producer-for @@ -0,0 +1 @@ +gpm-log diff --git a/sv/gpm-srv/run b/sv/gpm-srv/run new file mode 100644 index 0000000..a83019f --- /dev/null +++ b/sv/gpm-srv/run @@ -0,0 +1,3 @@ +#!/bin/execlineb -P +fdmove -c 2 1 +exec gpm -m /dev/input/mouse0 -t ps2 -D diff --git a/sv/gpm-srv/timeout-down b/sv/gpm-srv/timeout-down new file mode 100644 index 0000000..573541a --- /dev/null +++ b/sv/gpm-srv/timeout-down @@ -0,0 +1 @@ +0 diff --git a/sv/gpm-srv/type b/sv/gpm-srv/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/sv/gpm-srv/type @@ -0,0 +1 @@ +longrun diff --git a/sv/wireless/contents b/sv/wireless/contents new file mode 100644 index 0000000..6b2232c --- /dev/null +++ b/sv/wireless/contents @@ -0,0 +1,4 @@ +wpa_supplicant-log +wpa_supplicant-srv +dhcpcd-log +dhcpcd-srv diff --git a/sv/wireless/type b/sv/wireless/type new file mode 100644 index 0000000..757b422 --- /dev/null +++ b/sv/wireless/type @@ -0,0 +1 @@ +bundle diff --git a/sv/wpa_supplicant-log/consumer-for b/sv/wpa_supplicant-log/consumer-for new file mode 100644 index 0000000..6afdda6 --- /dev/null +++ b/sv/wpa_supplicant-log/consumer-for @@ -0,0 +1 @@ +wpa_supplicant-srv diff --git a/sv/wpa_supplicant-log/notification-fd b/sv/wpa_supplicant-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/sv/wpa_supplicant-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/sv/wpa_supplicant-log/pipeline-name b/sv/wpa_supplicant-log/pipeline-name new file mode 100644 index 0000000..24953b8 --- /dev/null +++ b/sv/wpa_supplicant-log/pipeline-name @@ -0,0 +1 @@ +wpa_supplicant diff --git a/sv/wpa_supplicant-log/run b/sv/wpa_supplicant-log/run new file mode 100644 index 0000000..f9813f2 --- /dev/null +++ b/sv/wpa_supplicant-log/run @@ -0,0 +1,9 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/wpa_supplicant.conf +importas -sCuD "n3 s2000000 T" DIRECTIVES DIRECTIVES +ifelse { test -w /var/log } { + foreground { install -d -o s6log -g s6log /var/log/wpa_supplicant } + s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/wpa_supplicant +} +foreground { install -d -o s6log -g s6log /run/log/wpa_supplicant } +s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/wpa_supplicant diff --git a/sv/wpa_supplicant-log/timeout-down b/sv/wpa_supplicant-log/timeout-down new file mode 100644 index 0000000..573541a --- /dev/null +++ b/sv/wpa_supplicant-log/timeout-down @@ -0,0 +1 @@ +0 diff --git a/sv/wpa_supplicant-log/type b/sv/wpa_supplicant-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/sv/wpa_supplicant-log/type @@ -0,0 +1 @@ +longrun diff --git a/sv/wpa_supplicant-srv/dependencies.d/dhcpcd b/sv/wpa_supplicant-srv/dependencies.d/dhcpcd new file mode 100644 index 0000000..e69de29 diff --git a/sv/wpa_supplicant-srv/producer-for b/sv/wpa_supplicant-srv/producer-for new file mode 100644 index 0000000..17413d8 --- /dev/null +++ b/sv/wpa_supplicant-srv/producer-for @@ -0,0 +1 @@ +wpa_supplicant-log diff --git a/sv/wpa_supplicant-srv/run b/sv/wpa_supplicant-srv/run new file mode 100644 index 0000000..74ad74e --- /dev/null +++ b/sv/wpa_supplicant-srv/run @@ -0,0 +1,5 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/wpa_supplicant.conf +importas -uD "wlan0" WPA_INTERFACE WPA_INTERFACE +fdmove -c 2 1 +exec /sbin/wpa_supplicant -i ${WPA_INTERFACE} -c /etc/wpa_supplicant/wpa_supplicant.conf diff --git a/sv/wpa_supplicant-srv/timeout-down b/sv/wpa_supplicant-srv/timeout-down new file mode 100644 index 0000000..573541a --- /dev/null +++ b/sv/wpa_supplicant-srv/timeout-down @@ -0,0 +1 @@ +0 diff --git a/sv/wpa_supplicant-srv/type b/sv/wpa_supplicant-srv/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/sv/wpa_supplicant-srv/type @@ -0,0 +1 @@ +longrun