On Thu, 29.09.16 11:25, Vasiliy Tolstov (v.tols...@selfip.ru) wrote:

> I have CPUAffinity inside service file and want to configure it via
> EnvironmentFile, but
> CPUAffinity=$CPUAffinity does not work with message Failed to parse
> CPU affinity '$CPUAffinity'
> Environment file contains CPUAffinity="0-2"
> Does it possible to assign cpu affinity via env variable ?

No, this is not available. Unit file syntax is intentionally kept
simple, so that simple tools can parse them without having to
implement a macro language.

The various ExecXYZ= switches are an exception: you may reference env
vars in the specified command lines and they are resolved at the time
of invocation.

(Well, at least that's the idea. In fact, even though this is the goal
a couple of features crept in I think we should better have avoided.)

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to