about summary refs log tree commit diff
path: root/2
diff options
context:
space:
mode:
authorTJ Vanderpoel <tj@geoforce.com>2015-02-01 10:36:36 -0600
committerTJ Vanderpoel <tj@geoforce.com>2015-02-01 10:36:36 -0600
commitaaf1f5b61882a2bdca168b0e2527f1b917cf33a9 (patch)
treef36f90912dbd85c37203b01b17b7c20b07b5774e /2
parentaf3e795adeedd9218b49ae7b2e8b355b311ed80c (diff)
downloadrunit-void-aaf1f5b61882a2bdca168b0e2527f1b917cf33a9.tar.gz
runit-void-aaf1f5b61882a2bdca168b0e2527f1b917cf33a9.tar.xz
runit-void-aaf1f5b61882a2bdca168b0e2527f1b917cf33a9.zip
Use runsvchdir to set the initial run level
* Remove Conditional, simplifying 2
* use runsvchdir to set the initial runlevel
* symlink /run/runit/runsvdir/current to /etc/runit/runsvdir/current
Diffstat (limited to '2')
-rwxr-xr-x28
1 files changed, 3 insertions, 5 deletions
diff --git a/2 b/2
index 8897503..0020949 100755
--- a/2
+++ b/2
@@ -16,11 +16,9 @@ done
 
 [ -x /etc/rc.local ] && /etc/rc.local
 
-# Create runlevel and then make it the default.
-if [ -d /etc/runit/runsvdir/${runlevel} ]; then
-    mkdir -p /run/runit/runsvdir
-    ln -s /etc/runit/runsvdir/${runlevel} /run/runit/runsvdir/current
-fi
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
 exec env - PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'