You are not logged in.
Pages: 1
I have two scripts I want to be run on power state change - one when to battery power and the other when connecting AC.
The information of AC state is here: /sys/class/power_supply/AC/online, and the values are 0 or 1.
So I wrote a script that looks like that
if grep -Fxq "0" /sys/class/power_supply/AC/online; then
powerdown
else
powerup
fiand added it to be run from /etc/rc.local
But it does not seem to run on power source change.
What's wrong?
Last edited by Lockheed (2012-08-25 20:10:40)
Offline
When does rc.local run?
Offline
I forgot to mention this is on a setup without PM-utils.
Offline
Pages: 1