-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path2
More file actions
executable file
·18 lines (13 loc) · 789 Bytes
/
2
File metadata and controls
executable file
·18 lines (13 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
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
runsvchdir "$runlevel"
[ -x /etc/runit/rc.startup.local ] && /etc/runit/rc.startup.local
exec env - PATH=$PATH \
runsvdir -P /var/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'