/etc/init.d and /etc/rcX.d/: how do they work with systemd
Clash Royale CLAN TAG#URR8PPP
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/rcX.d/
and /etc/init.d/
, which are also about services running at boot time.
Now I want to know how do /etc/rcX.d/
, /etc/init.d/
and systemd
work together.
After reading
https://manpages.debian.org/stretch/systemd/systemd-sysv-generator.8.en.html
and
How does systemd use /etc/init.d scripts?
and
https://stackoverflow.com/questions/21901385/whats-the-exactly-differences-of-etc-init-d-something-and-etc-rc-local
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/init.d
and in /etc/rcX.d
is the same because adding script in both of them can be execute at boot time.
systemd sysvinit rc
add a comment |
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/rcX.d/
and /etc/init.d/
, which are also about services running at boot time.
Now I want to know how do /etc/rcX.d/
, /etc/init.d/
and systemd
work together.
After reading
https://manpages.debian.org/stretch/systemd/systemd-sysv-generator.8.en.html
and
How does systemd use /etc/init.d scripts?
and
https://stackoverflow.com/questions/21901385/whats-the-exactly-differences-of-etc-init-d-something-and-etc-rc-local
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/init.d
and in /etc/rcX.d
is the same because adding script in both of them can be execute at boot time.
systemd sysvinit rc
I did not tell you that/etc/rc?.d
contains scripts. I explicitly wrote "symbolic link farms".
– JdeBP
Feb 25 at 9:53
It says "symbolic link farms" at unix.stackexchange.com/a/394191/5132 too.
– JdeBP
Feb 25 at 10:11
@JdeBP thanks a lot dude, let me read it again.
– Yves
Feb 25 at 10:27
add a comment |
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/rcX.d/
and /etc/init.d/
, which are also about services running at boot time.
Now I want to know how do /etc/rcX.d/
, /etc/init.d/
and systemd
work together.
After reading
https://manpages.debian.org/stretch/systemd/systemd-sysv-generator.8.en.html
and
How does systemd use /etc/init.d scripts?
and
https://stackoverflow.com/questions/21901385/whats-the-exactly-differences-of-etc-init-d-something-and-etc-rc-local
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/init.d
and in /etc/rcX.d
is the same because adding script in both of them can be execute at boot time.
systemd sysvinit rc
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/rcX.d/
and /etc/init.d/
, which are also about services running at boot time.
Now I want to know how do /etc/rcX.d/
, /etc/init.d/
and systemd
work together.
After reading
https://manpages.debian.org/stretch/systemd/systemd-sysv-generator.8.en.html
and
How does systemd use /etc/init.d scripts?
and
https://stackoverflow.com/questions/21901385/whats-the-exactly-differences-of-etc-init-d-something-and-etc-rc-local
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/init.d
and in /etc/rcX.d
is the same because adding script in both of them can be execute at boot time.
systemd sysvinit rc
systemd sysvinit rc
asked Feb 25 at 9:35
YvesYves
929823
929823
I did not tell you that/etc/rc?.d
contains scripts. I explicitly wrote "symbolic link farms".
– JdeBP
Feb 25 at 9:53
It says "symbolic link farms" at unix.stackexchange.com/a/394191/5132 too.
– JdeBP
Feb 25 at 10:11
@JdeBP thanks a lot dude, let me read it again.
– Yves
Feb 25 at 10:27
add a comment |
I did not tell you that/etc/rc?.d
contains scripts. I explicitly wrote "symbolic link farms".
– JdeBP
Feb 25 at 9:53
It says "symbolic link farms" at unix.stackexchange.com/a/394191/5132 too.
– JdeBP
Feb 25 at 10:11
@JdeBP thanks a lot dude, let me read it again.
– Yves
Feb 25 at 10:27
I did not tell you that
/etc/rc?.d
contains scripts. I explicitly wrote "symbolic link farms".– JdeBP
Feb 25 at 9:53
I did not tell you that
/etc/rc?.d
contains scripts. I explicitly wrote "symbolic link farms".– JdeBP
Feb 25 at 9:53
It says "symbolic link farms" at unix.stackexchange.com/a/394191/5132 too.
– JdeBP
Feb 25 at 10:11
It says "symbolic link farms" at unix.stackexchange.com/a/394191/5132 too.
– JdeBP
Feb 25 at 10:11
@JdeBP thanks a lot dude, let me read it again.
– Yves
Feb 25 at 10:27
@JdeBP thanks a lot dude, let me read it again.
– Yves
Feb 25 at 10:27
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f502820%2fetc-init-d-and-etc-rcx-d-how-do-they-work-with-systemd%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f502820%2fetc-init-d-and-etc-rcx-d-how-do-they-work-with-systemd%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I did not tell you that
/etc/rc?.d
contains scripts. I explicitly wrote "symbolic link farms".– JdeBP
Feb 25 at 9:53
It says "symbolic link farms" at unix.stackexchange.com/a/394191/5132 too.
– JdeBP
Feb 25 at 10:11
@JdeBP thanks a lot dude, let me read it again.
– Yves
Feb 25 at 10:27