LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-21-2003, 09:53 AM   #1
sbaguz
LQ Newbie
 
Registered: Jul 2003
Location: Italy
Distribution: SuSE 10.1; Puppy Linux; Slax; Red Hat 9
Posts: 19

Rep: Reputation: 0
Question Run commands at logout/shutdown


Hi all !
I have been using Linux RH9 for a month and I'm already an addicted ! Reading this forum, I've found a lot of answers to my newbie questions, but now I have to ask something.
I know that you have to put your script in /etc/rc.d/rc.local if you want to run a command at startup, but what about running it at logout or shutdown? Where do I have to put it?
Thanks in advance

P.S.: My Linux system is now working almost perfectly, but in the next days I'll bore you with another pair of questions...
 
Old 08-21-2003, 10:26 AM   #2
cnjohnson
Member
 
Registered: Nov 2002
Location: Nashville
Distribution: FreeBSD, Linux, OS-X
Posts: 544

Rep: Reputation: 30
For logging out look at .bash_logout.

For shutdown or reboot read up about the inittab file, or the readme in /etc/init.d, or do a man init or man inittab for some clues.

Cheers--
Charles
 
Old 08-21-2003, 11:55 AM   #3
Pres
Member
 
Registered: Jun 2002
Location: Australia
Distribution: Slack 9.1
Posts: 232

Rep: Reputation: 30
or maybe /etc/rc.d/rc.6 if such a thing exists in redhat
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reboot,shutdown,logout issues in 10.1 Volt Slackware - Installation 3 08-12-2005 11:34 PM
Run some commands on system shutdown luizrolla Linux - Newbie 1 07-12-2004 07:42 PM
Logout twice to shutdown mhl Linux - Newbie 13 08-31-2003 05:02 PM
Logout/Shutdown problems in KDE Palarran Linux - General 3 08-05-2003 03:50 PM
Is there any shutdown/logout logs? Cray2 Linux - Software 21 07-28-2003 11:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration