On Mon, 11.07.11 14:02, Steve Dickson (ste...@redhat.com) wrote:

> 
> 
> 
> On 07/11/2011 01:54 PM, Lennart Poettering wrote:
> > On Mon, 11.07.11 13:29, Steve Dickson (ste...@redhat.com) wrote:
> >>>>    * The variables read out of the EnvironmentFile are *always* 
> >>>>      character strings which means set LOCKD_TCPPORT=234 is
> >>>>      no longer possible. Losing that ability to set variable to 
> >>>>      integer values seem to like a giant step backwards.   
> >>>
> >>> 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.
> > 
> > This will work. And I completely fail to see what this has to do with
> > integer values? Can you elaborate?
> If I'm interpreting commitments:
> 
>    https://bugzilla.redhat.com/show_bug.cgi?id=699040#c43
> and 
>    https://bugzilla.redhat.com/show_bug.cgi?id=699040#c44
> 
> Correctly, the only way to make this work is to make LOCKD_TCPPORT
> then entire string "fs.nfs.nlm_udpport=12345" instead of just 12345

Use "/sbin/sysctl -w fs.nfs.nlm_tcpport=${LOCKD_TCPPORT}" instead of
"/sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT".

This is all documented. See systemd.service(5), under ExecStart=.

$FOO needs to appear as separate word, and the variable value will be split up
at whitespace.

${FOO} can appear as part of a word, and the variable value will not be
split up at whitespace.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Reply via email to