From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/772 Path: news.gmane.org!not-for-mail From: Gerrit Pape Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runit and lsb init script actions Date: Mon, 18 Apr 2005 19:17:46 +0000 Message-ID: <20050418191801.21258.qmail@b73cc6b7d20203.315fe32.mid.smarden.org> References: <20050410151610.26722.qmail@c94466ef4374af.315fe32.mid.smarden.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1113851662 5373 80.91.229.2 (18 Apr 2005 19:14:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 18 Apr 2005 19:14:22 +0000 (UTC) Original-X-From: supervision-return-1008-gcsg-supervision=m.gmane.org@list.skarnet.org Mon Apr 18 21:14:17 2005 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1DNbgf-00008e-Vy for gcsg-supervision@gmane.org; Mon, 18 Apr 2005 21:13:38 +0200 Original-Received: (qmail 14520 invoked by uid 76); 18 Apr 2005 19:18:02 -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 14515 invoked from network); 18 Apr 2005 19:18:02 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.comp.sysutils.supervision.general:772 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:772 On Sun, Apr 10, 2005 at 01:00:18PM -0400, Charlie Brady wrote: > On Sun, 10 Apr 2005, Gerrit Pape wrote: > >Hi, one thing that has been requested for runit multiple times is lsb > >compliance concerning 'init script' actions, see > > > >http://refspecs.freestandards.org/LSB_2.1.0/LSB-Core-generic/LSB-Core-generic.html#INISCRPTACT > > > >It seems to be quite possible to implement an lsb compliant interface > >through a separate program that runs runsvctrl up, down, term, hup, ..., > >depending on the command line arguments. For service daemons that don't > >do the right thing on up, down, term, hup, ..., it's possible to > >override the actions through the customized control scripts in > >/control/. This separate program may be symlinked to > >/etc/init.d/, or used as a wrapper, and maybe fall back to an > >original /etc/init.d/ script in case the service doesn't run > >under runit's supervision. > Here's a runit specific version I use under a RedHat based system: Yes, this is the link approach, looks good. I'm still thinking about the wrapper; Debian uses an invoke-rc.d program to call init scripts on package installation, which supports a user defined policy. In any case this needs documentation, a man page, and maybe an 'lsb init script actions' page. > # Determine the service name and its service directory from $0 > > SERVICE=$(/bin/basename $0 | sed -e 's/^[SK][0-9][0-9]*//') SERVICE=${0##*/} SERVICE=${SERVICE#[SK][0-9][0-9]} > *) > echo "usage: $0 > {start|stop|restart|status|sigalrm|sigcont|sighup|sigint|sigkill|sigstop|sigterm|sigusr1|sigusr2|svdisable}" > ;; I don't think all these options should be supported, just the ones the lsb documents. runit services still should be controlled through the runsvctrl program. Thanks, Gerrit.