main/postmarketos-base: fix wpa_supplicant config (!365)
Fix wifi on htc-ace by properly setting nl80211 before wext.
/etc/conf.d/wpa_supplicant is supposed to get modified twice with the
current code in the post-install file. The first one was patched
recently to set nl80211 before wext, but that change does not work in
practice, for two reasons:
1. The code block does not even get executed, because apk reports that
/etc/conf.d/wpa_supplicant was already modified (by a package that
was installed before, in its post-install script? I could not find
out which one does that though).
2. Even if it worked, the second code block would revert the change and
put wext before nl80211 again.
Fix this by removing the first code block, and changing the order in the
second one. Make it easier to catch such errors in the future, by
printing, which files get modified, or get skipped. Set "#!/bin/sh -e",
so the script can not fail silently.
When doing pmbootstrap -y zap and then pmbootstrap install, the output
looks like this:
(141/151) Installing postmarketos-base (3-r26)
Executing postmarketos-base-3-r26.post-install
- Modifying: /etc/fstab
- Modifying: /etc/issue
- Modifying: /etc/motd
- Modifying: /etc/conf.d/syslog
- Modifying: /etc/conf.d/wpa_supplicant
- Modifying: /etc/sudoers
- Modifying: /etc/chrony/chrony.conf
2019-05-14 19:00:15 +00:00
|
|
|
#!/bin/sh -e
|
2017-05-26 20:26:25 +00:00
|
|
|
|
2017-09-29 16:10:09 +00:00
|
|
|
# Enable udev OpenRC services and runlevels
|
|
|
|
# https://github.com/alpinelinux/aports/blob/master/main/eudev/setup-udev
|
|
|
|
setup-udev -n
|
|
|
|
|
|
|
|
# Enable other OpenRC services
|
2018-12-24 20:45:58 +00:00
|
|
|
for service in devfs dmesg devmappings; do
|
2017-05-26 20:26:25 +00:00
|
|
|
rc-update -q add $service sysinit
|
|
|
|
done
|
2020-04-19 11:45:40 +00:00
|
|
|
for service in hwclock modules sysctl hostname bootmisc syslog; do
|
2017-05-26 20:26:25 +00:00
|
|
|
rc-update -q add $service boot
|
|
|
|
done
|
2020-11-09 06:08:55 +00:00
|
|
|
for service in dbus haveged sshd swapfile wpa_supplicant chronyd local networkmanager rfkill; do
|
2017-05-26 20:26:25 +00:00
|
|
|
rc-update -q add $service default
|
|
|
|
done
|
|
|
|
for service in mount-ro killprocs savecache; do
|
|
|
|
rc-update -q add $service shutdown
|
|
|
|
done
|
|
|
|
|
2020-05-10 16:15:42 +00:00
|
|
|
# Prime swclock with a reasonable date/time on first boot
|
|
|
|
mkdir -p /run/openrc
|
|
|
|
touch /run/openrc/shutdowntime
|
|
|
|
|
2020-05-10 16:08:33 +00:00
|
|
|
exit 0
|
2020-08-19 11:19:50 +00:00
|
|
|
|