Centos 7/etc/rc. Local cannot be started

Source: Internet
Author: User

Recently, it was found that centos7's/etc/rc. Local won't be started, so I carefully read the/etc/rc. Local file and found the cause of the problem.

#!/bin/bash# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES## It is highly advisable to create own systemd services or udev rules# to run scripts during boot instead of using this file.## In constrast to previous versions due to parallel execution during boot# this script will NOT be run after all other services.## Please note that you must run ‘chmod +x /etc/rc.d/rc.local‘ to ensure# that this script will be executed during boot.

Translation:

# This file is added for compatibility issues. # We strongly recommend that you create your own systemd service or udev rules to run scripts at startup instead of using this file. # This script will not be executed after all other services compared with parallel execution during previous version boot. # Remember, you must execute "chmod + x/etc/rc. d/rc. Local" to ensure that this script is executed during boot.

So I confirmed the permission for/etc/rc. Local.

[[Email protected] ~] # Ll/etc/rc. locallrwxrwxrwx. 1 Root 13 October 13 06:09/etc/rc. Local-> rc. d/rc. Local [[email protected] ~] # Ll/etc/rc. d/rc. Local-RW-r --. 1 Root 477 June 10 13:35/etc/rc. d/rc. Local

/Etc/rc. d/rc. Local has no execution permission, so it is executed according to the description.

chmod +x /etc/rc.d/rc.local

After the restart, it is found that/etc/rc. Local can be executed.

It looks like the version changes, and/etc/rc. Local/etc/rc. d/rc. Local is being discarded.

This article from the "Idle pool small building" blog, please be sure to keep this source http://soarwilldo.blog.51cto.com/5520138/1549656

Centos 7/etc/rc. Local cannot be started

Related Article

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.