diff options
author | Ronny Chevalier <chevalier.ronny@gmail.com> | 2014-12-13 15:14:48 +0100 |
---|---|---|
committer | Ronny Chevalier <chevalier.ronny@gmail.com> | 2014-12-13 15:29:47 +0100 |
commit | e9e310f8e99c63c764f71ed0c224ccd3cceb90c7 (patch) | |
tree | f0f04276817c61e8cc36c808f1be6d9b12d7e00f /src/libsystemd | |
parent | fee0a921830166abffe5a806a512da6ceb2fe2eb (diff) |
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)
Diffstat (limited to 'src/libsystemd')
0 files changed, 0 insertions, 0 deletions