Use chkconfig, redhats tool for manipulating which scripts/daemons you want
to run at runtime.
The trick with chkconfig is that it relies on certain directives being
present in the header of your script.
So, something like:
#!/bin/bash
#|
# chkconfig: 2345 55 25
# description: Script
2008/5/23 sur_1805 <[EMAIL PROTECTED]>:
>
> i m using tomcat 6 with jdk 1.6 on linux(RHEL 5) machine . i put the script
> catalina.sh(startup and shutdown tomcat) in init.d directory and also make a
> link with the command given below
>ln -s /etc/init.d/catalina.sh S75tomcat
>
> in the /etc/rc