Bug 41711 - Truncated leading characters in environment variable
Summary: Truncated leading characters in environment variable
Status: RESOLVED NOTABUG
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Lennart Poettering
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 01:26 UTC by Eduardo Tongson
Modified: 2011-10-12 07:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Eduardo Tongson 2011-10-12 01:26:50 UTC
on Systemd 37

Snippet of a service:
...
EnvironmentFile=/etc/env
ExecStart=-/bin/busybox ntpd ${ntpdopts}
...

contents of /etc/env:
ntpdopts="-p pool"

When the service is run the '-p' is truncated:
busybox[216]: ntpd: bad address ' pool'

Runs normally if I add a leading space :
/etc/env
ntpdopts=" -p pool"

/bin/busybox ntpd  -p pool
Note: the space is passed too
Comment 1 Lennart Poettering 2011-10-12 07:33:03 UTC
Please read the systemd.service(5), specifically the part about ExecStart=.

Basically, use $ntpdopts, not ${ntpdopts} if you want your variable value split up into individual arguments.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.