Ubuntu 12.04 Why you can't use Chkconfig management services

Source: Internet
Author: User
Tags empty

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.