about summary refs log tree commit diff
path: root/2
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2015-01-28 17:15:51 +0100
committerJuan RP <xtraeme@gmail.com>2015-01-28 17:15:51 +0100
commitaf3e795adeedd9218b49ae7b2e8b355b311ed80c (patch)
treee3695fef3485b06c7ff5e11db49feb3a0e03eb39 /2
parentfe4cb52bdbc019183927c4dd2f00889852c39641 (diff)
downloadrunit-void-af3e795adeedd9218b49ae7b2e8b355b311ed80c.tar.gz
runit-void-af3e795adeedd9218b49ae7b2e8b355b311ed80c.tar.xz
runit-void-af3e795adeedd9218b49ae7b2e8b355b311ed80c.zip
2: accept a custom runlevel via kernel cmdline (from bougyman).
Diffstat (limited to '2')
-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