-
- Downloads
Forbid minus-prefixed option names in systemd::unit.
In systemd::unit_options, you can prefix an option name with a minus sign (Unicode 002D "hyphen-minus") to "reset" a list option to the empty list, so the new values don't just append to the existing list of values. That makes sense when overriding/supplementing options in earlier unit files, but systemd::unit installs the "main" unit file, the one that is read first, so list options *always* have the empty list as their value when the file is read. We here modify the unitfile.erb template file to see if it is called from systemd::unit or systemd::unit_options, and if the former, it raises an error if it encounters an option name starting with a minus sign. And of course also remove the paragraph describing that beha- viour in the 'options' parameter documentation.
Please register or sign in to comment