Making On/Off Shim poweroff when using halt

Is there anyway to make the halt command perform a poweroff with the On/Off Shim?

I have a bad habit of typing halt since most Linux distros these days perform a poweroff with a halt. My Pi ends up getting in that weird halted state and the On/Off Shim doesn’t seem to power it back on without a full poweroff afterwards.

Thanks

Btw, I’m using Raspbian and I’m not sure if this question would be specific to the On/Off Shim - it’s just the only device that I’m aware of that would make the differences in the two commands apparent.

To answer my own question: I was able to get this to work by changing /lib/systemd/system-shutdown/gpio-poweroff and changing the case statement from:

case "$1" in
  poweroff)

to

case "$1" in 
  halt|poweroff)

1 Like

Thanks for coming back to post the answer! It’ll no-doubt prove useful.