From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/312 Path: main.gmane.org!not-for-mail From: Gerrit Pape Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runit-1.0.0 release Date: Wed, 11 Feb 2004 20:43:12 +0000 Message-ID: <20040211204212.12241.qmail@771d3fc1654724.315fe32.mid.smarden.org> References: <20040210153548.16191.qmail@56dafcc887170f.315fe32.mid.smarden.org> <20040211192355.17755561@rad1.109bean.org.uk> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1076532120 16872 80.91.224.253 (11 Feb 2004 20:42:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 11 Feb 2004 20:42:00 +0000 (UTC) Original-X-From: supervision-return-550-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Feb 11 21:41:50 2004 Return-path: Original-Received: from antah.skarnet.org ([212.43.221.114]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1Ar1B8-0001H4-00 for ; Wed, 11 Feb 2004 21:41:50 +0100 Original-Received: (qmail 26548 invoked by uid 76); 11 Feb 2004 20:42: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 26543 invoked from network); 11 Feb 2004 20:42:09 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <20040211192355.17755561@rad1.109bean.org.uk> Xref: main.gmane.org gmane.comp.sysutils.supervision.general:312 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:312 On Wed, Feb 11, 2004 at 07:23:55PM +0000, Richard A Downing FBCS wrote: > I am using runit - indeed I'm trying to write up how to use it as an > alternative to the standard SysVinit boot-scripts for Linux From > Scratch: http://www.linuxfromscratch.org. > > However, I'm a little stumped on the way stage 1 is managed. The > manual states that 'If /etc/runit/1 itself crashes, runit will skip > stage 2 and enter stage 3'. Can you say what exactly that means? runit.c uses wait_exitcode() and wait_chrashed() from the daemontools public domain library, the wait interface is documented in the qmail man pages: http://www.qmail.org/man/man3/wait.html An exit code other than zero just causes a warning, stage 2 only is skipped if stage 1 has crashed, e.g. due to a broken binary. I guess that this happened here: http://article.gmane.org/gmane.comp.sysutils.supervision.general/295 http://thread.gmane.org/gmane.comp.sysutils.supervision.general/296 > If I exit -1, it just reports a warning and then enters stage 2 as > normal. I want to be able to say 'things got too difficult in stage > 1' and get straight to stage 3 and an orderly shutdown. It would be easy to change this in the runit.c source, but I'm curious why you need it. What's the advantage of running stage 3 in this situation?, if stage 1 cannot recover, it can possibly reboot immediately. > Also, how would you expect a stage 1 script to provide an emergency > shell? Look at the example stage 1 scripts for FreeBSD on OpenBSD. But maybe the boot scripts from lfs already do that, like the Debian ones. Debian even provides an extra /sbin/sulogin program. The BSDs include code for an emergency root shell with a password prompt in process no 1. I don't want to do this with runit, it should be a separate program started by stage 1 if at all. When converting a system from sysvinit to runit, this thread might be of help: http://thread.gmane.org/gmane.comp.sysutils.supervision.general/243 Regards, Gerrit.