The reason RedHat does not kick off your K* rc shutdown scripts is because RedHat checks for a lock file for your script in /var/lock/subsys/<scriptname>
To fix this, simply add a line to your 'start' section, something like this:
Code:
touch /var/lock/subsys/<scriptname>
This will create that 0 byte file that rc is looking for when it executes shutdown.
Here is the actual snippet of the code from /etc/rc.d/rc that does this:
Code:
# First, run the KILL scripts.
for i in /etc/rc$runlevel.d/K* ; do
check_runlevel "$i" || continue
# Check if the subsystem is already up.
subsys=${i#/etc/rc$runlevel.d/K??}
[ -f /var/lock/subsys/$subsys -o -f /var/lock/subsys/$subsys.init ] \
|| continue
# Bring the subsystem down.
if egrep -q "(killproc |action )" $i ; then
$i stop
else
action $"Stopping $subsys: " $i stop
fi
done
good luck,
Jacob