tags 565631 +patch thanks Le 17.01.2010 15:58, Thomas Koch a écrit : > Package: lsb-base > Version: 3.2-23 > Severity: normal > > status_of_proc is not documented. You may want to provide documentation > in /usr/share/doc/lsb-base/README.Debian
Hi Thomas, and thanks for your bugreport, I propose the attached patch for review and comments. (I also put Dustin Kirkland, initiator of the status_of_proc function in Debian/Ubuntu's lsb-base, in explicit CC.) Opinions ? Cheers, OdyX
From c5ddfe0154ae0ce5b11dbb5c37f429c40901e026 Mon Sep 17 00:00:00 2001 From: Didier Raboud <o...@debian.org> Date: Wed, 7 Mar 2012 10:56:25 +0100 Subject: [PATCH] lsb-base.README.Debian: Document status_of_proc. Closes: #565631 Reported-by: Thomas Koch <tho...@koch.ro> Signed-off-by: Didier Raboud <o...@debian.org> --- debian/lsb-base.README.Debian | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/debian/lsb-base.README.Debian b/debian/lsb-base.README.Debian index 360ae21..c10d827 100644 --- a/debian/lsb-base.README.Debian +++ b/debian/lsb-base.README.Debian @@ -68,6 +68,35 @@ specific to Debian and (in some cases) other derived distributions. Note that unlike log_end_msg(), this function does not return the first argument as its exit code. + - status_of_proc [-p pidfile] pathname "Daemon_name" + + Log the status of a process and return an LSB-compliant exit status + code: + + 0 program is running or service is OK + 1 program is dead and /var/run pid file exists + 2 program is dead and /var/lock lock file exists + 3 program is not running + 4 program or service status is unknown + 5-99 reserved for future LSB use + 100-149 reserved for distribution use + 150-199 reserved for application use + 200-254 reserved + + On Debian, outputs: + "Daemon_name is running.". + "Daemon_name is not running ... failed!" + + The pidfile path will be used as argument for pidofproc and must be + provided if the pidfile is not /var/run/$daemon_basename.pid. + + status_of_proc can be used to easily implement the "status" argument + of init scripts: + + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + A deprecated function, log_start_msg, is also provided for compatibility with a few older packages and a derived distribution. This may eventually disappear. -- 1.7.2.5
signature.asc
Description: OpenPGP digital signature