Hi,

Before systemd 209, I put 'Environment=ENV=%h/.somedir' in
/etc/user@.service.d/env.conf to set some variables. Now since %h is not
available for system units anymore, I take the workaround by adding a
user unit set-my-env.service:
-------------
[Unit]
Description=Set systemd environment
Before=default.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=-/usr/bin/systemctl --user set-environment ENV=%h/.somedir

[Install]
WantedBy=basic.target
------------

The problem is that set-my-env.service may not affect the early units
pulled in by default.target. I wonder how we can execute
set-my-env.service as soon as user@.service is started. Thanks.

Regards.
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to