您的位置:首页 > 其它

Arch下systemd无法开机执行rc.local之解决方法

2014-09-06 14:59 239 查看
早就发现了,Arch的systemd提供的那个 rc-local.service 貌似有问题,rc.local不会执行。因为没用rc.local,一直没管。

解决方法源自这里,需要稍加改动: http://superuser.com/questions/278396/systemd-does-not-run-etc-rc-local
建立文件 /etc/systemd/system/rclocal.service (我怕和系统自带的service冲突,改了个名字),内容为:

[Unit]

Description=/etc/rc.local Compatibility

ConditionPathExists=/etc/rc.local

[Service]

Type=forking

ExecStart=/etc/rc.local

TimeoutSec=0

StandardOutput=tty

RemainAfterExit=yes

SysVStartPriority=99

[Install]

WantedBy=multi-user.target

干掉旧的service:

systemctl disable rc-local.service

上新的service:

systemctl enable rclocal.service

重启动检验。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: