BBB Debian 3.8.13 with battery backup - removing power causes 'Power button pressed'


I am working on IoT application using a BBB running Debian 3.8.13. I have integrated a battery backup complete with temp sensor.

The issue I am having is that when I remove the power cord from the BBB the system tells me ‘Power button pressed The system is going down for system halt NOW!’

The goal here is that the battery takes over for a set amount of time – say 5 miutes – and then checks to see if wall power has returned. If not then shutdown safely.

I had this working in UBUNTU 3.8 – removing the wall power with battery connected did not cause a ‘Power button pressed’ event. What is the difference between these versions that I am missing?

The kernel.