diff --git a/src/systemctl/systemctl-compat-halt.c b/src/systemctl/systemctl-compat-halt.c index b9164c27ab..4f6e304816 100644 --- a/src/systemctl/systemctl-compat-halt.c +++ b/src/systemctl/systemctl-compat-halt.c @@ -26,6 +26,11 @@ static int halt_help(void) { if (r < 0) return log_oom(); + /* Note: if you are tempted to add new command line switches here, please do not. Let this + * compatibility command rest in peace. Its interface is not even owned by us as much as it is by + * sysvinit. If you add something new, add it to "systemctl halt", "systemctl reboot", "systemctl + * poweroff" instead. */ + printf("%s [OPTIONS...]%s\n" "\n%s%s the system.%s\n" "\nOptions:\n" @@ -37,14 +42,16 @@ static int halt_help(void) { " -w --wtmp-only Don't halt/power-off/reboot, just write wtmp record\n" " -d --no-wtmp Don't write wtmp record\n" " --no-wall Don't send wall message before halt/power-off/reboot\n" + "\n%sThis is a compatibility interface, please use the more powerful 'systemctl %s' command instead.%s\n" "\nSee the %s for details.\n", program_invocation_short_name, arg_action == ACTION_REBOOT ? " [ARG]" : "", - ansi_highlight(), - arg_action == ACTION_REBOOT ? "Reboot" : - arg_action == ACTION_POWEROFF ? "Power off" : - "Halt", - ansi_normal(), + ansi_highlight(), arg_action == ACTION_REBOOT ? "Reboot" : + arg_action == ACTION_POWEROFF ? "Power off" : + "Halt", ansi_normal(), + ansi_highlight_red(), arg_action == ACTION_REBOOT ? "reboot" : + arg_action == ACTION_POWEROFF ? "poweroff" : + "halt", ansi_normal(), link); return 0; diff --git a/src/systemctl/systemctl-compat-shutdown.c b/src/systemctl/systemctl-compat-shutdown.c index 9d39e362ea..881d00e0a4 100644 --- a/src/systemctl/systemctl-compat-shutdown.c +++ b/src/systemctl/systemctl-compat-shutdown.c @@ -18,6 +18,11 @@ static int shutdown_help(void) { if (r < 0) return log_oom(); + /* Note: if you are tempted to add new command line switches here, please do not. Let this + * compatibility command rest in peace. Its interface is not even owned by us as much as it is by + * sysvinit. If you add something new, add it to "systemctl halt", "systemctl reboot", "systemctl + * poweroff" instead. */ + printf("%s [OPTIONS...] [TIME] [WALL...]\n" "\n%sShut down the system.%s\n" "\nOptions:\n" @@ -30,10 +35,12 @@ static int shutdown_help(void) { " --no-wall Don't send wall message before halt/power-off/reboot\n" " -c Cancel a pending shutdown\n" " --show Show pending shutdown\n" + "\n%sThis is a compatibility interface, please use the more powerful 'systemctl reboot',\n" + "'systemctl poweroff', 'systemctl reboot' commands instead.%s\n" "\nSee the %s for details.\n", program_invocation_short_name, - ansi_highlight(), - ansi_normal(), + ansi_highlight(), ansi_normal(), + ansi_highlight_red(), ansi_normal(), link); return 0;