acbxyz
asked on
Get Power on reason with linux
Hello all,
I have a computer running linux, which can be powered on by its power button, via wake on lan and by acpi rtc timer of the bios. This is running fine.
But depending on how the computer was powered on I want a different behaviour.
Is it possible to find out the way the computer was turned on by a script?
Hardware is an ASUS E35M1-I Mini-ITX-Board, Software is the most recent Debian wheezy using kernel 3.2.0-3-amd64.
Thanks
I have a computer running linux, which can be powered on by its power button, via wake on lan and by acpi rtc timer of the bios. This is running fine.
But depending on how the computer was powered on I want a different behaviour.
Is it possible to find out the way the computer was turned on by a script?
Hardware is an ASUS E35M1-I Mini-ITX-Board, Software is the most recent Debian wheezy using kernel 3.2.0-3-amd64.
Thanks
ASKER
I don't want to know how to turn my machine on by wake on lan because this is already working very well. Additional it is already waking up on bios event at a specific time.
What I want to know is AFTER it has been powered on and booted, HOW it has been started.
Saying right after debian has booted, I want to start scripts depending on how the computer has been started.
I can guess a timer start by compare the last set alarm time and actual time. But I still want to know if the computer has been started by pressing the power on button or by receiving a wake-on-lan-package.
The reason why I ask here is because I only found mass of information how to do wake on lan and how to react on a power button event to handle shutdown.
What I want to know is AFTER it has been powered on and booted, HOW it has been started.
Saying right after debian has booted, I want to start scripts depending on how the computer has been started.
I can guess a timer start by compare the last set alarm time and actual time. But I still want to know if the computer has been started by pressing the power on button or by receiving a wake-on-lan-package.
The reason why I ask here is because I only found mass of information how to do wake on lan and how to react on a power button event to handle shutdown.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Turning on before the WoL-Packages arrives is exactly what I don't want.
I think I have to find another way to determinate the event.
Thanks anyway
I think I have to find another way to determinate the event.
Thanks anyway
and make a cron like this :
will turn your ASUS E35M1-I (with ip 180.16.25.26) ON everyday at 6:00 AM
or you can just use DD-WRT (http://en.wikipedia.org/wiki/DD-WRT) which has a WOL feature on it.
--
rumy