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: clear exit code of exitHook #24909

Merged
merged 2 commits into from Apr 16, 2017

Conversation

ck3d
Copy link
Contributor

@ck3d ck3d commented Apr 14, 2017

Motivation for this change

The exit code of the dhcpcd exitHook is not zero if openntp is not installed.
This exit code needs to be reset to avoid following error log:

$ journalctl -n 1 -u dhcpcd
Apr 14 22:41:26 nixos dhcpcd[836]: script_runreason: /nix/store/b4vb2d9gzcc45c63j945v5zh67q5rg5v-dhcpcd-6.11.5/libexec/dhcpcd-run-hooks: WEXITSTATUS 5
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
    • Linux
  • 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.

@mention-bot
Copy link

@ck3d, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @wkennington and @peti to be potential reviewers.


# exit code of last command is propagated, so we have to clear it
true
${config.systemd.package}/bin/systemctl try-reload-or-restart ntpd.service openntpd.service || true
Copy link
Member

@Mic92 Mic92 Apr 15, 2017

Choose a reason for hiding this comment

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

We have now systemd-timesyncd in nixos as default. Does it require a reload too, or is it smart enough to resolving endpoints on its own?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like your solution.
We use systemd-timesyncd without issues. A restart is not necessary.

@Mic92 Mic92 merged commit d2e46b9 into NixOS:master Apr 16, 2017
@ck3d ck3d deleted the dhcpcd-clear-exit-code branch November 25, 2017 16:42
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