systemd: Is it wrong?

"Jóhann B. Guðmundsson" johannbg at gmail.com
Mon Jul 11 18:24:16 UTC 2011


On 07/11/2011 06:02 PM, Steve Dickson wrote:
>
> On 07/11/2011 01:54 PM, Lennart Poettering wrote:
>> On Mon, 11.07.11 13:29, Steve Dickson (SteveD at 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

I was conducting a series of test and I just confirmed that this works 
as well ;)

ExecStartPre=/sbin/sysctl -w fs.nfs.nlm_tcpport=${LOCKD_UDPPORT} 
fs.nfs.nlm_tcpport=${LOCKD_TCPPORT}

Which btw is documented also in the manpage ;) which I should have read 
as well as you..

"On top of that basic environment variable substitution is supported, 
where ${FOO} is replaced by the string value of the environment variable 
of the same name. Also $FOO may appear as separate word on the command 
line in which case the variable is replaced by its value split at 
whitespaces. Note that the first
   argument (i.e. the binry to execute) may not be a variable, and must 
be a literal and absolute path name.

So let's get this one packaged and rolling. )



More information about the devel mailing list