chkconfig does not create right symbolic links
Hello all,
I am just adding a script to automate start / stop during Oracle Linux reboot. I figured out that the symbolic links are not created in the right order. To prove that, I create a small script for test purposes.
=====================================================
# #!/bin/sh
# Name: init.test
# chkconfig: 45 80 20
# description: Script test for chkconfig
#
echo "This is a test script only. chkconfig is not creating correct symbolic links."
=====================================================
Then I used chkconfig --add init.test
It should be created entries for levels 4-5 only, but it creates more soft links in rc.d directories.
find /etc -name "*init.test" | sort
/etc/rc.d/init.d/init.test
/etc/rc.d/rc0.d/K20init.test
/etc/rc.d/rc1.d/K20init.test
/etc/rc.d/rc2.d/K20init.test
/etc/rc.d/rc3.d/K20init.test
/etc/rc.d/rc4.d/S80init.test
/etc/rc.d/rc5.d/S80init.test
/etc/rc.d/rc6.d/K20init.test
Even that chkconfig show the correct levels, I am just curious why it created more kill soft links in rc.d directories.
chkconfig --list init.test
init.test 0:off 1:off 2:off 3:off 4:on 5:on 6:off
Someone could try to explain to me why the kill script has been added to runlevel 0, 1, 2, and 6? Am I missing something here?
Appreciate your help on this.
Cesar
Edited by: CESARDBAIBM on Feb 18, 2013 2:43 AM