Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PC has to beep before attempting to power-off
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
lunarg
Guru
Guru


Joined: 07 Jan 2004
Posts: 508
Location: Peer, Belgium

PostPosted: Sun Jan 25, 2004 3:13 pm    Post subject: PC has to beep before attempting to power-off Reply with quote

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
View user's profile Send private message
Parasietje
Apprentice
Apprentice


Joined: 25 Jan 2004
Posts: 194

PostPosted: Sun Jan 25, 2004 7:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
lunarg
Guru
Guru


Joined: 07 Jan 2004
Posts: 508
Location: Peer, Belgium

PostPosted: Sun Jan 25, 2004 9:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum