/etc/rc.local startup programs in centos7

There are a /etc/rc.local startup file in centos6, as long as the need for frequent start of the program is added under this source /etc/rc.local file and execute the boot up can be achieved.
In centos7 do not know it is doing so?

    [root@centos ~]# cat /etc/rc.local
#!/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 contrast 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.

touch /var/lock/subsys/local
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure ,看到这句话,就会发现需要给文件/etc/rc.local添加执行权限就可以实现程序自启动。

Guess you like

Origin www.cnblogs.com/wang50902/p/11702734.html