about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-x24
1 files changed, 4 insertions, 0 deletions
diff --git a/2 b/2
index 8440f19..8897503 100755
--- a/2
+++ b/2
@@ -8,6 +8,10 @@ for arg in $(cat /proc/cmdline); do
     case $arg in
         single) echo "Initializing single user mode..."; runlevel=single;;
     esac
+    if [ -d /etc/runit/runsvdir/"$arg" ]; then
+        echo "Runlevel detected: '$arg' (via kernel cmdline)"
+        runlevel="$arg"
+    fi
 done
 
 [ -x /etc/rc.local ] && /etc/rc.local