summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorChristian Hesse <list@eworm.de>2012-10-17 16:03:49 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-10-19 17:34:02 +0200
commitdf77cdf0fccadbb5989042d43cde2f88aa9afd2c (patch)
tree2a28d9b07fcbca4073cd4bb3ab8ed566c5d303aa /src/systemctl
parentf527b6b8e23759eabe9ebcb50b7dce412d5132d3 (diff)
systemctl: fix return code in chroot
If 'systemctl enable' (and friends) is run inside chroot it always exits with a bad return code. unit_file_enable() returns the number of symlink rules that were supposed to be created. So resetting r to 0 and exiting gracefully should be the correct way.
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index bb7213354d..b4b58c05b0 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -3630,6 +3630,7 @@ static int enable_unit(DBusConnection *bus, char **args) {
}
}
+ r = 0;
} else {
const char *method;
bool send_force = true, expect_carries_install_info = false;