LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 01-20-2005, 11:15 AM   #1
scylla
LQ Newbie
 
Registered: Oct 2004
Posts: 16

Rep: Reputation: 0
homemade init script not working


Hi

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.

thanks
 
Old 01-20-2005, 11:56 AM   #2
Dark_Helmet
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:
Code:
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:
Code:
/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, 07:26 PM   #3
scylla
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.
 
  


Reply



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 03:08 PM
Init Script for p4d not working UglyWrangler Linux - Newbie 2 01-18-2005 10:45 AM
can't get my init script working nukeu666 Linux - Newbie 4 12-16-2004 11:12 AM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 01:31 AM
could use some help with my init.d script.... BrianK Linux - General 3 10-31-2002 07:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:37 AM.

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