/sbin/shutdown, post upgrade not working, imho is a severe bug. I'll investigate that. I suspect that because we cannot restart dbus things don't show up there, but /sbin/shutdown should be smart enough to do something. I guess the scheduling of timeout is failing, but /sbin/shutdown now works?
Re differences between halt & poweroff, in systemd, eventually it results in:
case ACTION_HALT:
(void) reboot(RB_HALT_SYSTEM);
case ACTION_POWEROFF:
(void) reboot(RB_POWER_OFF);
For completeness reboot typically is:
(void) reboot(RB_AUTOBOOT);
of if parameter was specified (aka androidish - reboot recovery):
(void) raw_reboot(LINUX_REBOOT_CMD_RESTART2, parameter);
This is the same as with upstart's implementation:
case REBOOT:
reboot (RB_AUTOBOOT);
case HALT:
reboot (RB_HALT_SYSTEM);
case POWEROFF:
reboot (RB_POWER_OFF);
case REBOOTCOMMAND:
syscall (SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, rebootcommand);
I have not read kernel code in a while for this, but if i'm not mistaken poweroff fallsback to halt, in the kernel, if there is no hardware support to kill power.
/sbin/shutdown, post upgrade not working, imho is a severe bug. I'll investigate that. I suspect that because we cannot restart dbus things don't show up there, but /sbin/shutdown should be smart enough to do something. I guess the scheduling of timeout is failing, but /sbin/shutdown now works?
Re differences between halt & poweroff, in systemd, eventually it results in:
case ACTION_HALT: RB_HALT_ SYSTEM) ;
(void) reboot(
case ACTION_POWEROFF: RB_POWER_ OFF);
(void) reboot(
For completeness reboot typically is: RB_AUTOBOOT) ;
(void) reboot(
of if parameter was specified (aka androidish - reboot recovery): LINUX_REBOOT_ CMD_RESTART2, parameter);
(void) raw_reboot(
This is the same as with upstart's implementation:
case REBOOT:
reboot (RB_AUTOBOOT);
case HALT:
reboot (RB_HALT_SYSTEM);
case POWEROFF:
reboot (RB_POWER_OFF);
case REBOOTCOMMAND:
LINUX_REBOOT_ MAGIC1,
LINUX_REBOOT_ MAGIC2,
LINUX_REBOOT_ CMD_RESTART2,
rebootcommand) ;
syscall (SYS_reboot,
Differences between RB_HALT_SYSTEM and RB_POWER_OFF can be read in the linux manpage here: http:// manpages. ubuntu. com/manpages/ bionic/ en/man2/ reboot. 2.html
I have not read kernel code in a while for this, but if i'm not mistaken poweroff fallsback to halt, in the kernel, if there is no hardware support to kill power.