diff --git a/overlay.d/15fcos/usr/libexec/coreos-check-wireless-firmwares b/overlay.d/15fcos/usr/libexec/coreos-check-wireless-firmwares index 7b6adb1557..daf7dbf06e 100755 --- a/overlay.d/15fcos/usr/libexec/coreos-check-wireless-firmwares +++ b/overlay.d/15fcos/usr/libexec/coreos-check-wireless-firmwares @@ -5,14 +5,31 @@ # and provide remediation steps # See https://github.com/coreos/fedora-coreos-tracker/issues/1575 +# List of wifi-firmwares +# SOURCE: https://pagure.io/fedora-comps/blob/main/f/comps-f41.xml.in#_2700 +firmwares=( +atheros-firmware +b43-fwcutter +b43-openfwwf +brcmfmac-firmware +iwlegacy-firmware +iwlwifi-dvm-firmware +iwlwifi-mvm-firmware +libertas-firmware +mt7xxx-firmware +nxpwireless-firmware +realtek-firmware +tiwilink-firmware +atmel-firmware +bcm283x-firmware +zd1211-firmware +) +regex=$(IFS='|'; echo "${firmwares[*]}") + layered_packages="$(rpm-ostree status --json -b | jq -r '.deployments[0].packages[]')" -if echo "$layered_packages" | grep -q "NetworkManager-wifi"; then - if echo "$layered_packages" | grep -q "atheros-firmware" && \ - echo "$layered_packages" | grep -q "brcmfmac-firmware" && \ - echo "$layered_packages" | grep -q "mt7xxx-firmware" && \ - echo "$layered_packages" | grep -q "realtek-firmware" - then +if grep -q "NetworkManager-wifi" <<< "$layered_packages"; then + if grep -qP $regex <<< "$layered_packages"; then return 0 fi else @@ -29,14 +46,12 @@ motd_path=/run/motd.d/30_wireless_firmwares_warning.motd cat << EOF > "${motd_path}" ${warn} ########################################################################## -WARNING: The NetworkManager-wifi is installed on this system. -However, some wifi-firmwares are not installed. - -To layer the missing firmwares use the following : -sudo rpm-ostree install atheros-firmware brcmfmac-firmware \ -mt7xxx-firmware realtek-firmware +WARNING: The NetworkManager-wifi is a requested layered package on this +system, but no wifi drivers are requested. The wifi drivers will be +dropped from FCOS at a future date. -Then reboot the system. +More context and remediation steps are available in the following FAQ entry: + https://docs.fedoraproject.org/en-US/fedora-coreos/faq/#_how_do_i_add_the_missing_wifi_firmwares To disable this warning, use: sudo systemctl disable coreos-check-wireless-firmwares.service