summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-11-21 22:40:03 +0100
committerLennart Poettering <lennart@poettering.net>2010-11-21 22:40:03 +0100
commitbe8088a2fb41467f66978f86b11bf47c546f24ed (patch)
treee63de8ddc7c6fd26d21bcd3acb2b0bdeaacb3cb9
parent600a328fc28c521ee19a0a1c22b14e6011275c20 (diff)
systemctl: don't return LSB status error codes for systemctl show
Use them only for systemctl status. https://bugzilla.redhat.com/show_bug.cgi?id=637183
-rw-r--r--TODO8
-rw-r--r--src/systemctl.c9
2 files changed, 11 insertions, 6 deletions
diff --git a/TODO b/TODO
index 12e292efb8..1069896cb4 100644
--- a/TODO
+++ b/TODO
@@ -28,8 +28,6 @@
* set_put(), hashmap_put() return values check. i.e. == 0 doesn't free()!
-* chkconfig/systemd enable glue
-
* io priority during initialization
* if a service fails too often, make the service enter failed mode, and the socket, too.
@@ -71,6 +69,12 @@
* isolate multi-user.target doesn't start a getty@tty1 if we run it from graphical.target
+Fedora:
+
+* obsolete readhead in system pkgs
+
+* chkconfig → systemd enable/daemon-reload glue
+
External:
* make cryptsetup lower --iter-time
diff --git a/src/systemctl.c b/src/systemctl.c
index 0948e619ce..4768fb20ad 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -2338,7 +2338,7 @@ static int print_property(const char *name, DBusMessageIter *iter) {
return 0;
}
-static int show_one(DBusConnection *bus, const char *path, bool show_properties, bool *new_line) {
+static int show_one(const char *verb, DBusConnection *bus, const char *path, bool show_properties, bool *new_line) {
DBusMessage *m = NULL, *reply = NULL;
const char *interface = "";
int r;
@@ -2438,7 +2438,8 @@ static int show_one(DBusConnection *bus, const char *path, bool show_properties,
print_status_info(&info);
if (!streq_ptr(info.active_state, "active") &&
- !streq_ptr(info.active_state, "reloading"))
+ !streq_ptr(info.active_state, "reloading") &&
+ streq(verb, "status"))
/* According to LSB: "program not running" */
r = 3;
@@ -2477,7 +2478,7 @@ static int show(DBusConnection *bus, char **args, unsigned n) {
/* If not argument is specified inspect the manager
* itself */
- ret = show_one(bus, "/org/freedesktop/systemd1", show_properties, &new_line);
+ ret = show_one(args[0], bus, "/org/freedesktop/systemd1", show_properties, &new_line);
goto finish;
}
@@ -2611,7 +2612,7 @@ static int show(DBusConnection *bus, char **args, unsigned n) {
goto finish;
}
- if ((r = show_one(bus, path, show_properties, &new_line)) != 0)
+ if ((r = show_one(args[0], bus, path, show_properties, &new_line)) != 0)
ret = r;
dbus_message_unref(m);