LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-03-2006, 10:56 PM   #1
travellers
LQ Newbie
 
Registered: Jun 2005
Posts: 16

Rep: Reputation: 0
how to register auto start/stop service script with chkconfig


Hi, guys:

I am seeking help from linux guru to help me fix chkconfig registration problem.

I have installed Fedora Core 4 and Oracle 10g successfully. After that, I created a auto start/stop shell script as /etc/init.d/dbora. Then I chmod 755 /etc/init.d/dbora. Then I linked the script to appropriate run-level as "ln -s/etc/init.d/dbora /etc/rc0.d/K10dbora", "ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora". After all these steps, I typed " chkconfig --add dbora " and " chkconfig --levels 345 dbora on". The system responded with " service dbora does not support chkconfig". I verified by " chkconfig --list | grep dbora". The service script didn't be added up into chkconfig. I have read some of instruction on line and made some changes on scripts. It all didn't work. Hope any guru can give me some tips to solve this problem. Thanks for your time to read and respond to this in advance.
 
Old 02-04-2006, 12:10 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I'm not a guru. But did you base your script on the skeleton script? The comments at the top are important. I believe the skeleton script should be in /etc/init.d/skeleton. I'm not using Fedora Core, but it should be in there. There is a comment line near the top that chkconfig uses.

It is the chkconfig command that produces the links, so I am guessing that your script didn't conform with what it expected.
 
Old 02-04-2006, 12:38 AM   #3
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
The points jschiwal made are clarified at the end of “man chkconfig”, where the additional lines in the script needed by chkconfig are described.
 
Old 02-04-2006, 01:19 PM   #4
travellers
LQ Newbie
 
Registered: Jun 2005
Posts: 16

Original Poster
Rep: Reputation: 0
jschiwal,WhatsHisName:

Thanks for your input. The problem has been solved. That is a typo in chkconfig -20 80. It has a space in front of 20. It works now.
 
Old 02-04-2006, 01:32 PM   #5
dutler
LQ Newbie
 
Registered: Nov 2003
Posts: 24

Rep: Reputation: 15
thanks for letting unknow the fix
 
Old 09-13-2006, 01:58 AM   #6
reydp
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by travellers
jschiwal,WhatsHisName:

Thanks for your input. The problem has been solved. That is a typo in chkconfig -20 80. It has a space in front of 20. It works now.
hi jschiwal,

I have Oracle Apps 10g running in my red hat linux as 3 box. I wanted to automate the startup and shutdown also. As I have excerted effort to build the script and to surf the web for resources, I find myself basically the same with your problem (i.e. "service orainfrstr does not support chkconfig") as i try to add the script in /etc/init.d/ and create a symbolic link to /etc/rc3.d/
I already have inserted the first few commented lines such as chkconfig and functions, but it made no difference.

I hope that you can share me your script and the step you have made, bacause it's kind of customized script and doesn't have template like dbora.

thanks in advance.
reydp
 
Old 09-13-2006, 05:01 AM   #7
reydp
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by reydp
hi jschiwal,

I have Oracle Apps 10g running in my red hat linux as 3 box. I wanted to automate the startup and shutdown also. As I have excerted effort to build the script and to surf the web for resources, I find myself basically the same with your problem (i.e. "service orainfrstr does not support chkconfig") as i try to add the script in /etc/init.d/ and create a symbolic link to /etc/rc3.d/
I already have inserted the first few commented lines such as chkconfig and functions, but it made no difference.

I hope that you can share me your script and the step you have made, bacause it's kind of customized script and doesn't have template like dbora.

thanks in advance.
reydp
I'm sorry. I'm addressing this to traveller
 
Old 09-13-2006, 10:08 AM   #8
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Quote:
Originally Posted by reydp
... i try to add the script in /etc/init.d/and ...
Put the script in the correct location (i.e., /etc/rc.d/init.d) and try “chkconfig --add ...” again.

In redhat-style distros, /etc/init.d is a link to /etc/rc.d/init.d
 
Old 06-15-2009, 11:02 AM   #9
pshoaf
LQ Newbie
 
Registered: Feb 2005
Location: Charleroi, PA 30 mi SE of Pgh
Distribution: RedHat, Fedora, Oracle
Posts: 22

Rep: Reputation: 0
dbora not configured for chkconfig

I had this same error...

First 6 lines must be 100% correct to work! I ended up copying lines from a diff script to get it to work... Here are my first few lines for dbora...

#! /bin/bash
#
# network Bring up/down networking
#
# chkconfig: 345 20 80
# description: Starts and stops the Oracle database and listeners
#
# /etc/rc.d/init.d/oracle
# See how we were called.

My question for anyone, is the 20 80 start/stop priority.... Are they good numbers? Should they be different?
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
start/stop service on the fly zchoyt Linux - Software 3 04-14-2005 03:30 AM
remotely start/stop service on WinNT PC from Linux cuzality Linux - Software 0 09-01-2004 01:48 PM
How to register a Tcl script as a service? vlbaranov Linux - Newbie 2 06-01-2004 10:14 AM
Is it possible to start stop and restart a linux service from a webpage? psychodreams Linux - Newbie 3 04-27-2004 01:24 PM
bash script to stop isdn service after x mintus? paul.nel Programming 4 03-11-2004 10:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:42 PM.

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