summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2010-09-20 20:45:08 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-21 00:24:23 +0200
commitaa5939a3ba4a0004ced1be4d8f9b0eb7521e4cef (patch)
tree8634f9c380a4985f72a6c12898e7dd7df103adc8
parentf2fcd59ffaaa97aaa238089cde5225f0e1086904 (diff)
systemctl: make condrestart equivalent to try-restart
"condrestart" should be equivalent to "try-restart", i.e. it should be translated into "TryRestartUnit". See http://fedoraproject.org/wiki/Packaging:SysVInitScript#condrestart_and_try-restart Fixes https://bugzilla.redhat.com/show_bug.cgi?id=635780
-rw-r--r--src/systemctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index 8e538d64a4..525e2f0b17 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -1257,11 +1257,11 @@ static int start_unit(DBusConnection *bus, char **args, unsigned n) {
streq(args[0], "stop") ? "StopUnit" :
streq(args[0], "reload") ? "ReloadUnit" :
streq(args[0], "restart") ? "RestartUnit" :
- streq(args[0], "try-restart") ? "TryRestartUnit" :
+ streq(args[0], "try-restart") ||
+ streq(args[0], "condrestart") ? "TryRestartUnit" :
streq(args[0], "reload-or-restart") ? "ReloadOrRestartUnit" :
streq(args[0], "reload-or-try-restart") ||
- streq(args[0], "force-reload") ||
- streq(args[0], "condrestart") ? "ReloadOrTryRestartUnit" :
+ streq(args[0], "force-reload") ? "ReloadOrTryRestartUnit" :
"StartUnit";
mode =