Heh, I believe there are historical options re -H -h. As a wild guess, i looked at the sysvinit implementation in Debian (we have removed the package in Ubuntu) it has this:
-h Halt or power off after shutdown.
-H Modifier to the -h flag. Halt action is to halt or drop into boot monitor on sys‐
tems that support it. Must be used with the -h flag.
So clear as mud, and i guess the "portable" way is to call "shutdown -h -H" or something.
RE: scheduling
I guess you could inspect the system from landscape as follows:
- check system has re-execed into systemd init ( [ -d /run/systemd/system ] )
- check that upstart is gone ( UPSTART_SESSION= initctl version )
- poke the dbus interface to see if logind is there and has support for timing things (probably using busctl http://manpages.ubuntu.com/manpages/xenial/en/man1/busctl.1.html)
- realise the scheduling will not work
- request shutdown now
Imho, failing to schedule thing to shutdown, should shut the machine down instantly. Or i should upgrade machine from trusty to xenial; and like snapshot it; and figure out why scheduling does not work / logind is not there.
Heh, I believe there are historical options re -H -h. As a wild guess, i looked at the sysvinit implementation in Debian (we have removed the package in Ubuntu) it has this:
-h Halt or power off after shutdown.
-H Modifier to the -h flag. Halt action is to halt or drop into boot monitor on sys‐
tems that support it. Must be used with the -h flag.
So clear as mud, and i guess the "portable" way is to call "shutdown -h -H" or something.
RE: scheduling
I guess you could inspect the system from landscape as follows: manpages. ubuntu. com/manpages/ xenial/ en/man1/ busctl. 1.html)
- check system has re-execed into systemd init ( [ -d /run/systemd/system ] )
- check that upstart is gone ( UPSTART_SESSION= initctl version )
- poke the dbus interface to see if logind is there and has support for timing things (probably using busctl http://
- realise the scheduling will not work
- request shutdown now
Imho, failing to schedule thing to shutdown, should shut the machine down instantly. Or i should upgrade machine from trusty to xenial; and like snapshot it; and figure out why scheduling does not work / logind is not there.