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

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



On 2015-09-11 at 14:49, Ralph Katz wrote:

> On 09/11/2015 02:22 PM, The Wanderer 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:

>> Any idea why this is happening, and how to get this VM to respect
>> the semantics of the shutdown command again?
> 
> There is no "-t" option.
> 
> man shutdown
> shutdown [OPTIONS...] [TIME] [WALL...]
> "If no time argument is specified, "+1" is implied."

There is under sysvinit:

man shutdown
/sbin/shutdown [-krhPHfFnc] [-t sec] time [warning message]


Apparently I've been misunderstanding and mis-using shutdown's syntx all
of these years. I've been under the impression that the argument to '-t'
was the time to delay before shutting down, but the man page says that
that delay is specified by the 'time' argument instead.

The confusing part of this is that the man page says that the 'time'
argument is mandatory, but I have been using shutdown for years and
years without passing that argument. I've used the exact syntax I gave
('shutdown -h -t 0'), and it's been accepted and interpreted as if I had
instead typed 'shutdown -h 0'.

At least I probably now know how to shut down this VM without delays.
It's still odd / bothersome that systemd's shutdown would see the
unsupported / unrecognized '-t' option and just proceed blithely along,
rather than erroring out on the presumption that a mistake may have been
made.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: