summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-17 03:41:51 +0100
committerLennart Poettering <lennart@poettering.net>2011-03-17 03:41:51 +0100
commita76f7be2b02416ff430625766619f4443f2141cf (patch)
tree6b3a8c7bade75ed93a965d797f3b87569ebf7fc2 /src
parentdbus: allow LoadUnit to unprivileged users (diff)
downloadsystemd-a76f7be2b02416ff430625766619f4443f2141cf.tar.xz
systemd-a76f7be2b02416ff430625766619f4443f2141cf.zip
systemctl: accept condstop as alias for stop
Diffstat (limited to 'src')
-rw-r--r--src/systemctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index 5db094fc15..87ecf03410 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -1420,7 +1420,8 @@ static int start_unit(DBusConnection *bus, char **args, unsigned n) {
if (arg_action == ACTION_SYSTEMCTL) {
method =
- streq(args[0], "stop") ? "StopUnit" :
+ streq(args[0], "stop") ||
+ streq(args[0], "condstop") ? "StopUnit" :
streq(args[0], "reload") ? "ReloadUnit" :
streq(args[0], "restart") ? "RestartUnit" :
@@ -5235,6 +5236,7 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError
{ "cancel", MORE, 2, cancel_job },
{ "start", MORE, 2, start_unit },
{ "stop", MORE, 2, start_unit },
+ { "condstop", MORE, 2, start_unit }, /* For compatibility with ALTLinux */
{ "reload", MORE, 2, start_unit },
{ "restart", MORE, 2, start_unit },
{ "try-restart", MORE, 2, start_unit },