diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-01-20 13:43:20 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-01-20 13:43:57 +0100 |
commit | 67d6621059085963a2a908a3ea99ced3b0ca789e (patch) | |
tree | 2c1ff0066af04f739b5ce9c0651be22d0c1d1eed /src/systemctl | |
parent | 488ad3b32a7e2b5b1380abf4a15e5f65fa65f3fe (diff) |
systemctl: skip native unit file handling if sysv file handling already handled everything
Issue pointed out by Colin Guthrie.
Diffstat (limited to 'src/systemctl')
-rw-r--r-- | src/systemctl/systemctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index b9d9b3aa96..d850b8bdf2 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -4740,6 +4740,11 @@ static int enable_unit(sd_bus *bus, char **args) { if (r < 0) return r; + /* If the operation was fully executed by the SysV compat, + * let's finish early */ + if (strv_isempty(names)) + return 0; + if (!bus || avoid_bus()) { if (streq(verb, "enable")) { r = unit_file_enable(arg_scope, arg_runtime, arg_root, names, arg_force, &changes, &n_changes); |