Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 01-20-2005, 12:15 PM   #1
LQ Newbie
Registered: Oct 2004
Posts: 16

Rep: Reputation: 0
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.

Old 01-20-2005, 12:56 PM   #2
Senior Member
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
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).
Old 01-21-2005, 08:26 PM   #3
LQ Newbie
Registered: Oct 2004
Posts: 16

Original Poster
Rep: Reputation: 0
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write init script shahrokhnikou Programming 4 10-24-2005 04:08 PM
Init Script for p4d not working UglyWrangler Linux - Newbie 2 01-18-2005 11:45 AM
can't get my init script working nukeu666 Linux - Newbie 4 12-16-2004 12:12 PM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 02:31 AM
could use some help with my init.d script.... BrianK Linux - General 3 10-31-2002 08:21 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration