https://bugzilla.novell.com/show_bug.cgi?id=793411 https://bugzilla.novell.com/show_bug.cgi?id=793411#c15 --- Comment #15 from Per Jessen <per@computer.org> 2013-01-30 13:30:34 UTC --- (In reply to comment #14)
(In reply to comment #13)
Because I was seeing variables replaced only as blanks, I trimmed my test to roughly this:
/etc/sysconfig/spamd :
KLOP=99
/etc/systemd/system/spamd.service :
ExecStart=/usr/local/bin/kk $KLOP
/usr/local/bin/kk :
#!/bin/sh echo $@ >/tmp/list sleep 30
My system is 12.2 + your systemd-44-10.20.1.i586.rpm.
(truncated "ps axfl" display:)
0:00 /bin/sh /usr/local/bin/kk 0:00 \_ sleep 30
The $KLOP is clearly being substituted with blanks.
Because it is incorrect use (check the manpage). You should use:
ExecStart=/usr/local/bin/kk ${KLOP}
an easier way to check the environment is : strings /proc/<PID>/environ
My use without {} works with systemd-44-10.8.1.i586. Besides, I've also tried using {} and (), same result. FYI, I see a couple of other service unit in /lib/systemd/system using the variable form without {}. (sshd, ypbind) To test which form was the correct one I used: ExecStart=/usr/local/bin/kk $KLOP ${KLOP} $(KLOP) If I check /proc/<PID>/environ, none of the variables from my sysconfig file are set. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.