Description of problem:
When I change run levels I have an oracle initscript which seems to work when it
is in startup mode (S91dbora) but when I change to a different runlevel where it
should be shutting down (K19dbora) it does not run the initscript.
Version-Release number of selected component (if applicable):
change from runlevel 3 to runlevel 2
Steps to Reproduce:
1. init 2
It seems to ignore this script (and there are other instances of this as well),
and just do some K-scripts but no others.
Databases should be shutdown.
I have chkconfig --del gpm and copied the gpm script to dbora and then chkconfig
--add dbora and used this and it suffers from the same problem. Any time it
seems to execute the K-scripts it doesnt seem to know this exists (no message on
the screen about shutting down service).
Created attachment 150184 [details]
initscript for oracle (dbora)
initscripts version is 7.93.24.EL-1.1
You don't touch a lock file in /var/lock/subsys that matches the script name
when you start, so it is not recorded as actually started. See some of the other
init scripts for examples.
OK figured out the problem.
I need to add a file into the /var/lock/subsys/<scriptname> (and delete) it
before changing runlevels will execute the script on shutdown. As I have never
seen this before it would be nice to document this somewhere as it was only
through trial and error that I finally figured it out.