All Forums
Embedded Linux
Linux FAQ
Linux power failure
Forum Locked
Send Topic to a Friend
Printer Friendly
Author
Topic
KnowledgeBase
296 Posts
Posted - 24 May 2002 : 15:42:39
Linux power failure
Typically, linux power failure works like this:
1. Some process or the kernel notices that the power has failed and sends a SIGPWR to the init process.
2. The init process traps the power failed signal and reads and removes the file /etc/powerstatus.
3. Then init reads the file /etc/inittab and executes one of these lines based on the power status:
FAIL
pf::powerwait:/etc/init.d/powerfail start
OK
po::powerokwait:/etc/init.d/powerfail stop
LOW
pn::powerfailnow:/etc/init.d/powerfail now
These lines can be modified to call any script or program.
The init and inittab in the root file systems on ADS boards have this functionality.
To implement a power failure scheme on your board, you must provide:
a process or kernel change that
- detects the power failure,
- updates the /etc/powerstatus file
- sends the SIGPWR signal to init
a /etc/init.d/powerfail script that performs the desired action for your situation
31-Dec-2003: jlackey - update information related to the root file system
Topic
Forum Locked
Send Topic to a Friend
Printer Friendly
Jump To:
Select Forum
Documentation
White Papers
Documentation
Announcements and Public Posts
Hardware
General Hardware, ADSmartIO, Digital I/O and A/Ds
Cables and Connectors
Displays
Ethernet, IR, Serial, CAN and high speed data
Microsoft Windows CE
The Basics (CE)
CE FAQ
General CE
CE Downloads and Documents
eVC Application Development
CE Sample Applications and Utilities
eVB Application Development
.NET Application Development
CE Drivers
CE Flash, CF and PCMCIA
CE Audio and Multimedia
Embedded Linux
Linux Open Discussion
Linux FAQ
Linux Downloads and Documents
Atom Catalyst
Linux for Atom-based products
Atom Firmware
Atom FAQ
Windows Embedded Standard
Microsoft Windows CE for Atom
Catalyst Discussion
Zypad
Zypad Discussion
Microsoft Windows CE
Documents and Downloads
Other Operating Systems
VxWorks FAQ
VxWorks Discussion
OS-9 FAQ
--------------------
Home
Active Topics
Frequently Asked Questions
Member Information
Search Page
Eurotech Support Forums
© Eurotech Inc.
This page was generated in 0.02 seconds.
Snitz Forums 2000