[systemd-devel] Query regarding "EnvironmentFile"
Alex Crawford
alex.crawford at coreos.com
Thu Dec 24 00:50:47 PST 2015
On 12/24, Andrei Borzenkov wrote:
> I do not follow. You said that you are using separate service to
> generate file that contains correct
>
> IP=1.2.3.4
Not quite. The seperate "metadata" service generates a bunch of entries like:
COREOS_PRIVATE_IPV4=1.2.3.4
COREOS_PUBLIC_IPV4=5.6.7.8
> > Of course, the daemon would then need to understand how to follow this mapping
> > and do the substitution itself. We instead decided to piggy-back on systemd and
> > let it do the mapping for us.
> >
>
> But systemd does not do any mapping - it simply passes along result of
> mapping which another program has done.
The user then defines the mapping in the drop-in by specifying:
ExecStart=/usr/bin/etcd --ip=${COREOS_PRIVATE_IPV4}
or
ExecStart=/usr/bin/etcd --ip=${COREOS_PUBLIC_IPV4}
This way, the user doesn't bother with the contents of those variables and we
let systemd perform the substitution for us (or maybe the user knows these
addresses up front and doesn't bother with the variables at all).
-Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20151224/d9ad8b0b/attachment.sig>
More information about the systemd-devel
mailing list