Bug#941198: initscripts: packages should ship systemd units
- To: Ansgar <ansgar@43-1.org>
- Cc: 941198@bugs.debian.org
- Subject: Bug#941198: initscripts: packages should ship systemd units
- From: Russ Allbery <rra@debian.org>
- Date: Sun, 03 Nov 2019 13:04:57 -0800
- Message-id: <[🔎] 874kzkoeme.fsf@hope.eyrie.org>
- Reply-to: Russ Allbery <rra@debian.org>, 941198@bugs.debian.org
- In-reply-to: <87h84yqjwf.fsf@43-1.org> (Ansgar's message of "Fri, 27 Sep 2019 09:26:56 +0200")
- References: <156948475045.9391.15664362173898928746.reportbug@deep-thought.43-1.org> <156948475045.9391.15664362173898928746.reportbug@deep-thought.43-1.org> <87lfuahgae.fsf@iris.silentflame.com> <156948475045.9391.15664362173898928746.reportbug@deep-thought.43-1.org> <87h84yqjwf.fsf@43-1.org> <156948475045.9391.15664362173898928746.reportbug@deep-thought.43-1.org>
Ansgar <ansgar@43-1.org> writes:
> Sean Whitton writes:
>>> +Packages that include system services should include ``systemd`` units
>>> +to start or stop services.
>>> +
>>> Packages that include daemons for system services should place scripts
>>> in ``/etc/init.d`` to start or stop services at boot time or during a
>>> change of runlevel. These scripts should be named
>> The text now has both "Packages that include system services ..." and
>> "Packages that include daemons for system services". Do you take these
>> to refer to different things? Surely we can combine the language somehow.
> No. I just wanted to have a simple initial proposal to start with.
> Arguably one can ship systemd services for more things (such as
> dbus-activated or timer-activated services), but I don't think that
> difference matters here.
> I omitted the "daemons for" as both service files and initscripts don't
> always start a persistent background process (daemon), but can also run
> one-time actions.
> To combine the language, maybe the second paragraph should be changed to
> something like
> [To support alternative init systems] packages should additionally
> place initscripts in ``/etc/init.d``. These scripts should be named
> ...
> (with or without the text in brackets).
Combining this idea, I end up with this proposed change:
--- a/policy/ch-opersys.rst
+++ b/policy/ch-opersys.rst
@@ -388,11 +388,14 @@ argument ``stop``.
Writing the scripts
~~~~~~~~~~~~~~~~~~~
-Packages that include daemons for system services should place scripts
-in ``/etc/init.d`` to start or stop services at boot time or during a
-change of runlevel. These scripts should be named
-``/etc/init.d/package``, and they should accept one argument, saying
-what to do:
+Packages that include system services should include ``systemd`` service
+units to start or stop those services. See :manpage:`systemd.service(5)`.
+
+To support other init systems, packages that include daemons for system
+services should place scripts in ``/etc/init.d`` to start or stop those
+services at boot time or during a change of runlevel. These scripts should
+be named ``/etc/init.d/package``, and they should accept one argument,
+saying what to do:
``start``
start the service,
Ansgar, does that look good to you? If so, it also needs one more second.
--
Russ Allbery (rra@debian.org) <https://www.eyrie.org/~eagle/>
Reply to: