09afa1f853
* postmarketos-base: Execute setup-udev, remove mosh from dependencies * Run setup-udev [0], because that is what `setup-xorg-base` does [1]. It configures more than one OpenRC service and it also messes with the runlevels. Only after running that, Hildon works (tested in Qemu). [0]:2fbea8b8da/main/eudev/setup-udev
[1]:06300dd483/setup-xorg-base.in (L25)
* Remove `mosh` from `postmarketos-base` dependencies. I don't think anyone uses it right now, and it's easy to add custom packages in `pmbootstrap init` nowadays. * Minor style changes in the `APKBUILD` * [rx51] Remove udev-trigger service start
58 lines
1.8 KiB
Bash
58 lines
1.8 KiB
Bash
#!/bin/sh
|
|
|
|
. /etc/deviceinfo
|
|
|
|
# Enable udev OpenRC services and runlevels
|
|
# https://github.com/alpinelinux/aports/blob/master/main/eudev/setup-udev
|
|
setup-udev -n
|
|
|
|
# Enable other 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 dbus haveged sshd swapfile 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
|
|
if [ "${deviceinfo_msm_refresher}" = "true" ]; then
|
|
rc-update -q add msm-fb-refresher boot
|
|
fi
|
|
|
|
# Add user account
|
|
adduser -u 1000 -D -h /home/user -G users user 2>/dev/null
|
|
|
|
# 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://wiki.postmarketos.org> 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
|
|
|
|
# Enable wext, nl80211 & dbus control for wpa_supplicant
|
|
if ! grep -q Dwext /etc/conf.d/wpa_supplicant; then
|
|
sed -i 's/wpa_supplicant_args=\"/wpa_supplicant_args=\" -u -Dwext,nl80211/' /etc/conf.d/wpa_supplicant
|
|
fi
|
|
touch /etc/wpa_supplicant/wpa_supplicant.conf
|
|
|