|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
From d953cda9e6b3e41f419b63a35632edc8f769a7d0 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
From: Lennart Poettering <lennart@poettering.net>
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
Date: Mon, 20 Jan 2014 13:43:20 +0100
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
Subject: [PATCH] systemctl: skip native unit file handling if sysv file
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
handling already handled everything
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
Issue pointed out by Colin Guthrie.
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
src/systemctl/systemctl.c | 5 +++++
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
1 file changed, 5 insertions(+)
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
index bc9808a..da49da7 100644
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
--- a/src/systemctl/systemctl.c
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
+++ b/src/systemctl/systemctl.c
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
@@ -4436,6 +4436,11 @@ static int enable_unit(DBusConnection *bus, char **args) {
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
if (r < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
return r;
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
+ /* If the operation was fully executed by the SysV compat,
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
+ * let's finish early */
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
+ if (strv_isempty(mangled_names))
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
+ return 0;
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
if (!bus || avoid_bus()) {
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
if (streq(verb, "enable")) {
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
r = unit_file_enable(arg_scope, arg_runtime, arg_root, mangled_names, arg_force, &changes, &n_changes);
|