The script that manages all the preliminaries for shutting down and
then calls a binary to do the deed:
This script is broken in so many places, I don't see how it works at all.
There are calls to functions in packages that aren't even installed:
nut - Network UPS Tools Client Utilities
nut-cgi - CGI utils for NUT
nut-devel - Development for NUT Client
nut-drivers-hal - Network UPS Tools HAL drivers
nut-server - Network UPS Tools server
apcupsd - Power management software for APC UPS hardware
lvm2 - Logical Volume Manager administration tools
mdadm - A tool for managing Soft RAID under Linux
One call is mis-named:
The next to the last line tests a variable $INIT_HALT that never gets initialized:
[ "$INIT_HALT" != "HALT" ] && HALTARGS="$HALTARGS -p"
exec $command $HALTARGS
It's looking for the word 'HALT', and if not found, adds an option to a call to a binary which does the actual shutdown: The test will always fail.
There is one line that syncs the system clock and timezone:
# update_boot_stage clock
[ -x /sbin/hwclock ] && action "Syncing hardware clock to system time" /sbin/hwclock --systohc
The correct timezone is important here.
This is not only the situation for Bonzai, but for Gnome (which I use here) and
maybe others. But they all shutdown ok.
Then there's the choices the kernel itself has to make at shutdown. Have a look:
less /boot/System.map | grep shutdown
less /boot/System.map | grep halt