|
Zbigniew Jędrzejewski-Szmek |
5d6eed |
From c9b991db38bc74ad36b1f584c5f7fdafc0278564 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
From: Franck Bui <fbui@suse.com>
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
Date: Wed, 30 Nov 2016 18:27:42 +0100
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
Subject: [PATCH] systemctl: fix 'is-enabled' exit status on failure when
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
executed in chroot (#4773)
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
(cherry picked from commit c5024cd05c194b93ae960bf38e567d3d998f2a03)
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
---
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
src/systemctl/systemctl.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
index a2b667481d..4edc690f5c 100644
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
--- a/src/systemctl/systemctl.c
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
+++ b/src/systemctl/systemctl.c
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
@@ -6384,7 +6384,7 @@ static int unit_is_enabled(int argc, char *argv[], void *userdata) {
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
r = unit_file_get_state(arg_scope, arg_root, *name, &state);
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
if (r < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
- return log_error_errno(state, "Failed to get unit file state for %s: %m", *name);
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
+ return log_error_errno(r, "Failed to get unit file state for %s: %m", *name);
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
if (IN_SET(state,
|
|
Zbigniew Jędrzejewski-Szmek |
03e93e |
UNIT_FILE_ENABLED,
|