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

Re: systemd ignores / overrides 'shutdown -t' delay?



 Hi.

On Fri, 11 Sep 2015 14:22:12 -0400
The Wanderer <wanderer@fastmail.fm> wrote:

> I've recently built a VM against jessie, and just for the heck of it, I
> left it with the default systemd-based configuration.
> 
> When I log in to the console as root and try to shut down, I get the
> following:
> 
> ========
> # shutdown -h -t 0
> Broadcast message from root@hostname (Fri 2015-09-11 14:08:29 EDT):
> 
> The system is going down for power off at Fri 2015-09-11 14:09:29 EDT!
> ========
> 
> I.e., even though I specified a shutdown delay of zero seconds (meaning
> to shut down immediately), the shutdown is being delayed by 60 seconds.
> 
> What I expected instead was a response including the line
> 
> ========
> The system is going down for power off NOW!
> ========
<skip> 
> Any idea why this is happening, and how to get this VM to respect the
> semantics of the shutdown command again?

It seems like you're hitting 'undefined behavior' of shutdown.

shutdown(8) says:

The  time argument can have different formats.  First, it can be
an absolute time in the format hh:mm, in which hh is the hour (1 or 2
digits) and mm is the minute of the hour (in two digits).  Second, it
can be in the format +m, in which m is the number of minutes to wait.
The word now is an alias for +0.


So, I'd try to use shutdown the way the man says first.
I.e.

shutdown -h now

Reco


Reply to: