vim /etc/rc.d/rc.local
#!/bin/bashsystemctl start docker.service/root/hsl-win7-ns3-root.sh 6 destroy
/root/hsl-win7-ns3-root.sh 6 destroy/root/hsl_install_6_docker-centos-quagga.sh destroy
/root/hsl_install_6_docker-centos-quagga.sh destroy/root/hsl-win7-ns3-root.sh 6 create
/root/hsl_install_6_docker-centos-quagga.sh create
chmod +x /etc/rc.d/rc.local
vim /usr/lib/systemd/system/rc-local.service
#This file is part of systemd.
#
#systemd is free software;
you can redistribute it and/or modify it
#under the terms of the GNU Lesser General Public License as published by
#the Free Software Foundation;
either version 2.1 of the License, or
#(at your option) any later version.# This unit gets pulled automatically into multi-user.target by
# systemd-rc-local-generator if /etc/rc.d/rc.local is executable.
[Unit]
Description=/etc/rc.d/rc.local Compatibility
ConditionFileIsExecutable=/etc/rc.d/rc.local
After=network.target[Service]
Type=forking
ExecStart=/etc/rc.d/rc.local start
TimeoutSec=0
RemainAfterExit=yes
systemctl enable rc-local.service
systemctl status rc-local.service
【Linux普通应用|(OK) Fedora 24 开机自动启动脚本 - rc.local - rc-local.service】