[systemd-devel] Using path name in instantiated units
mailinglists at xgm.de
Tue Aug 19 11:59:55 PDT 2014
Andrei Borzenkov wrote:
> В Tue, 19 Aug 2014 19:34:46 +0200
> Florian Lindner <mailinglists at xgm.de> пишет:
>> It seems that using %i or %I to set the working directory does not work.
> bor at opensuse:~> sudo systemctl start foo@/home/bor.service
> bor at opensuse:~> cat /tmp/foo
> bor at opensuse:~> cat /run/systemd/system/foo at .service
> Description=Path %i (%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?
More information about the systemd-devel