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/undervolt: fixes ExecStart formatting #63777

Closed
wants to merge 1 commit into from
Closed

nixos/undervolt: fixes ExecStart formatting #63777

wants to merge 1 commit into from

Conversation

zfnmxt
Copy link
Contributor

@zfnmxt zfnmxt commented Jun 25, 2019

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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 nix-review --run "nix-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This is my first PR, so not sure if I did some of the testing stuff correctly. nix-shell -p nix-review --run "nix-review rev undervolt-fix" reported "Nothing changed" for example.

Anyway, with the current ExecStart string, the service will fail as systemd appears to parse the Restart=no option as an argument to undervolt. This PR fixes that.

The current ExecStart string results in systemd parsing the "Restart=no" option
as part of the ExecStart string, causing the service to fail.
@zfnmxt
Copy link
Contributor Author

zfnmxt commented Jun 25, 2019

After some investigation on IRC, looks like this is due to #63533

@worldofpeace
Copy link
Contributor

#64475 has been resolved.

@gloaming
Copy link
Contributor

You know, something like this does seem a lot better than the nasty backslash thing anyway; oughtn't we have a better standard?

@worldofpeace
Copy link
Contributor

It does improve the code. At first I thought of it as an ad-hoc fix to something that's already been fixed/reverted in systemd so it wasn't needed anymore. But it does seem fine as a standalone improvement.

If you can test @gloaming I'd be happy to reopen and merge this.

@gloaming
Copy link
Contributor

This is my first PR, so not sure if I did some of the testing stuff correctly. nix-shell -p nix-review --run "nix-review rev undervolt-fix" reported "Nothing changed" for example.

@zmlww Welcome! nix-review only tests changes to packages, but the change here is to a NixOS module. The module depends on the package, but not the other way around, so there's nothing for nix-review to check.

@gloaming
Copy link
Contributor

@worldofpeace I think I'll experiment with writing a combinator that we can use to compose ExecStart lines in a more principled way than manually checking for nulls and combining strings.

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