Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 684354 - Modernize "init scripts" documentation
Summary: Modernize "init scripts" documentation
Status: CONFIRMED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Devmanual (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Devmanual Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-04-25 18:17 UTC by Michael Orlitzky
Modified: 2021-02-15 08:47 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
0001-tasks-reference-modernize-the-OpenRC-init-scripts-do.patch (0001-tasks-reference-modernize-the-OpenRC-init-scripts-do.patch,4.13 KB, patch)
2019-04-25 18:20 UTC, Michael Orlitzky
Details | Diff
0001-tasks-reference-modernize-the-OpenRC-init-scripts-do.patch (0001-tasks-reference-modernize-the-OpenRC-init-scripts-do.patch,4.11 KB, patch)
2019-09-05 23:11 UTC, Michael Orlitzky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Orlitzky gentoo-dev 2019-04-25 18:17:39 UTC
Our "init scripts" page is pretty out-of-date. They aren't even called "init scripts" any more.
Comment 1 Michael Orlitzky gentoo-dev 2019-04-25 18:20:27 UTC
Created attachment 574116 [details, diff]
0001-tasks-reference-modernize-the-OpenRC-init-scripts-do.patch
Comment 2 Michael Orlitzky gentoo-dev 2019-09-05 23:11:23 UTC
Created attachment 589152 [details, diff]
0001-tasks-reference-modernize-the-OpenRC-init-scripts-do.patch

Same patch but with the paragraphs de-indented per the coding style.
Comment 3 Ulrich Müller gentoo-dev 2019-09-06 07:51:32 UTC
I think you shouldn't remove the info about install locations. /etc/init.d is where init scripts are installed, and when checking the image of a package, developers need that information. Same for /etc/conf.d.

About the name change, openrc-0.42.1 seems to call them "init scripts" most of the time:

$ qlist openrc | xargs grep -i 'init script' | wc -l
18
$ qlist openrc | xargs grep -i 'service script' | wc -l
7
Comment 4 Michael Orlitzky gentoo-dev 2019-09-06 12:58:41 UTC
Thanks for taking the time to review. As far as I know, the "init script" versus "service script" thing is like "portage tree" and "gentoo tree." The term "init script" is going to be around for a long time, but it's too easy to confuse it with "(SysV) init script." The two can't be used interchangeably, and having a different name makes it easier to understand that we're talking about something else. You can see in e.g. 14e3359a that William is making an effort to be consistent in new documentation. I was asked to use "service script" in the last big PR that I submitted OpenRC. The name "service script" also hides the implementation detail of where they're located, which brings me to...

The fact that they're installed into /etc/init.d should be an implementation detail. In the past, we've told users that "/etc/init.d/foo start" is how you start a service. But these days, "rc-service foo start" is preferred, and that would continue to work if the directory was moved.

Ultimately, we do need to know where the scripts get installed -- doinitd() needs to do the right thing, and the documentation that I've pointed to suggests sending your service scripts upstream, where they'll use the path @SYSCONFDIR@/init.d. But I think it's pointless to duplicate that information in the devmanual. The doinitd() documentation says,

  doinitd <init.d script> [list of more init.d scripts]
      Install  Gentoo init.d scripts.  They will be installed into the
      correct location for Gentoo init.d scripts (/etc/init.d/).  Cre‐
      ates all necessary dirs.

and that tells developers where to look in the install image if they care to verify. The doconfd() function is similar.