systemd: Is it wrong?

Florian Müllner fmuellner at gnome.org
Mon Jul 11 17:40:21 UTC 2011


2011/7/11 Steve Dickson <SteveD at redhat.com>

>  > Hmm? Shell only understands strings, too. What precisely are you asking
> for?
> in /etc/sysconfig/nfsservices
> set LOCKD_TCPPORT=234
>
> In nfsservice.service
>
> EnvironmentFile=-/etc/sysconfig/nfsservices
> ExecStartPre=/sbin/sysctl -w $LOCKD_TCPPORT
>
> to work.
>

That is supposed to work. However, if /etc/sysconfig/nfsservices reads:
#set LOCKD_TCPPORT=234

the variable evaluates to the empty string, not 0, so the sysctl invocation
fails. I don't think unit files support advanced bash syntax like
${LOCKD_TCPPORT:-0} ...

Florian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/devel/attachments/20110711/9afa58d1/attachment.html 


More information about the devel mailing list