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 683f2e7..c233543 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 509651c..0f19c25 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])];