View previous topic :: View next topic |
Author |
Message |
lunarg Guru
Joined: 07 Jan 2004 Posts: 508 Location: Peer, Belgium
|
Posted: Sun Jan 25, 2004 3:13 pm Post subject: PC has to beep before attempting to power-off |
|
|
Hi
I have a P3 on an AT-board which doesn't exactly power-off when it has to power-off.
I want to install Gentoo on it, but I need somekind of notification (i.e. a beep or so) when Gentoo has finished shutting down and wants to power-off.
The thing will be used as a server (which doesn't have to run all the time), so there's no other way of seeing when shutdown is complete.
Anyone knows a way?
PS: the board does support ACPI, so it's actually my PSU that's AT. _________________ Registered linux user #341804
Visit Black Manticore: http://www.blackmanticore.com/ |
|
Back to top |
|
|
Parasietje Apprentice
Joined: 25 Jan 2004 Posts: 194
|
Posted: Sun Jan 25, 2004 7:58 pm Post subject: |
|
|
Check /sbin/rc. It's the script gentoo uses for shutting down and booting the system. I know the bootsplash patch manages to display an animated icon before power-off, so with simple bash programming (and comparing with the bootsplash patch) you can certainly create a beeping sound when your computer has finished shutting down |
|
Back to top |
|
|
lunarg Guru
Joined: 07 Jan 2004 Posts: 508 Location: Peer, Belgium
|
Posted: Sun Jan 25, 2004 9:06 pm Post subject: |
|
|
Thanks.
After checking out /sbin/rc and reading the man-page about the 'halt' command, I have a solution that seems to work:
I've added this line right before the /sbin/halt command in /etc/init.d/shutdown.sh:
Code: |
echo -e '\a';sleep 1;echo -e '\a';sleep 1;echo -e '\a'
|
The system beeps 3 times when shutdown (runlevel 0) is done, and right before the power-off (which of course doesn't work on my p3). _________________ Registered linux user #341804
Visit Black Manticore: http://www.blackmanticore.com/ |
|
Back to top |
|
|
|