supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Gerrit Pape <pape@smarden.org>
Subject: Re: runit and lsb init script actions
Date: Mon, 18 Apr 2005 19:17:46 +0000	[thread overview]
Message-ID: <20050418191801.21258.qmail@b73cc6b7d20203.315fe32.mid.smarden.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0504101257590.31619@e-smith.charlieb.ott.istop.com>

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
> ><service>/control/.  This separate program may be symlinked to
> >/etc/init.d/<service>, or used as a wrapper, and maybe fall back to an
> >original /etc/init.d/<service> 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.


  reply	other threads:[~2005-04-18 19:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-10 15:15 Gerrit Pape
2005-04-10 17:00 ` Charlie Brady
2005-04-18 19:17   ` Gerrit Pape [this message]
2005-04-19 22:05 ` Csillag Tamás

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050418191801.21258.qmail@b73cc6b7d20203.315fe32.mid.smarden.org \
    --to=pape@smarden.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).