1.
chkconfig is a perl wrapper to insserv, which actually mimics chkconfig very well.
linux-kaf2:~/Desktop # chkconfig -l | grep multi
multipathd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
linux-kaf2:~/Desktop # insserv multipathd
linux-kaf2:~/Desktop # chkconfig -l | grep multi
multipathd 0:off 1:off 2:off 3:on 4:off 5:on 6:off
linux-kaf2:~/Desktop # insserv -r multipathd
linux-kaf2:~/Desktop # chkconfig -l | grep multi
multipathd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
linux-kaf2:~/Desktop #
2.
what insserv/chkconfig actually do
refer runlevel5 as sampling:
linux-kaf2:/etc/init.d/rc5.d #
linux-kaf2:/etc/init.d/rc5.d # ls -l | grep multi
linux-kaf2:/etc/init.d/rc5.d # insserv multipathd
linux-kaf2:/etc/init.d/rc5.d # ls -l | grep multi
lrwxrwxrwx 1 root root 13 Nov 9 10:52 K01multipathd -> ../multipathd
lrwxrwxrwx 1 root root 13 Nov 9 10:52 S04multipathd -> ../multipathd
linux-kaf2:/etc/init.d/rc5.d # insserv -r multipathd
linux-kaf2:/etc/init.d/rc5.d # ls -l | grep multi
linux-kaf2:/etc/init.d/rc5.d # chkconfig multipathd on
linux-kaf2:/etc/init.d/rc5.d # ls -l | grep multi
lrwxrwxrwx 1 root root 13 Nov 9 10:53 K01multipathd -> ../multipathd
lrwxrwxrwx 1 root root 13 Nov 9 10:53 S04multipathd -> ../multipathd
linux-kaf2:/etc/init.d/rc5.d # chkconfig multipathd off
linux-kaf2:/etc/init.d/rc5.d # ls -l | grep multi
linux-kaf2:/etc/init.d/rc5.d #
linux-kaf2:/etc/init.d # ls -lt
total 672
-rw-r--r-- 1 root root 783 Nov 9 10:54 .depend.boot
-rw-r--r-- 1 root root 563 Nov 9 10:54 .depend.halt
-rw-r--r-- 1 root root 1115 Nov 9 10:54 .depend.start
-rw-r--r-- 1 root root 665 Nov 9 10:54 .depend.stop
drwxr-xr-x 2 root root 4096 Nov 9 10:54 rc5.d
drwxr-xr-x 2 root root 4096 Nov 9 10:54 rc3.d
drwxr-xr-x 2 root root 4096 May 30 10:54 rc2.d
本文出自 “技术博客” 博客,谢绝转载!