diff options
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | src/systemctl/systemctl-start-special.c | 15 | ||||
-rw-r--r-- | src/systemctl/systemctl.c | 2 |
3 files changed, 8 insertions, 14 deletions
@@ -32,6 +32,11 @@ CHANGES WITH 253 in spe: virtualized ones, and is activated in the case that the system token is missing from either sd-boot and sd-stub booted systems. + Changes in systemctl: + + * systemctl reboot has dropped support for accepting a positional argument + as the argument to reboot(2) syscall. Please use --reboot-argument instead. + CHANGES WITH 252 🎃: Announcements of Future Feature Removals: diff --git a/src/systemctl/systemctl-start-special.c b/src/systemctl/systemctl-start-special.c index 9363764cd7..edc907c832 100644 --- a/src/systemctl/systemctl-start-special.c +++ b/src/systemctl/systemctl-start-special.c @@ -153,19 +153,8 @@ int verb_start_special(int argc, char *argv[], void *userdata) { return r; if (a == ACTION_REBOOT) { - const char *arg = NULL; - - if (argc > 1) { - if (arg_reboot_argument) - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Both --reboot-argument= and positional argument passed to reboot command, refusing."); - - log_notice("Positional argument to reboot command is deprecated, please use --reboot-argument= instead. Accepting anyway."); - arg = argv[1]; - } else - arg = arg_reboot_argument; - - if (arg) { - r = update_reboot_parameter_and_warn(arg, false); + if (arg_reboot_argument) { + r = update_reboot_parameter_and_warn(arg_reboot_argument, false); if (r < 0) return r; } diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 3f28bcc3dc..4f2637f0f1 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -1087,7 +1087,7 @@ static int systemctl_main(int argc, char *argv[]) { { "import-environment", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, verb_import_environment }, { "halt", VERB_ANY, 1, VERB_ONLINE_ONLY, verb_start_system_special }, { "poweroff", VERB_ANY, 1, VERB_ONLINE_ONLY, verb_start_system_special }, - { "reboot", VERB_ANY, 2, VERB_ONLINE_ONLY, verb_start_system_special }, + { "reboot", VERB_ANY, 1, VERB_ONLINE_ONLY, verb_start_system_special }, { "kexec", VERB_ANY, 1, VERB_ONLINE_ONLY, verb_start_system_special }, { "suspend", VERB_ANY, 1, VERB_ONLINE_ONLY, verb_start_system_special }, { "hibernate", VERB_ANY, 1, VERB_ONLINE_ONLY, verb_start_system_special }, |