feat: add runit support

This commit is contained in:
2024-09-03 20:33:47 +02:00
parent 2ccfc039d5
commit 50c251318a
6 changed files with 37 additions and 5 deletions

5
assets/services/runit/conf Executable file
View File

@@ -0,0 +1,5 @@
BAUD_RATE=38400
TERM_NAME=linux
TTY=tty7
EXEC_PATH=/bin/lidm

5
assets/services/runit/finish Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
[ -r conf ] && . ./conf
exec utmpset -w $TTY

15
assets/services/runit/run Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
[ -r conf ] && . ./conf
if [ -x /sbin/getty -o -x /bin/getty ]; then
# busybox
GETTY=getty
elif [ -x /sbin/agetty -o -x /bin/agetty ]; then
# util-linux
GETTY=agetty
fi
exec setsid ${GETTY} ${GETTY_ARGS} \
"${TTY}" "${TERM_NAME}" \
-n -l "${EXEC_PATH}" -o 7