diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-10-14 00:49:53 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-10-14 00:49:53 +0200 |
commit | d37fb98bbcf85115a03664437ae02aa95f6af4bc (patch) | |
tree | 3897c9070d1044648dbf3d4935152f11964b4244 | |
parent | 567ea02a89b358090032c8d1ec89286db07ab2ff (diff) |
shutdown: execute rescue kill only once
-rw-r--r-- | src/shutdown.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shutdown.c b/src/shutdown.c index 3c9a53126f..43165fefa7 100644 --- a/src/shutdown.c +++ b/src/shutdown.c @@ -286,18 +286,18 @@ int main(int argc, char *argv[]) { if (need_umount || need_swapoff || need_loop_detach) { retries--; - if (retries <= FINALIZE_CRITICAL_ATTEMPTS) { + if (retries == FINALIZE_CRITICAL_ATTEMPTS) { log_warning("Approaching critical level to finalize filesystem and devices, try to kill all processes."); rescue_send_signal(SIGTERM); rescue_send_signal(SIGKILL); } if (retries > 0) - log_info("Action still required, %d tries left", retries); + log_info("Action still required, %d tries left.", retries); else { - log_error("Tried enough but still action required need_umount=%d, need_swapoff=%d, need_loop_detach=%d", need_umount, need_swapoff, need_loop_detach); - r = -EBUSY; - goto error; + log_error("Giving up. Actions left: Umount=%s, Swap off=%s, Loop detach=%s", + yes_no(need_umount), yes_no(need_swapoff), yes_no(need_loop_detach)); + break; } } } |