[systemd-devel] [PATCH] Pass environment over daemon-reexec

Oleksii Shevchuk alxchk at gmail.com
Thu Feb 7 22:07:30 PST 2013

> and it doesn't seem to do anything :(

If you running it in your working instance, you should reexec twice, to
get that systemd, that serializes env to next. 

> Now, I wonder if nelines in env vars is actually OK or not.

Yes, I thought about it too. As for now, there is not proper support for
\n. At least 

> echo $A
> srv set-environment A="$A"          
> srv start env-dump
> cat /tmp/env

> cat env-dump.service 
Description=Just dump env

ExecStart=/bin/sh -c 'echo $A > /tmp/env'

So, at least for now, It could be done as is I think. If not,
serialization logic should be redisigned

More information about the systemd-devel mailing list