Systemd/src/systemctl
Ronny Chevalier e9e310f8e9 systemctl: handle correctly template units for edit verb
Previously, if we provided getty@.service to systemctl edit it would
have failed when using the bus because it is an invalid unit name.
But it would have succeeded when searching in the filesystem.

Now, we check if we have a template, if we do we search in the
filesystem, if we don't have a templae and we can use the bus, we do.

Furthermore, if we provided getty@tty1.service it would not have worked
when searching the filesystem, but it would have worked with the bus.
So now, when using the filesystem we use the template name and not the
unit name, and the same when logging errors.

(Also did a refactoring to avoid a long function)
2014-12-13 15:29:47 +01:00
..
Makefile build-sys: add stub makefiles to all subdirs to ease development with emacs 2012-04-13 21:37:59 +02:00
systemctl.c systemctl: handle correctly template units for edit verb 2014-12-13 15:29:47 +01:00