I've known that Debian and Ubuntu have used
systemd to manage the services running at boot time.
I've known that there were
/etc/init.d/, which are also about services running at boot time.
Now I want to know how do
systemd work together.
How does systemd use /etc/init.d scripts?
I'm confused now.
It seems that
systemd will transform the scripts in
/etc/rcX.d and in
/etc/init.d into the service that can be read by
systemd. But what is the rule of the transformation? The first link and the second link told me that
systemd would transform the script in
/etc/init.d into the service, which is
after basic.target, and the script in
/etc/rcX.d into the service, which is
Wanted-By multi-user.target. But the third link told me that
/etc/rcX.d/ contains many soft links to the scripts located in
/etc/init.d/. Doesn't this make any conflict?
For me, it seems that adding script in
/etc/rcX.d is the same because adding script in both of them can be execute at boot time.