]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/install.c
shared/install: resolve specifiers in Also=
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 17 Oct 2016 01:40:41 +0000 (21:40 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 19 Oct 2016 01:30:51 +0000 (21:30 -0400)
commita6612e658c19717a51366fa2e4925e557d95a427
treec0320421cc691cb5a612e4d76116b19f4ae38f6c
parentdb093eed04cf88aa75c58cb7a69d55d669af0e34
shared/install: resolve specifiers in Also=

Test case:
[Install]
WantedBy= default.target
Also=getty@%p.service

$ ./systemctl --root=/ enable testing@instance.service
Created symlink /etc/systemd/system/default.target.wants/testing@instance.service → /etc/systemd/system/testing@.service.
Created symlink /etc/systemd/system/getty.target.wants/getty@testing.service → /usr/lib/systemd/system/getty@.service.
$ ./systemctl --root=/ disable testing@instance.service
Removed /etc/systemd/system/getty.target.wants/getty@testing.service.
Removed /etc/systemd/system/default.target.wants/testing@instance.service.

Fixes part of #4210.

Resolving specifiers in DefaultInstance seems to work too:
[Install]
WantedBy= default.target
DefaultInstance=%u

$ systemctl --root=/ enable testing3@instance.service
Created symlink /etc/systemd/system/default.target.wants/testing3@instance.service → /etc/systemd/system/testing3@.service.
$ systemctl --root=/ enable testing3@.service
Created symlink /etc/systemd/system/default.target.wants/testing3@zbyszek.service → /etc/systemd/system/testing3@.service.
src/shared/install.c