systemctl: skip native unit file handling if sysv file handling already handled everything

Issue pointed out by Colin Guthrie.

(cherry picked from commit 67d6621059)
This commit is contained in:
Lennart Poettering
2014-02-23 12:42:01 +00:00
committed by Colin Guthrie
parent e81566523e
commit 345151292f
+5
View File
@@ -4436,6 +4436,11 @@ static int enable_unit(DBusConnection *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(mangled_names))
return 0;
if (!bus || avoid_bus()) {
if (streq(verb, "enable")) {
r = unit_file_enable(arg_scope, arg_runtime, arg_root, mangled_names, arg_force, &changes, &n_changes);