]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
machinectl: add `restart` convenience alias (#30625)
authorChris Simons <35010457+simons-public@users.noreply.github.com>
Wed, 27 Dec 2023 22:09:42 +0000 (14:09 -0800)
committerGitHub <noreply@github.com>
Wed, 27 Dec 2023 22:09:42 +0000 (07:09 +0900)
man/machinectl.xml
src/machine/machinectl.c

index c1c7ab3d458eb4552635131b7ca8d9e742205eec..0fe6150baedad27f46ca6eb49572904455438862 100644 (file)
         trigger a reboot by sending SIGINT to the container's init
         process, which is roughly equivalent to pressing Ctrl+Alt+Del
         on a non-containerized system, and is compatible with
-        containers running any system manager.</para>
+        containers running any system manager. Use <command>restart</command> as alias 
+        for <command>reboot</command>.</para>
 
         <xi:include href="version-info.xml" xpointer="v209"/></listitem>
       </varlistentry>
index 4089ed2c75d44094b77a2150e1f0c6b7390b3198..e1bc9324439fba4c3491ceac69a007c988adbd83 100644 (file)
@@ -2945,6 +2945,7 @@ static int machinectl_main(int argc, char *argv[], sd_bus *bus) {
                 { "show-image",      VERB_ANY, VERB_ANY, 0,            show_image        },
                 { "terminate",       2,        VERB_ANY, 0,            terminate_machine },
                 { "reboot",          2,        VERB_ANY, 0,            reboot_machine    },
+                { "restart",         2,        VERB_ANY, 0,            reboot_machine    }, /* Convenience alias */
                 { "poweroff",        2,        VERB_ANY, 0,            poweroff_machine  },
                 { "stop",            2,        VERB_ANY, 0,            poweroff_machine  }, /* Convenience alias */
                 { "kill",            2,        VERB_ANY, 0,            kill_machine      },