From c82e88dd00d1b0b7fcfb4e5628d99611388cef6f Mon Sep 17 00:00:00 2001 From: rawnix ports Date: Sat, 26 Sep 2026 18:19:05 +0000 Subject: sync 2026-09-26 18:19 UTC 1672 files changed, 151396 insertions(+) --- core/runit/runit-2 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 core/runit/runit-2 (limited to 'core/runit/runit-2') diff --git a/core/runit/runit-2 b/core/runit/runit-2 new file mode 100644 index 0000000..e36d340 --- /dev/null +++ b/core/runit/runit-2 @@ -0,0 +1,22 @@ +#!/bin/sh +# /etc/runit/2 - Start service supervision + +PATH=/bin:/sbin:/usr/bin:/usr/sbin +export PATH + +runlevel=default + +for arg in $(cat /proc/cmdline); do + if [ -d "/etc/runit/runsvdir/$arg" ]; then + printf "Runlevel: %s\n" "$arg" + runlevel="$arg" + break + fi +done + +runsvchdir "$runlevel" || { + printf "Warning: runlevel '%s' failed, falling back to 'default'\n" "$runlevel" + [ "$runlevel" != default ] && runsvchdir default +} + +exec runsvdir -P /service 'log: ........................................................................................................' -- cgit v1.3.1