Skip to content

main/postmarketos-base: fix wpa_supplicant config

Oliver Smith requested to merge pmos-base-postinstall-fix into master

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

Fixes #254 (closed).

  • @Passenger245: please test this, if this fixes wifi on htc-ace when doing a new install with this patch applied.
  • @postmarketOS: can somebody check if wifi is still working on the n900 after applying this patch? Afaik it uses the ext driver, so wpa_supplicant should try the nl80211 driver first, and fall back to the working wext driver.
Edited by Oliver Smith

Merge request reports