Do I have to place the command to be started on/etc/rc. Local that will start automatically?

Source: Internet
Author: User

 Today, the supervisor asked to modify the routing policy and finally added the commands required for starting the system to/etc/rc. local, the reboot result command was not executed, and later the supervisor reminded me to know that the boot command was added to/etc/rc. local may not start automatically at startup. First, let's take a look at this principle:

By default, the file loaded at startup is usually/etc/rc. d/RC. local, why is it? This is the same as/etc/rc. A file under D is related to/etc/rc. d/rcX. d/s99local is linked to/etc/rc. d/RC. local, where X is the boot level

Take a look at the current Boot level: runlevel

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/76/wKioL1P6-mrCBHbiAABAsK5PAlk536.jpg "Title =" 1111.png" alt = "wKioL1P6-mrCBHbiAABAsK5PAlk536.jpg"/>

Let's take a look.File Attributes of/etc/rc. d/rc3.d/s99local:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/75/wKiom1P6-afDN-6lAAC38UCejo8640.jpg "Title =" 1111.png" alt = "wKiom1P6-afDN-6lAAC38UCejo8640.jpg"/> see his link file is/etc/rc. d/RC. local, so you need to add the/etc/rc command to start the system. d/RC. local is always executed, So we usually add

/Etc/rc. Local can also achieve self-startup effect?

The answer is If/etc/rc. local is/etc/rc. d/RC. the local connection file can be used. If it is not, it cannot be used. If it must be in/etc/rc. how does the local command enable the command in the file?

Delete the original/etc/rc. Local and connect to/etc/rc. d/rc. Local.

Ln-S/etc/rc. d/rc. Local/etc/rc. Local

This article from the "Linux open source-continuous summary..." blog, please be sure to keep this source http://fantefei.blog.51cto.com/2229719/1544798

Do I have to place the command to be started on/etc/rc. Local that will start automatically?

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.