在我的Ubuntuv18.04中运行$sudo systemctl status rc,我注意到有这样的服务:
● rc.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)有人能告诉我它是干什么的吗?
发布于 2018-11-05 09:44:15
Debian的systemd添加了多个链接,以防止运行过时的initscript:
# Those services are useless under systemd. Mask them so they can't
# be run manually by accident.
/dev/null /lib/systemd/system/sendsigs.service
/dev/null /lib/systemd/system/halt.service
/dev/null /lib/systemd/system/reboot.service
/dev/null /lib/systemd/system/rc.service
/dev/null /lib/systemd/system/rcS.service(在systemd中,将一个单元链接到/dev/null告诉systemd它是“掩码”)。
所以rc.service‘S唯一的目的是确保
systemctl start rc不会运行其他init系统遗留的/etc/init.d/rc脚本(file-rc、openrc和sysv-rc都提供此文件)。
https://unix.stackexchange.com/questions/479854
复制相似问题