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

dhcpcd service: fix service dependencies when default gateways are set #35141

Merged
merged 3 commits into from Feb 20, 2018

Conversation

abbradar
Copy link
Member

@abbradar abbradar commented Feb 18, 2018

Fix several problems which arise after b179908:

  • When default gateways were specified the service wasn't wanted by anything at all.
    So always want it by multi-user.target.
  • We want to wait for both stacks to be active before declaring that network is active.
    So either both default gateways must be specified or only IPv4 if IPv6 is disabled.
Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@abbradar abbradar requested a review from fpletz February 18, 2018 19:44
@abbradar abbradar changed the title dhcpcd service: always want but set service order dhcpcd service: fix service dependencies when default gateways are set Feb 18, 2018
@rnhmjoj
Copy link
Contributor

rnhmjoj commented Feb 19, 2018

See #34716

When default gateways were specified the service wasn't wanted by anything at
all before.
We want to wait for both stacks to be active before declaring that network is active.
So either both default gateways must be specified or only IPv4 if IPv6 is disabled to
avoid dhcpcd for network-online.target.
Even if IPv6 gateway is set, there's no need to set it early if IPv6 is disabled.
@abbradar
Copy link
Member Author

I've fixed this after looking at #35064 -- it's much cleaner now. Thanks @rnhmjoj!

Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing my flawed code. 👍

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

4 participants