running $sudo systemctl status rc
in my Ubuntu v18.04 I notices there is such a service:
● rc.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
can anyone tell me what it does?
Debian’s systemd adds a number of links to prevent obsolete initscripts from being run:
# 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
(In systemd, linking a unit to /dev/null
tells systemd that it is “masked”.)
So rc.service
’s sole purpose is to ensure that running
systemctl start rc
won’t run an /etc/init.d/rc
script left over from some other init system (file-rc
, openrc
and sysv-rc
all provide this file).