20 lines
509 B
Text
20 lines
509 B
Text
|
#!/bin/sh
|
||
|
PATH=/bin:/usr/bin:/usr/sbin:/sbin
|
||
|
|
||
|
runlevel=default
|
||
|
for arg in $(cat /proc/cmdline); do
|
||
|
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
|
||
|
|
||
|
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: ................................'
|