[systemd-devel] [PATCH] man, systemctl: correct handling of compatibility commands

Ran Benita ran234 at gmail.com
Sun Nov 28 10:25:01 PST 2010


On Sun, Nov 28, 2010 at 15:19, Kay Sievers <kay.sievers at vrfy.org> wrote:
> On Fri, Nov 26, 2010 at 23:56, Ran Benita <ran234 at gmail.com> wrote:
>> The manpage says condrestart is equivalent to reload-or-try-restart, but
>> the code and the sysvinitscripts file from the initscripts package says
>> it is actually the same as try-restart.
>>
>> Further, the code and manpage say that force-reload is equivalent to
>> reload-or-try-restart, but several legacy init scripts and the Debian
>> Policy Manual (9.3.2), not to mention the name itself, suggest that it
>> should be the same as the reload-or-restart command.
>
> Bill, care to check the changes below if they apply to Fedora?
>
>> There are also some spelling corrections.
>
> I've committed all the spelling fixes. The remaining part is below,
> which should be checked by Bill.
>
> Thanks,
> Kay

These tiny differences were confusing enough for the author of the
manpage, and I managed to get it wrong as well;
upon closer examination, I was perhaps a bit reckless...
The LSB page here
http://refspecs.linux-foundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
says force-reload = reload-or-try-restart, which is the current
behavior. So systemctl.c should not change.

The condrestart correction in the manpage is still applicable,
however. In the interest of complete clarity, here is my updated
suggestion:


diff --git a/man/systemctl.xml b/man/systemctl.xml
index 7bb8458..bb24002 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -416,21 +416,31 @@
                                units specified on the command
                                line. If the units are not running yet
                                the operation will
-                                fail.</para></listitem>
+                                fail. Note that for compatibility
+                                with Red Hat init scripts
+                                <command>condrestart</command> is
+                                equivalent to this command.</para></listitem>
                        </varlistentry>
                        <varlistentry>
                                <term><command>reload-or-restart
[NAME...]</command></term>
+
+                                <listitem><para>Reload one or more
+                                units if they support it. If not,
+                                restart them instead. If the units
+                                are not running yet they will be
+                                started.</para></listitem>
+                        </varlistentry>
+                        <varlistentry>
                                <term><command>reload-or-try-restart
[NAME...]</command></term>

                                <listitem><para>Reload one or more
                                units if they support it. If not,
-                                restart them instead. Note that for
-                                compatibility with SysV and Red Hat
-                                init scripts
-                                <command>force-reload</command> and
-                                <command>condrestart</command> may be
-                                used as equivalent commands to
-
<command>reload-or-try-restart</command>.</para></listitem>
+                                restart them instead. If the units
+                                are not running yes the operation
+                                will fail. Note that for
+                                compatibility with SysV init scripts
+                                <command>force-reload</command> is
+                                equivalent to this command.</para></listitem>
                        </varlistentry>
                        <varlistentry>
                                <term><command>isolate [NAME]</command></term>


More information about the systemd-devel mailing list