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