Informix start/stop along with redhat start/stop
Hi all,
I'm trying to start/stop Informix along with my linux os start/stop.
For this I've made a test script in order to test this but I'm facing a problem. The service is starting along with the system but when I'm stopping (rebooting) the system it doesn't run the "K10test" script.
root@rhl5 ~# cd /etc/init.d/
root@rhl5 init.d# cat test
#!/bin/sh
#
# Init file for test server daemon
#
# chkconfig: 345 99 10
# description: test server daemon
#
# processname: test
#
start()
{
echo "Start test script at `date`" >> /root/test.log
sleep 3
}
stop()
{
echo "Stop test script at `date`" >> /root/test.log
sleep 3
}
case $1 in
start)
start
;;
stop)
stop
;;
esac
root@rhl5 init.d#
root@rhl5 init.d# chkconfig test --add
root@rhl5 init.d# chkconfig test --list
test 0 : off 1: off 2: off 3: on 4: on 5: on 6: off
root@rhl5 etc# for i in 0 1 2 3 4 5 6; do ls rc$i.d/*test*;done
rc0.d/K10test
rc1.d/K10test
rc2.d/K10test
rc3.d/S99test
rc4.d/S99test
rc5.d/S99test
rc6.d/K10test
root@rhl5 init.d#
After sistem reboot you can see that the /etc/init.d/test stop is not executed.
root@rhl5 init.d # cat /root/test.log
Start test script at Mon Feb 9 07:30:19 EET 2009
Start test script at Mon Feb 9 07:50:16 EET 2009
Can you please tell what I'm missing?
Thanks
|