Is there a way in Ubuntu 7.1 to set up a laptop where if it detects it's running on the battery, that it automatically shuts down? (meaning I ONLY want it to be running on its power supply).
Thanks to any replies!
I'd say make a script that checks a file in /proc/acpi for the power state of the laptop and then shutdown if it detects the laptop isn't plugged in. Then take that script and make it rc.d aware (I don't use ubuntu, so I don't know the specifics of start up scripts, but it looks like sticking something in /etc/rc.d/rc.local is what you want)
63,000 bugs in the code, 63,000 bugs,
ya get 1 whacked with a service pack,
now there's 63,005 bugs in the code!!