[systemd-commits] 3 commits - fixme man/systemctl.xml man/systemd-install.xml src/install.c src/systemctl.c
Lennart Poettering
lennart at kemper.freedesktop.org
Thu Jul 22 20:24:57 PDT 2010
fixme | 2 ++
man/systemctl.xml | 5 ++++-
man/systemd-install.xml | 4 ++--
src/install.c | 4 ++--
src/systemctl.c | 23 ++++++++++++++++++-----
5 files changed, 28 insertions(+), 10 deletions(-)
New commits:
commit 9d8a57fff160cc14873ebcbc79a4216a18b42f70
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Jul 23 05:24:45 2010 +0200
systemctl: support force-reload and condrestart as aliases for reload-or-try-restart
diff --git a/src/systemctl.c b/src/systemctl.c
index de928c5..667aeae 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -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 },
commit 85e5760d4ffe99d578caf085ca0608b2bb2d4889
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Jul 23 05:24:24 2010 +0200
install: default to minimal realization mode
diff --git a/man/systemd-install.xml b/man/systemd-install.xml
index 47dc63a..228a916 100644
--- a/man/systemd-install.xml
+++ b/man/systemd-install.xml
@@ -185,7 +185,7 @@
<option>--realize</option> is
specifieed but the mode value is
omitted defaults to
- <option>maybe</option>. This option
+ <option>minimal</option>. This option
has no effect when
<option>--global</option> or
<command>test</command> is used, or
@@ -258,7 +258,7 @@
<option>--realize</option>. If
<option>--realize</option> is not
specified implies
- <option>maybe</option> mode. To
+ <option>minimal</option> mode. To
override this mode specify
<option>--realize=</option> in
addition to
diff --git a/src/install.c b/src/install.c
index 751d52b..2d6316a 100644
--- a/src/install.c
+++ b/src/install.c
@@ -156,7 +156,7 @@ static int parse_argv(int argc, char *argv[]) {
realize_switch = true;
if (!optarg)
- arg_realize = REALIZE_MAYBE;
+ arg_realize = REALIZE_MINIMAL;
else if (streq(optarg, "no"))
arg_realize = REALIZE_NO;
else if (streq(optarg, "minimal"))
@@ -206,7 +206,7 @@ static int parse_argv(int argc, char *argv[]) {
arg_action = ACTION_REALIZE;
if (!realize_switch)
- arg_realize = REALIZE_MAYBE;
+ arg_realize = REALIZE_MINIMAL;
} else {
log_error("Unknown verb %s.", argv[optind]);
return -EINVAL;
commit ea4a240dc2e70adcb39704542b1422b1608e76e6
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Jul 23 05:24:05 2010 +0200
systemctl: accept -p more than once
diff --git a/fixme b/fixme
index ec2f721..286651a 100644
--- a/fixme
+++ b/fixme
@@ -53,6 +53,8 @@
* io priority during initialization
+* if a service fails too often, make the service enter maintainence mode, and the socket, too.
+
External:
* default.target must be %ghosted...
diff --git a/man/systemctl.xml b/man/systemctl.xml
index b8e00b6..678bf0b 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -100,7 +100,10 @@
not specified all set properties are
shown. The argument should be a
property name, such as
- <literal>MainPID</literal>.</para></listitem>
+ <literal>MainPID</literal>. If
+ specified more than once all
+ properties with the specified names
+ are shown.</para></listitem>
</varlistentry>
<varlistentry>
diff --git a/src/systemctl.c b/src/systemctl.c
index d78294b..de928c5 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -47,7 +47,7 @@
#include "list.h"
static const char *arg_type = NULL;
-static const char *arg_property = NULL;
+static char **arg_property = NULL;
static bool arg_all = false;
static bool arg_fail = false;
static bool arg_session = false;
@@ -1702,7 +1702,7 @@ static int print_property(const char *name, DBusMessageIter *iter) {
/* This is a low-level property printer, see
* print_status_info() for the nicer output */
- if (arg_property && !streq(name, arg_property))
+ if (arg_property && !strv_find(arg_property, name))
return 0;
switch (dbus_message_iter_get_arg_type(iter)) {
@@ -3089,14 +3089,21 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
arg_type = optarg;
break;
- case 'p':
- arg_property = optarg;
+ case 'p': {
+ char **l;
+
+ if (!(l = strv_append(arg_property, optarg)))
+ return -ENOMEM;
+
+ strv_free(arg_property);
+ arg_property = l;
/* If the user asked for a particular
* property, show it to him, even if it is
* empty. */
arg_all = true;
break;
+ }
case 'a':
arg_all = true;
@@ -3927,5 +3934,7 @@ finish:
dbus_shutdown();
+ strv_free(arg_property);
+
return retval;
}
More information about the systemd-commits
mailing list