Solve the problem that ubuntu chkconfig [/sbin/insserv cannot find the path]
Today, I did a DRBD experiment in a virtual machine and encountered a problem when I used the chkconfig management service. Root @ node2:/root # chkconfig -- list | grep 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. Use the following methods to solve root @ node2:/root # whereis insserv: /etc/insserv. conf/usr/lib/insserv/usr/share/man/man8/insserv.8.gz read the directories found one by one, root @ node2:/root # l in/usr/lib/ S-l/usr/lib/insserv/total 56-rwxr-xr-x 1 root 56368 Apr 9 insserv 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, it is depressing that a permission is not allowed. root @ node2: /root # ls-l/sbin/insserv lrwxrwxrwx 1 root 16 Jun 21/sbin/insserv->/usr/lib/insserv root @ node2: /root # ls-l/usr/lib/insserv total 56-r Wxr-xr-x 1 root 56368 Apr 9 insserv From the above we can see that there are permissions ah, so depressed, finally, we found that/usr/lib/insserv is actually a directory root @ node2 :~ # Cd/usr/lib/insserv/root @ node2:/usr/lib/insserv # pwd/usr/lib/insserv root @ node2: /usr/lib/insserv # ls insserv. Then the root @ node2:/usr/lib/insserv # rm-rf/sbin/insserv root @ node2 is solved: /usr/lib/insserv # ln-s/usr/lib/insserv/sbin/insserv root @ node2: /usr/lib/insserv # chkconfig drbd on The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported For Upstart jobs. insserv: warning: script 'dldly-recovery 'missing LSB tags and overrides insserv: Default-Start undefined, assuming empty start runlevel (s) for script 'dldly-recovery' insserv: default-Stop undefined, assuming empty stop runlevel (s) for script 'dldly-recovery 'reports a bunch of other errors. Check whether the service is OK. @ node2: /usr/lib/insserv # chkconfig -- list | grep drbd 0: off 1: off 2: on 3: on 4: o N 5: on 6: off root @ node2:/usr/lib/insserv # OK. Now the service is ready. Ubuntu still has bugs. I used to play RedHat and didn't find similar problems.