mirror of
https://github.com/systemd/systemd.git
synced 2024-11-27 20:23:36 +08:00
systemctl: skip native unit file handling if sysv file handling already handled everything
Issue pointed out by Colin Guthrie.
This commit is contained in:
parent
488ad3b32a
commit
67d6621059
@ -4740,6 +4740,11 @@ static int enable_unit(sd_bus *bus, char **args) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
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 (!bus || avoid_bus()) {
|
||||||
if (streq(verb, "enable")) {
|
if (streq(verb, "enable")) {
|
||||||
r = unit_file_enable(arg_scope, arg_runtime, arg_root, names, arg_force, &changes, &n_changes);
|
r = unit_file_enable(arg_scope, arg_runtime, arg_root, names, arg_force, &changes, &n_changes);
|
||||||
|
Loading…
Reference in New Issue
Block a user