Results 1 to 6 of 6
I would like to run a command or script on every shutdown or startup, or maybe both, could someone point me in the right direction please?...
- 03-15-2009 #1Just Joined!
- Join Date
- Nov 2007
- Posts
- 46
Start up/shutdown
I would like to run a command or script on every shutdown or startup, or maybe both, could someone point me in the right direction please?
- 03-15-2009 #2Linux Newbie
- Join Date
- Feb 2009
- Location
- Third ring of Pergatory
- Posts
- 199
rc.local is the customary place to put start-up scripts.
Shutdown scripts work better if you call the shudown via /sbin/shutdown inside another script rather than trying to rewrite shutdown itself. I.E don't try to edit shutdown, write a script that contains the commands you want run and place /bin/shutdown at the end of it. (the very end) then call shutdown through the script.
- 03-15-2009 #3Just Joined!
- Join Date
- Nov 2007
- Posts
- 46
Where is rc.local? If I create it, where do I put it?
- 03-15-2009 #4Linux Newbie
- Join Date
- Mar 2009
- Posts
- 228
It's located in /etc.
- 03-15-2009 #5
How you do this depends on the distro - and the runlevel you want it to run at.
What distro are you using?If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 03-15-2009 #6Just Joined!
- Join Date
- Nov 2007
- Posts
- 46
Sorry folks, I usually post in SUSE forums got out of the habit:
I use openSUSE 11.1 (kde 3.5)


Reply With Quote