From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1027 Path: news.gmane.org!not-for-mail From: Vincent Danen Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: copy runit-init to /sbin/init or not Date: Mon, 13 Feb 2006 23:04:03 -0700 Organization: Annvix Message-ID: <20060214060403.GF27964@annvix.org> References: <20060202042050.GI17576@annvix.org> <20060203154031.9374.qmail@6824f200d7859c.315fe32.mid.smarden.org> <20060203164529.GK17576@annvix.org> <20060203165552.17710.qmail@238ebfa254faf9.315fe32.mid.smarden.org> <20060211190328.GK1391@annvix.org> <20060211194445.GL1391@annvix.org> <20060213144431.8897.qmail@2b7bc139b19c0c.315fe32.mid.smarden.org> <20060214040831.GD27964@annvix.org> <20060214054251.GH6585@home.power> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6v9BRtpmy+umdQlo" X-Trace: sea.gmane.org 1139897087 7263 80.91.229.2 (14 Feb 2006 06:04:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2006 06:04:47 +0000 (UTC) Original-X-From: supervision-return-1263-gcsg-supervision=m.gmane.org@list.skarnet.org Tue Feb 14 07:04:43 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 1F8tIk-0008IU-To for gcsg-supervision@gmane.org; Tue, 14 Feb 2006 07:04:39 +0100 Original-Received: (qmail 12177 invoked by uid 76); 14 Feb 2006 06:04:59 -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 12171 invoked from network); 14 Feb 2006 06:04:59 -0000 Original-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <20060214054251.GH6585@home.power> X-Mailer: Mutt 1.5.x/OS X 10.4.x X-PGP-Key: http://linsec.ca/vdanen.asc X-URL: http://annvix.org/ User-Agent: Mutt/1.5.10i X-SA-Exim-Connect-IP: 68.149.37.7 X-SA-Exim-Mail-From: vdanen@annvix.org X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on hades.annvix.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=6.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2 (built Sun, 09 Oct 2005 23:21:52 -0400) X-SA-Exim-Scanned: Yes (on hades.annvix.org) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1027 Archived-At: --6v9BRtpmy+umdQlo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Alex Efros [2006-02-14 07:42:51 +0200]: > > * Gerrit Pape [2006-02-13 14:44:31 +0000]: > > > Yes, runit-init must be /sbin/init. It's that /sbin/init on unix is = not > > > only used as process 1, but also as command line interface while the > > > system is up (e.g. 'init 0', 'init 6'). With runit, the process no 1 > > > duties are implemented in the runit program, and the cli in runit-ini= t. > > > runit-init is installed as /sbin/init, and if it sees itself started > > > with pid 1, it immediately replaces itself with /sbin/runit, the proc= ess > > > no 1 implementation. If it's not running as pid 1, it's the command > > > line interface to signal the (currently as process no 1 running) runit > > > process. >=20 > Do you aware of any software which run 'init [0|6]' or 'halt' or 'reboot'? > For now I've seen these commands executed only manually by root and by > acpid daemon. AFAIK, programs like apcupsd and nut probably do. Not aware of any others, however. > I've problems with installing runit-init as /sbin/init on my Gentoo - this > is because from time to time while upgrading overall system 'sysvinit' pa= ckage > become upgraded and it replace /sbin/init. If I forget to replace it > by runit-init manually again, I got surprise on next reboot. :-( Doesn't Gentoo have a blacklist? Ie. tell it not to emerge a new sysvinit if it comes across one? That would be my first suggestion. I seriously doubt that shutdown/reboot/halt really need to be recompiled that often. > Currently I work around this issue this way: > - /sbin/{init,halt,reboot} is sysvinit's > - kernel boot with param init=3D/sbin/runit-init > - there aliases configured in /root/.bashrc: > alias reboot=3D'/sbin/runit-init 6' > alias halt=3D'/sbin/runit-init 0' > (I usually use reboot|halt, not init 0|6, but alias for init also can be > added if needed) > - acpid configured to run '/sbin/runit-init 0' in it /etc/acpi/default.sh You can still use sysvinit's shutdown/reboot/etc. with runit. No need for the aliases or even reconfigured acpid. They'll work just fine. You might get a sporadic "can't communicate with /dev/initctl" message when you type reboot or halt, but that's not really a problem (I've just patched that out for Annvix to prevent people from getting concerned over nothing). The solution of booting the kernel with init=3D/sbin/runit-init would work in and of itself, if you can't blacklist sysvinit. No need for the aliases and other stuff. --=20 Annvix - Secure Linux Server: http://annvix.org/ "lynx -source http://linsec.ca/vdanen.asc | gpg --import" {FEE30AD4 : 7F6C A60C 06C2 4811 FA1C A2BC 2EBC 5E32 FEE3 0AD4} Wasting time like it was free... --6v9BRtpmy+umdQlo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFD8XLTLrxeMv7jCtQRAp7zAKCPBj1gs7Hfq8B9TVCDb5BlzeDU/QCeN35Q XXEa+d0imAUAt3Z43Pf+Wsw= =m16b -----END PGP SIGNATURE----- --6v9BRtpmy+umdQlo--