on_ac_power: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/on_ac_power - from package: pm-utils

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/on_ac_power - from package: powermgmt-base
/sbin/on_ac_power - from package: powermgmt-base
/lib/rc/bin/on_ac_power - from package: openrc

You may install the required package with command apt-get install {package}
Error in other languages:
on_ac_power: bevel nie gevind nie
on_ac_power: comandă negăsită
on_ac_power: comando não encontrado
on_ac_power: commande introuvable
on_ac_power: command not found
on_ac_power: käsku ei ole
on_ac_power: không tìm thấy lệnh
on_ac_power: komanda nerasta
on_ac_power: Kommando nicht gefunden.
on_ac_power: kommandot finns inte
on_ac_power: komut yok
on_ac_power: nie znaleziono polecenia
on_ac_power: níor aimsíodh an t-ordú
on_ac_power: no se encontró la orden
on_ac_power: no s'ha trobat l'ordre
on_ac_power: opdracht niet gevonden
on_ac_power: parancs nem található
on_ac_power: perintah tidak ditemukan
on_ac_power: príkaz nenájdený
on_ac_power: příkaz nenalezen
on_ac_power: команда не найдена
on_ac_power: командата не е открита
on_ac_power: 命令找不到
on_ac_power: コマンドが見つかりません