LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Safely powring down the system (https://www.linuxquestions.org/questions/slackware-14/safely-powring-down-the-system-525530/)

the-yikes 02-04-2007 01:18 PM

Safely powring down the system
 
Hey all!,
quick question here and i can only pray that someone has the answer, i recently upgraded to slackware 11 (beauty in it's truedt form) anyway my question is as follows:
how can i ghet the system to recognize that when the power button is pressed rather then just killing the power it will shutdown safely?

I only ask as i have a 4 year old son who im desperatly tryin to make familiar with linux as all he ever sees over here is mic......ft (yuck i cant even bring myself to spell it let alone say it!)

Anyway, any help would be greatly appreciated as when he turns it off it gives me some hassles in getting it back up and running! lost of fdisk -f and the likes!

Still im learning more as i go along and so is he!

Thanks

The Yikes

Tinkster 02-04-2007 01:41 PM

Do you have acpid running, is the button module loaded?
If yes, all you (should) need to do is edit/create /etc/acpi/events/shutdown
and tell it to shutdown cleanly .... untested (no 4 year olds around
and I have no need for this), but should do it.
Code:

event=button[ /]power
action=/sbin/halt


Cheers,
Tink

the-yikes 02-05-2007 07:16 AM

Think big....think tink!
 
Tinkster (tink)

Thanks a milion for the freakishly fast response, havnt had a chance to test your method yet, am down in my parents house at the moment, but i'll give it a whirl when i get back to the lair! hahaha
you know it never ceases to amaze me how much information people have at their disposal,, the linux community has got to be the friendliest place on earth (or the web) whichever.

Thank you so much

The Yikes:)


All times are GMT -5. The time now is 03:10 AM.