systemd: Is it wrong?

Alexander Boström abo at root.snowtree.se
Mon Jul 11 17:36:08 UTC 2011


mån 2011-07-11 klockan 12:55 -0400 skrev Steve Dickson:

> * 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.   

The default value is "" (empty string) so you need to handle that case.
(The SysV script has an if clause for exactly this purpose.)

It looks like you can have multiple EnvironmentFile (or just use
Environment=), which allows you to have one file with the default values
and one config file where they can be overridden.

Or you can modify the unit file to handle the empty variable in some
other way. Say, by branching out into a shell script which only calls
sysctl if the variable is set. Or by creating a special command which
does about the same. Or by moving it into rpc.statd.

/abo




More information about the devel mailing list