Embedded Board Shutdown Processing

I work with an embedded board (BeagleBoard) using a Linux distribution (Angstrom Linux). I would like to carefully stop the operating system when this button is pressed on the board. I plan to do the following:

  • In init, run the power-off daemon as the root user
  • "power-off" runs a magic code to check if this button is pressed.
  • If the button is pressed, β€œpower off” causes β€œstop”

Before moving on to my text editor and code, is there any standard Linux daemon for this?

+3
source share
2 answers

init ( 1) SIGWINCH kb ( " " ), . init - , ctrl-alt-del ; init .

, , "", SIGWINCH PID 1, kb shutdown -h /etc/inittab.

+2

.. "hal" .

0

Source: https://habr.com/ru/post/1724058/


All Articles