From: Lennart Poettering Date: Tue, 14 Sep 2010 00:22:55 +0000 (+0200) Subject: systemctl: use isolate when called as telinit for a runlevel X-Git-Tag: v10~1 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=6f0d624ec785409ad82c2e3afb786d977f2b1c87;hp=e43ac8788b340a5d01c9c7e4c93c70d6b06a316d systemctl: use isolate when called as telinit for a runlevel --- diff --git a/src/initctl.c b/src/initctl.c index 53eac5754..15da4593d 100644 --- a/src/initctl.c +++ b/src/initctl.c @@ -119,7 +119,7 @@ static void change_runlevel(Server *s, int runlevel) { else mode = "replace"; - log_debug("Running request %s", target); + log_debug("Running request %s/start/%s", target, mode); if (!(m = dbus_message_new_method_call("org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "StartUnit"))) { log_error("Could not allocate message."); diff --git a/src/systemctl.c b/src/systemctl.c index 627b9055a..1f93bc974 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -1254,7 +1254,11 @@ static int start_unit(DBusConnection *bus, char **args, unsigned n) { method = "StartUnit"; mode = (arg_action == ACTION_EMERGENCY || - arg_action == ACTION_RESCUE) ? "isolate" : "replace"; + arg_action == ACTION_RESCUE || + arg_action == ACTION_RUNLEVEL2 || + arg_action == ACTION_RUNLEVEL3 || + arg_action == ACTION_RUNLEVEL4 || + arg_action == ACTION_RUNLEVEL5) ? "isolate" : "replace"; one_name = table[arg_action]; }