Andrei Borzenkov wrote:

> В Tue, 19 Aug 2014 19:34:46 +0200
> Florian Lindner <[email protected]> пишет:
> 
>> 
>> It seems that using %i or %I to set the working directory does not work.
> 
> bor@opensuse:~> sudo systemctl start foo@/home/bor.service
> bor@opensuse:~> cat /tmp/foo
> /home/bor
> %i=-home-bor
> %I=/home/bor
> bor@opensuse:~> cat /run/systemd/system/[email protected]
> [Unit]
> Description=Path %i (%I)
> 
> [Service]
> Type=oneshot
> WorkingDirectory=%I
> ExecStart=/bin/sh -c '/bin/pwd > /tmp/foo; echo %%i=%i >> /tmp/foo; echo
> %%I=%I >> /tmp/foo'

Ok, somehow I obviously got confused while testing. Sorry!

I also try to set up a matching timer:

systemctl --user start git-commit@/home/florian/timer.test.timer

works fine, but:

systemctl --user enable git-commit@/home/florian/timer.test.timer
Failed to execute operation: Invalid argument

Or is creating a target for the timer and set WantedBy in the service file 
the way to go? But still, why is starting working, but not enabling?

Thx,
Florian

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to