Fedora-29-配置开机自动启动-rc.local

#参考:https://www.cnblogs.com/flymeng/p/7901062.html


cat >/etc/rc.d/rc.local<<EOF
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo 1;
exit 0
EOF

chmod +x /etc/rc.d/rc.local
#selinux
#restorecon -v /etc/rc.d/rc.local

#设置
systemctl enable rc-local.service
systemctl start rc-local.service
systemctl status rc-local.service