Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos: wpa_supplicant: warn on unused config #96263

Merged
merged 1 commit into from Aug 25, 2020

Conversation

bendlas
Copy link
Contributor

@bendlas bendlas commented Aug 25, 2020

Motivation for this change

After 71ea6a9 there are additional cases, where wpa_supplicant uses an auto-generated config.

Because it can't use multiple config files, and the config format doesn't permit includes, that will silently ignore a present /etc/wpa_supplicant.conf. There are valid reasons for keeping that file outside of extraConfig, because it may contain secrets.

This is intended to avoid silently breaking people's config in 20.09

see #59959 (comment)

Things done

Implemented a run-time warning, that will detect a condition of /etc/wpa_supplicant.conf being present, but ignored in favor of a a generated config file.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@bendlas
Copy link
Contributor Author

bendlas commented Aug 25, 2020

cc @bobismijnnaam

@bobismijnnaam
Copy link
Contributor

I assume the echo in script ends up in one of systemd's logs? (I'm not very well acquainted with systemd)

@bendlas
Copy link
Contributor Author

bendlas commented Aug 25, 2020

I assume the echo in script ends up in one of systemd's logs? (I'm not very well acquainted with systemd)

Yep, and the <3> marks it as error priority.

@bendlas bendlas merged commit 49dba2c into NixOS:master Aug 25, 2020
@bendlas bendlas deleted the warn-wpa-supplicant-config branch October 22, 2023 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants