chiark / gitweb /
systemctl: make "systemctl default" use "isolate" job mode
authorMichal Schmidt <mschmidt@redhat.com>
Fri, 22 Feb 2013 08:56:16 +0000 (09:56 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Fri, 22 Feb 2013 15:06:17 +0000 (16:06 +0100)
"systemctl default" should behave identically to "telinit N" (where N is the
corresponding runlevel target number), therefore it should use isolate job mode
too.

man/systemctl.xml
src/systemctl/systemctl.c

index 683f2e74028a43b7360b82b5a5c9e304840847e1..c233543d7d2224c67b415d4b0dc129173c7e0847 100644 (file)
@@ -970,7 +970,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
         <listitem>
           <para>Enter default mode. This is mostly equivalent to
-          <command>start default.target</command>.</para>
+          <command>isolate default.target</command>.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
index 509651c1fd35a435a1a5c0404c212d89641683c2..0f19c25ce594a0336ea2abc8306769a67d09c062 100644 (file)
@@ -1598,7 +1598,8 @@ static int start_unit(DBusConnection *bus, char **args) {
                 mode =
                         (streq(args[0], "isolate") ||
                          streq(args[0], "rescue")  ||
-                         streq(args[0], "emergency")) ? "isolate" : arg_job_mode;
+                         streq(args[0], "emergency") ||
+                         streq(args[0], "default")) ? "isolate" : arg_job_mode;
 
                 one_name = table[verb_to_action(args[0])];