Today in the virtual machine to do DRBD experiments, the use of chkconfig management services, there are problems.
root@node2:/root# Chkconfig--list | grep DRBD
DRBD 0:off 1:off 2:off 3:off 4:off 5:off 6:off
root@node2:/root# Chkconfig DRBD on
/sbin/insserv:no such file or directory
This is a bug in Ubuntu 12.04 and can be resolved using the following methods
root@node2:/root# Whereis Insserv
Insserv:/etc/insserv/etc/insserv.conf/usr/lib/insserv/usr/share/insserv/usr/share/man/man8/insserv.8.gz
Look over the directory found above, one by one, and find the file in/usr/lib/.
root@node2:/root# ls-l/usr/lib/insserv/
Total 56
-rwxr-xr-x 1 root root 56368 Apr 9 19:07 Insserv
And then I made a connection to the past.
root@node2:/root# ln-s/usr/lib/insserv/sbin/insserv
root@node2:/root# Chkconfig DRBD on
/sbin/insserv:permission denied
From the above, reported a permission not allowed, very depressed
root@node2:/root# ls-l/sbin/insserv
lrwxrwxrwx 1 root June 04:27/sbin/insserv->/usr/lib/insserv
root@node2:/root# ls-l/usr/lib/insserv
Total 56
-rwxr-xr-x 1 root root 56368 Apr 9 19:07 Insserv
See from above, have permission of Ah, good depressed, finally found/usr/lib/insserv unexpectedly is a directory
root@node2:~# cd/usr/lib/insserv/
root@node2:/usr/lib/insserv# pwd
/usr/lib/insserv
root@node2:/usr/lib/insserv# ls
Insserv
And then it's all settled.
root@node2:/usr/lib/insserv# Rm-rf/sbin/insserv
root@node2:/usr/lib/insserv# ln-s/usr/lib/insserv/insserv/sbin/insserv
root@node2:/usr/lib/insserv# Chkconfig DRBD on
The script you are attempting to invoke has been converted to a upstart
Job, but Lsb-header is isn't supported for upstart jobs.
Insserv:warning:script ' friendly-recovery ' missing LSB tags and overrides
Insserv:default-start undefined, assuming empty Start runlevel (s) for script ' Friendly-recovery '
Insserv:default-stop undefined, assuming empty Stop runlevel (s) for script ' Friendly-recovery '
Made a bunch of other mistakes, let's just see if the service's OK.
root@node2:/usr/lib/insserv# Chkconfig--list | grep DRBD
DRBD 0:off 1:off 2:on 3:on 4:on 5:on 6:off
root@node2:/usr/lib/insserv#
OK, now you see the service is done. Ubuntu still has bugs, hehe, seems to be quite a lot. I used to play Redhat and didn't see a similar problem.