Skip to content
Snippets Groups Projects
Select Git revision
  • ef6f964592cc553e8304a382ab44022f5a08db1f
  • master default protected
2 results

unit.pp

Blame
  • Thomas Bellman's avatar
    Thomas Bellman authored
    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.
    ef6f9645
    History
    unit.pp 3.39 KiB