[CentOS] Shutdown script not being run

Mon Dec 19 17:29:08 UTC 2005
Bowie Bailey <Bowie_Bailey at BUC.com>

I've got an odd problem.  My server will not shutdown normally because
the AoE driver is not being shut down properly.  While investigating the
problem, I found that the aoe script is apparently not being called for
shutdown.  I have been able to duplicate this with a brand new test
script.

My test script is just a simple file that echos back the start or stop
command:

    #!/bin/bash
    #
    # chkconfig: 45 01 99
    # description: Test Start and stop script
    #
    
    echo "Called with $1"

I installed it with 'chkconfig --add mytest'.

The softlinks exist in the runlevel directories:
    /etc/rc.d/init.d/mytest
    /etc/rc.d/rc0.d/K99mytest
    /etc/rc.d/rc1.d/K99mytest
    /etc/rc.d/rc2.d/K99mytest
    /etc/rc.d/rc3.d/K99mytest
    /etc/rc.d/rc4.d/S01mytest
    /etc/rc.d/rc5.d/S01mytest
    /etc/rc.d/rc6.d/K99mytest

When I 'telinit 4', I can see the script output in /var/log/messages:

    Dec 19 11:46:49 bnofdn1 mytest: Called with start
    Dec 19 11:46:49 bnofdn1 rc: Starting mytest:  succeeded

When I 'telinit 3', there is no output from this script.  It is like the
script is not even being called.

Am I doing something stupid here?  When I do 'telinit 3' from a higher
runlevel, isn't it supposed to run all of the 'K*' scripts in rc3.d with
a 'stop' argument?

Any suggestions would be appreciated.

-- 
Bowie