summaryrefslogtreecommitdiff
path: root/src/shared/reboot-util.h
diff options
context:
space:
mode:
authorVesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>2019-03-09 22:30:45 +0200
committerVesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>2019-03-22 17:38:54 +0200
commit77defcf5382a557189350f928967d676510e362c (patch)
tree883732c4d081c2d382a4858deef0b4deab65dff0 /src/shared/reboot-util.h
parent9b89e602ea7be5d8c08a4019b67016fa58d0341d (diff)
downloadsystemd-77defcf5382a557189350f928967d676510e362c.tar.gz
systemctl: restore "systemctl reboot ARG" functionality
Commit d85515edcf9700dc068201ab9f7103f04f3b25b2 changed logic how reboot is executed. That commit changed behavior to use emergency action reboot code path to perform the reboot. This inadvertently broke rebooting with argument: $ systemctl reboot custom-reason Restore original behavior so that if reboot service unit similar to systemd-reboot.service is executed it is possible to override reboot reason with "systemctl reboot ARG". When "systemctl reboot ARG" is executed ARG is placed in file /run/systemd/reboot-param and reboot is issued using logind's Reboot dbus-service. If RebootArgument is specified in systemd-reboot.service it takes precedence over what systemctl sets. Fixes: #11828
Diffstat (limited to 'src/shared/reboot-util.h')
-rw-r--r--src/shared/reboot-util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/reboot-util.h b/src/shared/reboot-util.h
index d459333efc..ac59b7d79c 100644
--- a/src/shared/reboot-util.h
+++ b/src/shared/reboot-util.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
-int update_reboot_parameter_and_warn(const char *parameter);
+int update_reboot_parameter_and_warn(const char *parameter, bool keep);
typedef enum RebootFlags {
REBOOT_LOG = 1 << 0, /* log about what we are going to do and all errors */