From 1433e1f998465b7acf472c73d58c14e7e2eb3f13 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Sun, 5 Mar 2023 23:27:44 +0800 Subject: systemctl: add option --when for scheduled shutdown Pass an empty string or "cancel" will cancel the action. Pass "show" will show the scheduled actions. Replaces #17258 --- man/systemctl.xml | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'man') diff --git a/man/systemctl.xml b/man/systemctl.xml index e0f499c41e..f930034cb1 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -1486,6 +1486,9 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err is specified twice the halt operation is executed by systemctl itself, and the system manager is not contacted. This means the command should succeed even when the system manager has crashed. + + If combined with , shutdown will be scheduled after the given timestamp. + And will cancel the shutdown. @@ -1497,13 +1500,8 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err users. This command is asynchronous; it will return after the power-off operation is enqueued, without waiting for it to complete. - If combined with , shutdown of all running services is skipped, however all - processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the - powering off. If is specified twice, the operation is immediately executed without - terminating any processes or unmounting any file systems. This may result in data loss. Note that when - is specified twice the power-off operation is executed by - systemctl itself, and the system manager is not contacted. This means the command should - succeed even when the system manager has crashed. + This command honors and in a similar way + as halt. @@ -1517,14 +1515,6 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err users. This command is asynchronous; it will return after the reboot operation is enqueued, without waiting for it to complete. - If combined with , shutdown of all running services is skipped, however all - processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the - reboot. If is specified twice, the operation is immediately executed without - terminating any processes or unmounting any file systems. This may result in data loss. Note that when - is specified twice the reboot operation is executed by - systemctl itself, and the system manager is not contacted. This means the command should - succeed even when the system manager has crashed. - If the switch is given, it will be passed as the optional argument to the reboot2 system call. @@ -1532,6 +1522,9 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err Options , , and can be used to select what to do after the reboot. See the descriptions of those options for details. + + This command honors and in a similar way + as halt. @@ -1544,9 +1537,8 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err asynchronous; it will return after the reboot operation is enqueued, without waiting for it to complete. - If combined with , shutdown of all running services is skipped, however all - processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the - reboot. + This command honors and in a similar way + as halt. @@ -2477,6 +2469,19 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err + + + + + When used with halt, poweroff, reboot + or kexec, schedule the action to be performed at the given timestamp, + which should adhere to the syntax documented in systemd.time7 + section "PARSING TIMESTAMPS". Specially, if show is given, the currently scheduled + action will be shown, which can be canceled by passing an empty string or cancel. + + + -- cgit v1.2.1