By default /etc/rc.local
and /etc/rc.d/rc.local
are no longer executable in CentOS7 with the new systemd-changes. Follow the below steps to make the script /root/g.sh run at boot time:
1. chmod +x /etc/rc.d/rc.local 2. chmod +x /root/g.sh 2. Mention your script at the bottom of the file /etc/rc.local (/etc/rc.local is a symlink to /etc/rc.d/rc.local)as below : sh /root/g.sh
Restart and check 🙂
not working …. very bad centos 7!!
it does not work