diff options
author | Joel Holdsworth <joel.holdsworth@vcatechnology.com> | 2016-03-03 20:40:01 +0000 |
---|---|---|
committer | Joel Holdsworth <joel.holdsworth@vcatechnology.com> | 2016-03-04 15:13:40 +0000 |
commit | 9c0d1c1cb5a06d5799c6874d9e284353b76f760e (patch) | |
tree | bcbe93c9b4885999b47ab4e042cc70dd2099cb00 /src/core/failure-action.c | |
parent | 9f0cd100d0dbc7c9b55e99bacb4034402a60b389 (diff) |
core/failure-action: Set job-modes to replace-irreversibly
Up until now, the failure action has launched reboot.target and
poweroff.target with a less aggressive job mode than
"systemctl reboot" does. This has meant that the reboot and power-
off operations can stall if there are any conflicts with the target
during rebooting.
Diffstat (limited to 'src/core/failure-action.c')
-rw-r--r-- | src/core/failure-action.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/failure-action.c b/src/core/failure-action.c index 39f5519ca1..bb2bc3f399 100644 --- a/src/core/failure-action.c +++ b/src/core/failure-action.c @@ -62,7 +62,8 @@ int failure_action( log_and_status(m, "Rebooting as result of failure."); update_reboot_param_file(reboot_arg); - (void) manager_add_job_by_name_and_warn(m, JOB_START, SPECIAL_REBOOT_TARGET, JOB_REPLACE, NULL); + (void) manager_add_job_by_name_and_warn(m, JOB_START, SPECIAL_REBOOT_TARGET, + JOB_REPLACE_IRREVERSIBLY, NULL); break; @@ -89,7 +90,8 @@ int failure_action( case FAILURE_ACTION_POWEROFF: log_and_status(m, "Powering off as result of failure."); - (void) manager_add_job_by_name_and_warn(m, JOB_START, SPECIAL_POWEROFF_TARGET, JOB_REPLACE, NULL); + (void) manager_add_job_by_name_and_warn(m, JOB_START, SPECIAL_POWEROFF_TARGET, + JOB_REPLACE_IRREVERSIBLY, NULL); break; case FAILURE_ACTION_POWEROFF_FORCE: |