LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-29-2002, 08:58 PM   #1
isvip1
LQ Newbie
 
Registered: Aug 2002
Posts: 2

Rep: Reputation: 0
Unhappy chkconfig problem


I wrote a new script for chkconfig to start/stop a database engine. The start works fine, but the script never gets called for a stop. Yes, I have the chkconfig params in the script, yes, I can execute the shell from the command line :

/etc/init.d/informix start and /etc/init.d/informix stop

the K05informix and S95informix files are linked to ../init.d/informix

I have spent two days on this and have learned a lot about chkconfig. I've read posts, man pages, etc. but I am stumped.

How can init not call this script during shutdown?

/var/log/boot.log show the start is successful, but there is no mention of a stop. I verified that the 'stop' is never being executed by traps in the script and other methods...

Help!

Gary
 
Old 08-30-2002, 05:08 AM   #2
dwd
Member
 
Registered: Aug 2002
Distribution: RedHat / Debian / Ubuntu
Posts: 35

Rep: Reputation: 15
It'd help (a bit) to know the distribution involved.

But anyway, are you shutting it down in the right runlevel? If you've got both K05 and S95 scripts in the same runlevel, that's probably wrong.
 
Old 09-03-2002, 04:43 PM   #3
isvip1
LQ Newbie
 
Registered: Aug 2002
Posts: 2

Original Poster
Rep: Reputation: 0
Wink Re: chkconfig problem

Quote:
Originally posted by isvip1
I wrote a new script for chkconfig to start/stop a database engine. The start works fine, but the script never gets called for a stop. Yes, I have the chkconfig params in the script, yes, I can execute the shell from the command line :

/etc/init.d/informix start and /etc/init.d/informix stop

the K05informix and S95informix files are linked to ../init.d/informix

I have spent two days on this and have learned a lot about chkconfig. I've read posts, man pages, etc. but I am stumped.

How can init not call this script during shutdown?

/var/log/boot.log show the start is successful, but there is no mention of a stop. I verified that the 'stop' is never being executed by traps in the script and other methods...

Help!



The problem was solved when I discovered the script that changes runlevels (/etc/rc.d/rc) was looking for a file in /var/lock/subsys/"filename". When you write a script to start a service, you should "touch" a file with this pathname. rc uses this to determine if a service is running and needs to be shutdown when changing runlevels.

Gary
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do I get "bash: chkconfig: command not found" when I try to run chkconfig? non-thrash Fedora 10 05-20-2010 01:31 PM
chkconfig problem kartheekpn Linux - Newbie 2 05-06-2005 12:48 AM
chkconfig problem !!! lewkh Red Hat 2 03-10-2005 11:28 PM
chkconfig problem chynna_v Linux - Software 5 09-13-2004 06:31 PM
Help on chkconfig ztopher Linux - Software 0 04-09-2003 04:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration