summary refs log tree commit diff
path: root/2
blob: e7357cccef5072e41a308d8bb8dbc3ca392f6717 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
# vim: set ts=4 sw=4 et:

PATH=/usr/bin:/usr/sbin

runlevel=default
for arg in $(cat /proc/cmdline); do
    case $arg in
        single) echo "Initializing single user mode..."; runlevel=single;;
    esac
done

# Setup first tty as unicode again, stage1 does not work correctly for tty1.
unicode_start

[ -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

exec env - PATH=$PATH \
    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'