From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1136 Path: news.gmane.org!not-for-mail From: "depuis" Newsgroups: gmane.comp.sysutils.supervision.general Subject: runit integration Date: Tue, 30 May 2006 09:57:52 +0200 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1148998423 31219 80.91.229.2 (30 May 2006 14:13:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 May 2006 14:13:43 +0000 (UTC) Original-X-From: supervision-return-1372-gcsg-supervision=m.gmane.org@list.skarnet.org Tue May 30 16:13:36 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1Fl4xw-0001SJ-B4 for gcsg-supervision@gmane.org; Tue, 30 May 2006 16:13:01 +0200 Original-Received: (qmail 2153 invoked by uid 76); 30 May 2006 14:13:21 -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 30048 invoked from network); 30 May 2006 07:58:20 -0000 X-Sensitivity: 3 Original-To: "supervision" X-XaM3-API-Version: 4.1 (B54) X-type: 0 X-SenderIP: 130.104.31.150 Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1136 Archived-At: Hello, I've read yesterday the article on linux today about runnit - tried it - = I find it interesting, and I would like to comment a bit... My background: linux hacker since 1996 (Slackware 3), today using debian = etch on a laptop, rebooting the system each day, so optimising the start phase= is a big win. Furthermore, I use laptop-net to configure programs and services= based upon the network environment: at home, at work, if a WIFI is availa= ble, ... I think that runit should provide some compatibility mechanism with the existing rc runlevels and /etc/init.d/ scripts. Maintainers carefully pol= ished those scripts, some are very elaborate, and providing a drop-in for these= scripts is a lot of work: compatibility issues, following the latest vers= ion, and so on. What does they have in common ? Most use the start-stop-daemon program in= order to control the processes. What about providing some alternative to = this program? But let's think first about what has to be adapted ? Not a lot. Mostly program invocation. start-stop-daemon expects the called program t= o detach(). In the runit context, this should be avoided. A possible soluti= on is to write a wrapper, like f.i. for gpm: #!/bin/sh sv start devfsd || exit 1 EXTRA_ARG=3D"-D" /etc/init.d/gpm start The idea is to define two environnement vars: REMOVE_ARG which contains arguments that have to be removed from the fina= l command line ('--daemon' f.i.) EXTRA_ARG is a supplemental arg which prevents the called program to deta= ch itself (program dependent) The global idea would thus to provide some substitue for start-stop-daemo= n, with some wrapper permitting to use the /etc/init.d script "as is". This substitute would be a mix of runsv and chpst, as the start-stop-daemon ca= n alter the process state (-u, -g, ...). All the glue logic (this program m= ust wait that program before starting) would also be concentrated at the same= level. This way, the compatibility would be achieved as: 1) for each entry in /etc/rc2.d, place a symbolic link in /etc/runit/runs= vdir/ default/ to a wrapper in /etc/sv 2) for each entry in /etc/init.d, provide a wrapper in /etc/sv wich add a= nd remove the required args so that the invoqued program does not detach, together with the required dependencies on other programs. This way, runit would be a replacement for sysvinit, minimising the migra= tion and maintenance burden. I am not subscribed to this list, but I'll follow this discussion through= the archive. Best regards Pascal Dupuis =0A=0A----------=0AWordt ook lid van de Scarlet Club via een bestaande Sc= arlet klant en ontvang cadeaucheques twv EUR 50! Bezoek snel http://www.s= carletclub.be=0ADevenez aussi membre du Club Scarlet via un client Scarle= t existant et recevez des cheques cadeaux jusqu'a EUR 50! Surfez vite sur= http://www.clubscarlet.be