summary refs log tree commit diff
path: root/1
blob: 0bdba541bfb787813ded792b51e1d5b16e9a8a72 (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
26
27
28
29
30
#!/bin/sh
# vim: set ts=4 sw=4 et:

PATH=/usr/bin:/usr/sbin

. /etc/runit/functions

msg "Welcome to Void!"

[ -r /etc/rc.conf ] && . /etc/rc.conf

# Start core services: one-time system tasks.
detect_virt
for f in /etc/runit/core-services/*.sh; do
	[ -r $f ] && . $f
done

dmesg >/var/log/dmesg.log
if [ $(sysctl -n kernel.dmesg_restrict 2>/dev/null) -eq 1 ]; then
	chmod 0600 /var/log/dmesg.log
else
	chmod 0644 /var/log/dmesg.log
fi

# create files for controlling runit
mkdir -p /run/runit
install -m000 /dev/null /run/runit/stopit
install -m000 /dev/null /run/runit/reboot

msg "Initialization complete, running stage 2..."