Re: emergency shutdown, don't wait for timeouts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The solution may be a dual prong approach. You have one forced poweroff that will execute after a certain delay, while the other works now. Something like this:

sleep 45 && systemctl --force poweroff & shutdown -h now

That way the normal shutdown begins, but if it's not completed in 45 seconds the force takes place. I can't be sure this would work. But some variant thereof is probably going to be the solution.

On 12/27/2020 7:40 AM, Andrei Borzenkov wrote:
27.12.2020 17:00, Reindl Harald пишет:

Am 27.12.20 um 14:43 schrieb Andrei Borzenkov:
27.12.2020 16:26, Germano Massullo пишет:
Good day, I recently joined apcupsd (APC UPS Power Control Daemon)
package maintainers on Fedora/CentOS/RHEL.
After a power failure, apcupsd shuts down the system with a command
almost identical to
shutdown -h -H now
Usually when you normally shutdown your system, you may notice certain
services taking too much time to terminate and triggering a timeout
value before systemd forces them to terminate. I would like to ask if
there is a way to force the system to shutdown without waiting for these
timeouts in case an emergency like a power failure.

You can force shutdown without going via normal stop of services.

systemctl --force poweroff
but that is only a part of the solution because normally most services
don't take long to stop and they should be normally stopped whenever
possible

the real solution would a option to reduce the timeouts

systemctl --timeout=5 poweroff
sytemctl does not have this option.
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

--
Dan Egli
From my Test Server

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux