[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#181123: [PATCH 2/2] Document status init script action



In LSB the status action is among the 'shall be supported' actions.
In Debian there are still many init scripts which does not support
the status action still to this day (see lintian catches for
init.d-script-does-not-implement-optional-option status).

Given we avoid creating a big number of RC bugs (under anyones
interpretation), we don't want to implement status as non-optional.
At the same time as it's not optional in LSB, we don't want to
add it to optional either.

Solve this by creating a new middle ground for 'recommended' actions
and put status there. Hopefully one day status can move up to the
rest of the 'non-optional' actions.

LSB also documents the specific return codes for the status action
which might be useful to have in policy as well, but at the same
time do we really want to duplicate all of LSB?
For now lets leave that as a potential future enhancement.
(See also discussion about this in merged/duplicate bug report.)

Fwiw, systemctl also supports status and trivial testing seems to
indicate it also uses the LSB specified return codes.

https://lintian.debian.org/tags/init.d-script-does-not-implement-optional-option.html
---
 policy.sgml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/policy.sgml b/policy.sgml
index 2fa250f..ef5d902 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -7551,12 +7551,16 @@ rmdir /usr/local/share/emacs 2>/dev/null || true
 	      <item>cause the configuration to be reloaded if the
 		  service supports this, otherwise restart the
 		  service.</item>
+
+	      <tag><tt>status</tt></tag>
+	      <item>report the current status of the service</item>
 	    </taglist>
 
 	    The <tt>start</tt>, <tt>stop</tt>, <tt>restart</tt>, and
 	    <tt>force-reload</tt> options should be supported by all
-	    scripts in <file>/etc/init.d</file>, the <tt>reload</tt>
-	    and <tt>try-restart</tt> options are optional.
+	    scripts in <file>/etc/init.d</file>, supporting
+	    <tt>status</tt> is recommended, the <tt>reload</tt> and
+	    <tt>try-restart</tt> options are optional.
 	  </p>
 
 	  <p>
-- 
2.11.0


Reply to: