systemd: Is it wrong?

Steve Dickson SteveD at redhat.com
Mon Jul 11 17:43:38 UTC 2011



On 07/11/2011 01:40 PM, Florian Müllner wrote:
> 2011/7/11 Steve Dickson <SteveD at redhat.com <mailto: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
No, I go head and set it to zero... So I know its defined... 
> 
> 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} ...
that would be nice... But defining it to zero is no biggie...

steved.


More information about the devel mailing list