88c753e5ae
Having it in boot doesn't actually work, the service is being started too early and fails. This change moves it to the default runlevel. This change also removes "wifi-handler" since that service doesn't actually exist.
53 lines
1.6 KiB
Bash
53 lines
1.6 KiB
Bash
#!/bin/sh
|
|
|
|
. /etc/deviceinfo
|
|
|
|
# Enable OpenRC services
|
|
for service in devfs dmesg; do
|
|
rc-update -q add $service sysinit
|
|
done
|
|
for service in hwclock modules sysctl hostname bootmisc syslog; do
|
|
rc-update -q add $service boot
|
|
done
|
|
for service in haveged sshd udev wpa_supplicant; 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
|
|
|
|
# Autologin on tty1, let busybox autoconfigure 2-6
|
|
autologin="root"
|
|
for i in 1 2 3 4 5 6; do
|
|
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
|
|
|
|
# Adjust welcome messages /etc (unless the files have been modified)
|
|
if ! apk audit /etc | grep -q etc/issue; then
|
|
{
|
|
echo 'Welcome to postmarketOS'
|
|
echo 'Kernel \r on an \m (\l)'
|
|
} >/etc/issue
|
|
fi
|
|
if ! apk audit /etc | grep -q etc/motd; then
|
|
{
|
|
echo 'Welcome to postmarketOS!'
|
|
echo ''
|
|
echo 'This distribution is based on Alpine Linux.'
|
|
echo 'Read both our wikis to find a large amount of how-to guides and'
|
|
echo 'general information about administrating and development.'
|
|
echo 'See <https://postmarketos.org/wiki> and <https://wiki.alpinelinux.org>.'
|
|
echo ''
|
|
echo 'You may change this message by editing /etc/motd.'
|
|
echo ''
|
|
} >/etc/motd
|
|
fi
|
|
|
|
# Enable syslog to SHM. Note: size is 4048KiB, which *should* be More Than Enough(TM) for all but the most chattiest of devices.
|
|
sed s/=\"/=\""-C4048 "/ -i /etc/conf.d/syslog
|