From: Chris Simons <35010457+simons-public@users.noreply.github.com>
Date: Wed, 27 Dec 2023 22:09:42 +0000 (-0800)
Subject: machinectl: add `restart` convenience alias (#30625)
X-Git-Tag: v256-rc1~1374
X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ef362bf3d16d9929045c2f64af9e7dd9357dbb0;p=thirdparty%2Fsystemd.git
machinectl: add `restart` convenience alias (#30625)
---
diff --git a/man/machinectl.xml b/man/machinectl.xml
index c1c7ab3d458..0fe6150baed 100644
--- a/man/machinectl.xml
+++ b/man/machinectl.xml
@@ -279,7 +279,8 @@
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.
+ containers running any system manager. Use restart as alias
+ for reboot.
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index 4089ed2c75d..e1bc9324439 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -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 },