LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-10-2010, 04:25 PM   #1
cpparkin
LQ Newbie
 
Registered: Feb 2009
Posts: 4

Rep: Reputation: 0
How to determine Power On cause?


Does anyone know of a way to determine how the PC/Server was powered on?
I'm interested in writing a startup script that performs a specific action depending on the poweron cause.

For example:
If powered on by "wakalarm" perform task X & shutdown.
If powered on by "power button" perform task Y.

Is there any way to determine the cause of the power on?
I'm running Federa 12.

Thanks
 
Old 02-12-2010, 03:21 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,369

Rep: Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335
Not that I am aware of. Power on is fairly stupid, and when you have powered on, you lose the information you wanted in a hardware reset. If you could go round all your power on causes and check were they active, you could decide on actions that way. I mean
phone engaged = modem wake up
nic receiving = network card
alarm (query the rtc or duplicate all alarms in a file) = whatever
none of above = button.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
power company idiots cut power while system was on, now hangs at boot with # prompt shroomy_bee Linux - Newbie 10 07-04-2008 12:12 AM
nvidia 8800 gtx power connectors? Uses four power cables or two? 1veedo General 1 03-22-2008 08:30 PM
How do i determine my IP address? How do i determine my host name? jwymore Linux - Networking 5 02-07-2007 09:57 AM
LXer: Linux Networx partners with CEI to power 2X visualization power of ... LXer Syndicated Linux News 0 04-26-2006 03:03 AM
Enabling power save/power management/cpu freq scaling features for a Debian system zero79 Debian 0 12-19-2004 01:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration