Debian 9(Debian Stretch)中的rc.local在哪里
Debian的最新稳定版本,Debian Stretch中似乎没有Debian 9(Debian Stretch)中的rc.local在哪里,debian,Debian,Debian的最新稳定版本,Debian Stretch中似乎没有/etc/rc.local。它在哪里?/etc/rc.local是否已过时?rc.local正在被弃用 不过,您似乎仍然可以拥有一个: cat <<EOF >/etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the s
/etc/rc.local
。它在哪里?/etc/rc.local是否已过时?rc.local
正在被弃用
不过,您似乎仍然可以拥有一个:
cat <<EOF >/etc/rc.local
#!/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.
exit 0
EOF
chmod +x /etc/rc.local
systemctl daemon-reload
systemctl start rc-local
systemctl status rc-local
● rc-local.service - /etc/rc.local Compatibility
Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)
Drop-In: /lib/systemd/system/rc-local.service.d
└─debian.conf
Active: inactive (dead)
Condition: start condition failed at Wed 2017-06-28 11:32:36 UTC; 3min 13s ago
cat/proof
到您的rc.local并重新启动,确保它工作-我确认它工作,在EC2上使用最后一个Debian Stretch AMI,/etc/rc.local
是从属于包的/etc/init.d/rc.local
调用的。至少如果您安装了SysV init。不赞成使用什么?它不起作用,因为您需要添加神奇的额外服务rc local.service
来调用/etc/rc.local
。如果我需要一些更大的东西,那就不起作用了。<代码>回声hello World <代码> -包安装,DB CONFIG,模块配置。(我们可以就是否应该允许一些上游开发人员反对我们想要使用的东西发表意见,但是嘿)