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
|
|
|
|
2022-07-20 12:23:17 +00:00
|
|
|
# Enable eudev service
|
|
|
|
rc-update add udev sysinit
|
|
|
|
rc-update add udev-trigger sysinit
|
|
|
|
rc-update add udev-settle sysinit
|
|
|
|
rc-update add udev-postmount default
|
2017-09-29 16:10:09 +00:00
|
|
|
|
|
|
|
# Enable other OpenRC services
|
2020-12-19 00:40:59 +00:00
|
|
|
for service in devfs dmesg; 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
|
2021-06-09 23:32:00 +00:00
|
|
|
for service in sshd swapfile local; 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
|
|
|
|
|
2022-09-16 09:59:11 +00:00
|
|
|
# Make apk interactive by default
|
|
|
|
touch /etc/apk/interactive
|
|
|
|
|
2020-05-10 16:08:33 +00:00
|
|
|
exit 0
|
2020-08-19 11:19:50 +00:00
|
|
|
|