diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-10-16 15:24:44 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-10-17 19:31:50 +0200 |
commit | 1710d4beff6329cf6ae0767953cad09593517b2a (patch) | |
tree | 67789bf30151a05606382cec009ca60ac6ca210e /src/core/emergency-action.c | |
parent | 3f00d379fa6221a4570c8cd955afd9b661787db9 (diff) | |
download | systemd-1710d4beff6329cf6ae0767953cad09593517b2a.tar.gz |
core: limit service-watchdogs=no to actual "watchdog" commands
The setting is now only looked at when considering an action for a job timeout
or unit start limit. It is ignored for ctrl-alt-del, SuccessAction, SuccessFailure.
v2: turn the parameter into a flag field
v3: rename Options to Flags
Diffstat (limited to 'src/core/emergency-action.c')
-rw-r--r-- | src/core/emergency-action.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/emergency-action.c b/src/core/emergency-action.c index e14a3aae17..3f0c11a3f2 100644 --- a/src/core/emergency-action.c +++ b/src/core/emergency-action.c @@ -21,6 +21,7 @@ static void log_and_status(Manager *m, const char *message, const char *reason) int emergency_action( Manager *m, EmergencyAction action, + EmergencyActionFlags options, const char *reboot_arg, const char *reason) { @@ -31,7 +32,7 @@ int emergency_action( if (action == EMERGENCY_ACTION_NONE) return -ECANCELED; - if (!m->service_watchdogs) { + if (FLAGS_SET(options, EMERGENCY_ACTION_IS_WATCHDOG) && !m->service_watchdogs) { log_warning("Watchdog disabled! Not acting on: %s", reason); return -ECANCELED; } |