-   Linux - General (
-   -   homemade init script not working (

scylla 01-20-2005 11:15 AM

homemade init script not working

I have a script to start the oracle client on my workstation, launching out of /etc/rc.d/init.d. I have the correct links in /etc/rc.d/rc[3,4,5].d

Upon boot, the system indicates that the script ran with the normal message:

Starting Oraclient [OK]

However, it appears the script (which runs a command like "su oracleuser /usr/local/bin/oraclient") does NOT run, because the required processes do not appear in ps.

When I log in and launch the script by hand, exactly like it is called from init, it works fine.

If anyone has an idea why this might be please let me know. I can post the script if that would be helpful.


Dark_Helmet 01-20-2005 11:56 AM

I know you were just using it as an example, but I wanted to point out the command should be:

su oracleuser -c "/usr/local/bin/oraclient"
Posting the script would be useful. Otherwise, you'll get vague, generic responses like this:

The PATH might not be what you're expecting within the init script. Do a which su and provide the full path in your script. For instance, on my machine, it would look like:

/bin/su oracleuser -c "/usr/local/bin/oraclient"
If /usr/local is located on a separate partition, verify that it has been mounted before the script tries to run oracleclient.

Other than that, I'd need to see the script before I could offer any other suggestions (that is, *if* I could offer any more).

scylla 01-21-2005 07:26 PM

Thanks for the response. I was going to post the script, but I figured out what the problem was.

The line in the script that launched the db had a '&' at the end of it to background it... which works in Solaris, but apparently not in RedHate Lunix.

Now.. if you have any idea why that is the case, I'd love to hear it. It could be that putting nohup before the line would allow it to live in the background on start up, I didn't check.

All times are GMT -5. The time now is 12:36 PM.