]> err.no Git - systemd/commitdiff
systemctl: support force-reload and condrestart as aliases for reload-or-try-restart
authorLennart Poettering <lennart@poettering.net>
Fri, 23 Jul 2010 03:24:45 +0000 (05:24 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 23 Jul 2010 03:24:45 +0000 (05:24 +0200)
src/systemctl.c

index de928c56610e513a3b5b1a2e6319119138afbe66..667aeaeb9642cd4ee40891c745d96f522681b46c 100644 (file)
@@ -1087,7 +1087,9 @@ static int start_unit(DBusConnection *bus, char **args, unsigned n) {
                         streq(args[0], "restart")               ? "RestartUnit" :
                         streq(args[0], "try-restart")           ? "TryRestartUnit" :
                         streq(args[0], "reload-or-restart")     ? "ReloadOrRestartUnit" :
-                        streq(args[0], "reload-or-try-restart") ? "ReloadOrTryRestartUnit" :
+                        streq(args[0], "reload-or-try-restart") ||
+                        streq(args[0], "force-reload")          ||
+                        streq(args[0], "condrestart")           ? "ReloadOrTryRestartUnit" :
                                                                   "StartUnit";
 
                 mode =
@@ -3660,6 +3662,8 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[]) {
                 { "try-restart",       MORE,  2, start_unit      },
                 { "reload-or-restart", MORE,  2, start_unit      },
                 { "reload-or-try-restart", MORE, 2, start_unit   },
+                { "force-reload",      MORE,  2, start_unit      }, /* For compatibility with SysV */
+                { "condrestart",       MORE,  2, start_unit      }, /* For compatibility with RH */
                 { "isolate",           EQUAL, 2, start_unit      },
                 { "check",             MORE,  2, check_unit      },
                 { "show",              MORE,  1, show            },