2017-05-26 20:26:25 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Enable OpenRC services
|
|
|
|
for service in devfs dmesg; do
|
|
|
|
rc-update -q add $service sysinit
|
|
|
|
done
|
|
|
|
for service in hwclock modules sysctl hostname bootmisc wpa_supplicant wifi-handler; do
|
|
|
|
rc-update -q add $service boot
|
|
|
|
done
|
|
|
|
for service in haveged sshd udev; do
|
|
|
|
rc-update -q add $service default
|
|
|
|
done
|
|
|
|
for service in mount-ro killprocs savecache; do
|
|
|
|
rc-update -q add $service shutdown
|
|
|
|
done
|
|
|
|
|
|
|
|
# Add user account
|
|
|
|
adduser -u 1000 -D -h /home/user -G users user 2>/dev/null
|
|
|
|
|
2017-06-03 20:13:22 +00:00
|
|
|
# Autologin on tty1, let busybox autoconfigure 2-6
|
2017-05-26 20:26:25 +00:00
|
|
|
autologin="root"
|
2017-06-03 20:13:22 +00:00
|
|
|
for i in 1 2 3 4 5 6; do
|
2017-05-26 20:26:25 +00:00
|
|
|
old="^tty$i::respawn:/sbin/getty 38400 tty$i"
|
|
|
|
new="# tty$i::respawn:/sbin/getty 38400 tty$i"
|
|
|
|
[ "$i" == "1" ] && new="tty1::respawn:/bin/login -f $autologin"
|
|
|
|
sed -i -e "s.$old.$new.g" /etc/inittab
|
|
|
|
done
|