gpt4 book ai didi

debian - Debian 9(Debian Stretch)中的rc.local在哪里

转载 作者:行者123 更新时间:2023-12-03 07:57:44 27 4
gpt4 key购买 nike

在Debian的最新稳定版本中似乎没有/etc/rc.local Debian Stretch 。它在哪里? /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

供应商预设应启用。您可以在rc.local中添加一些 echo 123 >/proof并重新启动,以确保它可以正常工作-我使用EC2上的最后一个Debian Stretch AMI确认它可以运行,...

关于debian - Debian 9(Debian Stretch)中的rc.local在哪里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44797694/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com