Script under rc3.d not being executed on server bootup

Hello all,

I have a script callled 'ABCstartup' setup under /etc/rc.d/init.d

Softlink 'S91ABCstartup' pointing to above script has been created under /etc/rc.d/rc3.d

The script is not being executed when the server restarts.

The script runs successfully via manual execution:
./S91ABCstartup start

any suggestions?
Thanks

Saying it isn't being executed may not be accurate. Have you tried redirecting the output of your script so you can see what is happening?

Just because something works in your shell environment, doesn't mean that it will work in init's or any other environment. Your probably missing an environment variable or you are missing /sbin in the PATH, etc.

Within the script, I'm starting up an application. The application startup process does log various info.
When the script is manually executed, I do see the log from application startup. But, no log file being created when the server starts.

Is there a way to know if that particular script got triggered during the init?

I know there are other scripts within rc3.d that execute fine.

Thanks

Check your environmental variables. When you execute it via the startup or cron, it does not gain your environment. This is what is most likely tripping you up.

yeah, just add

echo script ran at `date` > /tmp/script.out

to your script

In "man rc" there should be reference to where "rc" puts its log (often /etc/rc.log).