В Sun, 12 Apr 2015 10:43:16 +0200
Per Jessen
Andrei Borzenkov wrote:
В Sat, 11 Apr 2015 18:40:24 +0200 Per Jessen
пишет: Per Jessen wrote:
I'm having a bit of trouble getting this service to work:
EnvironmentFile=/etc/sysconfig/rbldnsd ExecStart=/usr/local/bin/rbldnsd $RBLDNSD_ARGS $RBLDNSD_ZONES
The environment file contains the following:
RBLDNSD_ARGS="-u named:named -r /var/lib/rbldnsd -b localhost/34000 -n -q -f -c 10s " RBLDNSD_ZONES="countries.nerd:ip4set:countries.nerd.dk/zz.countries.nerd.dk.rbldnsd"
After I've tried to start it:
# systemctl status rbldnsd rbldnsd.service - rbldnsd Loaded: loaded (/usr/local/lib/systemd/system/rbldnsd.service; disabled) Active: failed (Result: exit-code) since Sat, 2015-04-11 18:27:26 CEST; 1s ago Process: 22993 ExecStart=/usr/local/bin/rbldnsd $RBLDNSD_ARGS $RBLDNSD_ZONES (code=exited, status=1/FAILURE) CGroup: name=systemd:/system/rbldnsd.service
If I skip substitution, and just use:
ExecStart=/usr/local/bin/rbldnsd -u named:named -r /var/lib/rbldnsd -b localhost/34000 -n -q -f -c 10s countries.nerd:ip4set:countries.nerd.dk/zz.countries.nerd.dk.rbldns
it works fine. I'm clearly getting the substitution screwed up - can anyone spot the problem?
I would try removing trailing space in RBLDNSD_ARGS.
Thanks, well spotted! Not that a trailing space ought be a problem.
So - did removing trailing space help or not?
Do you also see the same problem if you set variables in unit definition directly?
Yes, I tried it with this:
Environment="RBLDNSD_ARGS=-u named:named -r /var/lib/rbldnsd -b localhost/34000 -n -q -f -c 10s " Environment="RBLDNSD_ZONES=countries.nerd:ip4set:countries.nerd.dk/zz.countries.nerd.dk.rbldnsd"
this failed in the same way. Darn, those trailing spaces ..... I know this one is going to come back to haunt me.
Still, see $SUBJ - there must be a way for me to see the result of the substitution?
Substitution happens very late, I think in child when systemd forks to execute command. So I am not sure this information is even available in a PID1. Probably, only in debug logs. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org