[pkg-go] Bug#840947: Bug#840947: Multi-line ARGS assignment in /etc/default/prometheus-node-exporter not suppored by systemd

Sam Morris sam at robots.org.uk
Thu Oct 27 09:29:38 UTC 2016


reopen 840947
found 840947 0.12.0+ds+really0.12.0-2
thanks

On Mon, 2016-10-17 at 14:41 +0200, Martín Ferrari wrote:
> On 16/10/16 14:24, Sam Morris wrote:
> > Ugh, I just realised that this was my error, not an error in
> > /etc/default/prometheus-node-exporter as shipped by the package.
> > Sorry
> > for the noise!
> 
> Actually, I usue multi-line assignments in my personal configuration,
> but I am using sysvinit. This must be a systemd bug..

As it turns out, the version of the package in unstable actaully does
ship with a bad multiline variable definition in
/etc/default/prometheus-node-exporter.

(I got confused because I quickly installed the package on another
system, to check whether the problem was one of my own creation, and
did not realise that I had installed the older version that only added
a single argument to the ARGS variable).

The fix is to add trailing backslashes to indicate that lines should be
continued. This is documented in systemd.exec(5):

    EnvironmentFile=
        Similar to Environment= but reads the environment variables from a text file. The text file should contain
        new-line-separated variable assignments. Empty lines, lines without an "=" separator, or lines starting with ; or #
        will be ignored, which may be used for commenting. A line ending with a backslash will be concatenated with the
        following one, allowing multiline variable definitions. The parser strips leading and trailing whitespace from the
        values of assignments, unless you use double quotes (").

-- 
Sam Morris <https://robots.org.uk/>
PGP: rsa4096/CAAA AA1A CA69 A83A 892B  1855 D20B 4202 5CDA 27B9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-go-maintainers/attachments/20161027/d5e849fa/attachment.sig>


More information about the Pkg-go-maintainers mailing list