From b7e8d5af06ee840cc48217ca4629cf28aeeb3c50 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:35:19 +0200 Subject: Adding debian version 252.22-1~deb12u1. Signed-off-by: Daniel Baumann --- ...-shutdown-immediately-on-scheduled-shutdo.patch | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 debian/patches/debian/systemctl-do-not-shutdown-immediately-on-scheduled-shutdo.patch (limited to 'debian/patches/debian/systemctl-do-not-shutdown-immediately-on-scheduled-shutdo.patch') diff --git a/debian/patches/debian/systemctl-do-not-shutdown-immediately-on-scheduled-shutdo.patch b/debian/patches/debian/systemctl-do-not-shutdown-immediately-on-scheduled-shutdo.patch new file mode 100644 index 0000000..f157e45 --- /dev/null +++ b/debian/patches/debian/systemctl-do-not-shutdown-immediately-on-scheduled-shutdo.patch @@ -0,0 +1,34 @@ +From: Ioanna Alifieraki +Date: Thu, 17 Dec 2020 14:52:07 +0000 +Subject: systemctl: do not shutdown immediately on scheduled shutdown + +When, for whatever reason, a scheduled shutdown fails to be set, systemd +will proceed with immediate shutdown without allowing the user to react. +This is counterintuitive because when a scheduled shutdown is issued, +it means the user wants to shutdown at a specified time in the future, +not immediately. This patch prevents the immediate shutdown and informs +the user that no action will be taken. + +Fixes: #17575 +--- + src/systemctl/systemctl-compat-halt.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/systemctl/systemctl-compat-halt.c b/src/systemctl/systemctl-compat-halt.c +index 8a0e4e6..7eeec9a 100644 +--- a/src/systemctl/systemctl-compat-halt.c ++++ b/src/systemctl/systemctl-compat-halt.c +@@ -148,9 +148,11 @@ int halt_main(void) { + + if (arg_force == 0) { + /* always try logind first */ +- if (arg_when > 0) ++ if (arg_when > 0) { + r = logind_schedule_shutdown(); +- else { ++ if (r < 0) ++ return r; ++ } else { + r = logind_check_inhibitors(arg_action); + if (r < 0) + return r; -- cgit v1.2.3