I also remember this extension. It I think it was from someone who also posted different theme packs and modded menu bar icons. However, search is down, so I couldn't find the link. I still have it though on my kindle, and here is its code:
So I guess the "halt" command is good enough. Have you also tried "poweroff"?
Since I have android on my kindle, the android system adds another step to the bootloader. When I turn on the kindle I can choose the operating systems. Because the android system has taken over the boot process, and android is default, when I press restart in the kindle system it just shuts down to a blank screen. Then I have to press the power button to turn the kindle back on, and then select an operating system. If I select nothing, it continues booting android, if I select kindle, it restarts and loads the tree.