/bin/shutdown binary exits with a non-zero status, even though it is able to power off the system. This ordinarily doesn’t affect most users, however this breaks automated components like SSH commands and Vagrant boxes, which treat non-zero status to indicate an error. In the future,
/bin/shutdown should really return a zero exit status unless there is a privilege issue or such preventing the command from operating normally.
In alpha 4, I was able to work around this by moving the ordinary
/bin/shutdown binary to
/bin/shutdown-actual and placing a shell script shim at
/bin/shutdown, that invokes
/bin/shutdown-actual with any passed in arguments and then exits zero. However, in Haiku nightly, this file path is no longer modifiable. I’m thinking of further workarounds so that
vagrant halt can work correctly with Haiku nightly guests. There is also the possibility of patching the Haiku guest plugin for Vagrant to ignore the exit status, though accepting and releasing that change would take some time.
I’d post this in Trac, but I haven’t received email verification for my account yet.