chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81ab0d3
)
systemctl: fix exit code when directing is-enabled to chkconfig
author
Lennart Poettering
<lennart@poettering.net>
Fri, 4 Mar 2011 18:48:38 +0000
(19:48 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 4 Mar 2011 18:48:38 +0000
(19:48 +0100)
src/systemctl.c
patch
|
blob
|
history
diff --git
a/src/systemctl.c
b/src/systemctl.c
index b733b47c84420eb90d0b1a12ff42a260723f040d..6adcbcc066a6ee9ff3f3b01c90e6727506f067d4 100644
(file)
--- a/
src/systemctl.c
+++ b/
src/systemctl.c
@@
-4087,10
+4087,15
@@
static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo
return r;
if (status.si_code == CLD_EXITED) {
- if (status.si_status == 0 && (streq(verb, "enable") || streq(verb, "disable")))
+
+ if (streq(verb, "is-enabled"))
+ return status.si_status == 0 ? 1 : 0;
+
+ if (status.si_status == 0)
n_symlinks ++;
return status.si_status == 0 ? 0 : -EINVAL;
+
} else
return -EPROTO;
}
@@
-4193,6
+4198,8
@@
static int enable_unit(DBusConnection *bus, char **args, unsigned n) {
goto finish;
}
+ r = 0;
+
while ((i = hashmap_first(will_install))) {
int q;