LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to register auto start/stop service script with chkconfig (http://www.linuxquestions.org/questions/linux-software-2/how-to-register-auto-start-stop-service-script-with-chkconfig-411442/)

travellers 02-03-2006 10:56 PM

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.

jschiwal 02-04-2006 12:10 AM

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.

WhatsHisName 02-04-2006 12:38 AM

The points jschiwal made are clarified at the end of “man chkconfig”, where the additional lines in the script needed by chkconfig are described.

travellers 02-04-2006 01:19 PM

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.

dutler 02-04-2006 01:32 PM

thanks for letting unknow the fix

reydp 09-13-2006 01:58 AM

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

reydp 09-13-2006 05:01 AM

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
:)

WhatsHisName 09-13-2006 10:08 AM

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

pshoaf 06-15-2009 11:02 AM

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?


All times are GMT -5. The time now is 04:38 PM.