[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
A
B
>                                                           
> srv set-environment A="$A"          
> srv start env-dump
> cat /tmp/env
A

> cat env-dump.service 
[Unit]
Description=Just dump env

[Service]
Type=oneshot
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