On Sun, 02.03.14 11:22, [email protected] ([email protected]) wrote:
> > Hi, > > Before systemd 209, I put 'Environment=ENV=%h/.somedir' in > /etc/[email protected]/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 [email protected] is started. Thanks. You can use DefaultEnvironment in user.conf, and place that either in /etc/systemd/user.conf, or in ~/.config/systemd/user.conf. Do you need anything else? Alternatively you can use pam_env for this? Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
