LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 03-22-2006, 12:51 PM   #1
Tonatiuh
LQ Newbie
 
Registered: Oct 2004
Distribution: Red Hat
Posts: 8

Rep: Reputation: 0
user defined service


Red Hat Enterprise Linux 4

I have added a "user defined service" named orainfra. I created in /etc/init.d/orainfra script to startup and stop some application services.

I have added the service with:

chkconfig --add orainfra

[root@svr04 ~]# chkconfig --list |grep orainfra
orainfra 0ff 1ff 2ff 3n 4ff 5n 6ff

After this it added the corresponding links in rcX.d correct levels.

This line (into the script) defines the levels to run:

# chkconfig: 35 98 11

At the start of the server I can see that is trying with my service (orainfra) but the service (script) does not executes succesfully. AT startup it does not shows any messages about the succesfull or not of the service execution.

Eventhough once started the server, if I execute manually the service (orainfra) it wors fine:

service orainfra start
or
service orainfra stop

Any idea about why it is not working at the starting up of the server?
 
Old 03-22-2006, 01:39 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 39,835

Rep: Reputation: 1118Reputation: 1118Reputation: 1118Reputation: 1118Reputation: 1118Reputation: 1118Reputation: 1118Reputation: 1118Reputation: 1118
can't say mcuh really... can you not put some logging into the scripts to see what's going on? also is the script executable? you can use that "service" thingy to run the files, but i *think* that on boot the scripts are actually executed directly, e.g. "/etc/rc3.d/blahblah start" so make sure starting a service that way works too.
 
Old 03-22-2006, 01:44 PM   #3
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,382
Blog Entries: 1

Rep: Reputation: 60
Probably there is missing some environment variable in your script.
Check for related environment variables that are set in your root shell and that aren't defined in the script. Remember the scripts at boot time does not comes from a login shell. Only minimal variables are set and exported to the children processes.

cheers,
 
  


Reply


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to send user defined signal in linux feetyouwell Linux - Software 6 12-26-2007 04:40 AM
user defined function in kernel vishalbutte Programming 4 02-07-2006 06:01 AM
User defined protocols with Guarddog Shafted Linux - Security 4 09-01-2005 12:56 PM
user defined variables linuxdev Linux - Newbie 4 02-09-2004 12:43 PM
C++: How to use a namespace in a user-defined library? Gethyn Programming 9 08-15-2003 05:29 AM


All times are GMT -5. The time now is 07:02 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration