From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2009 Path: news.gmane.org!not-for-mail From: Erik Wright Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Bug for sv status in lsb mode Date: Mon, 31 May 2010 19:54:25 +0000 (UTC) Message-ID: References: <8F9355C5-C168-4AD7-8B6C-502416E7EECC@zoy.org> <94175859-2733-4ACF-85E9-DD5FF627F23B@zoy.org> <17A739BC-94BA-4611-A523-6978934F0D61@zoy.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1275335713 2791 80.91.229.12 (31 May 2010 19:55:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 May 2010 19:55:13 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2244-gcsg-supervision=m.gmane.org@list.skarnet.org Mon May 31 21:55:10 2010 connect(): No such file or directory Return-path: Envelope-to: gcsg-supervision@lo.gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1OJB4m-0005Rc-Kt for gcsg-supervision@lo.gmane.org; Mon, 31 May 2010 21:55:08 +0200 Original-Received: (qmail 8307 invoked by uid 76); 31 May 2010 19:57:10 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 8292 invoked from network); 31 May 2010 19:57:10 -0000 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 73 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 70.28.47.132 (Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2009 Archived-At: Gerrit Pape smarden.org> writes: > > Mathieu Poumeyrol zoy.org> writes: > > Le 13 juil. 09 à 16:13, Mathieu Poumeyrol a écrit : > > > Le 13 juil. 09 à 15:42, Charlie Brady a écrit : > > > It's not explicit here, but required for LSB compliance. > > > > > > see > http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html > > > > > > As a matter of fact, sv code looks like it is meant to achieve this, > > > but fails because of the side effect on the "r" global. > > > > Sorry, it is actually explicit in the "Exit codes" last paragraph... > > > > If the command is status, it exits 3 if the service is down, and 4 if > > the status is unknown. It exits 2 on wrong usage, and 151 on error. > > Hi, this is a bug in the documentation then, the complete paragraph is > > If sv is called with a base name other than sv, it exits 1 on timeout > or trouble sending the command. If the command is status, it exits 3 > if the service is down, and 4 if the status is unknown. It exits 2 on > wrong usage, and 151 on error. > > These exit codes only apply if sv is called with a different basename. > > # sv stop getty-5 > ok: down: getty-5: 0s, normally up > # ln -s $(which sv) /tmp/getty-5 > # /tmp/getty-5 status > down: getty-5: 4s, normally up > # echo $? > 3 > # > > Any suggestions on how to improve the man page? > > Thanks, Gerrit. > > Hi, This is a follow-up to a thread from last summer. Mathieu Poumeyrol reported that 'sv status' returned 0 even when the service was down. Gerrit replied that this was expected behaviour when sv is called with a basename of 'sv'. Unfortunately, I'm seeing this behaviour even when calling sv with another basename. To illustrate, here is a shell session snippet on Ubuntu: -------- root@domU-12-31-39-0C-1D-B1:~# ls -l /etc/init.d/celeryd lrwxrwxrwx 1 root root 11 2010-05-14 18:42 /etc/init.d/celeryd -> /usr/bin/sv root@domU-12-31-39-0C-1D-B1:~# /etc/init.d/celeryd status; echo $? down: celeryd: 1576s, normally up; run: log: (pid 711) 1043375s 0 root@domU-12-31-39-0C-1D-B1:~# dpkg -s runit Package: runit ... Version: 2.0.0-1ubuntu3.1 root@domU-12-31-39-0C-1D-B1:~# cat /etc/issue Ubuntu 9.10 \n \l -------- Any ideas what might be causing this? Thanks, Erik