Results 1 to 4 of 4
I need to run a script after SUSE ENTP 10 loaded fully every time I restart the server. How can i do it.
Thanks for the help in advance...
- 03-26-2009 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 6
run a script after OS loaded fully
I need to run a script after SUSE ENTP 10 loaded fully every time I restart the server. How can i do it.
Thanks for the help in advance
- 03-30-2009 #2
I'm not familiar with SUSE but most distros have a script called rc.local into which you can put anything that you want to run at boot. It executes after all the standard scripts.
"I'm just a little old lady; don't try to dazzle me with jargon!"
- 03-31-2009 #3Linux Newbie
- Join Date
- Feb 2007
- Posts
- 248
I think "rc.local" is not the SUSE way for running/executing a run-level script
place your script under /etc/init.d directory
e.g
/etc/init.d/yourscript
make your script executeable
# chmod +x /etc/init.d/yourscript
then open your script(/etc/init.d/yourscript) in any editor and put the following on top of your script
put the above lines on top in your scriptCode:# !/bin/bash # /etc/init.d/yourscript # ### BEGIN INIT INFO # Provides: yourscript # Required-Start: $ALL # Should-Start: # Required-Stop: # Should-Stop: # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Description: any short description ### END INIT INFO . /etc/rc.status rc_reset
after inserting the above lines in your script, execute the following command
# insserv yourscript
enjoy
Regards
- 04-03-2009 #4Content Team
- Join Date
- Dec 2008
- Location
- Evansville, IN
- Posts
- 15
In Suse you have have a script that runs after startup.
Create the file /etc/init.d/after.local
You can call your script from this file. You will also see two other files
halt.local
boot.local
These can also be used to start scripts at various times.


Reply With Quote