From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 97A681381F3 for ; Sun, 26 May 2013 09:47:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7C3E0E0B2F; Sun, 26 May 2013 09:47:50 +0000 (UTC) Received: from georges.telenet-ops.be (georges.telenet-ops.be [195.130.137.68]) by pigeon.gentoo.org (Postfix) with ESMTP id 12CEDE0B28 for ; Sun, 26 May 2013 09:47:47 +0000 (UTC) Received: from TOMWIJ-GENTOO ([94.226.55.127]) by georges.telenet-ops.be with bizsmtp id gZnf1l00Y2khLEN06Zngka; Sun, 26 May 2013 11:47:40 +0200 Date: Sun, 26 May 2013 11:45:38 +0200 From: Tom Wijsman To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] eselect init Message-ID: <20130526114538.315f106a@TOMWIJ-GENTOO> In-Reply-To: <20130526112025.7bf00d3f@gentoo.org> References: <51A08A68.3020900@gentoo.org> <20130526084332.1a8afa69@gentoo.org> <20130526105823.4d191bc7@gmail.com> <20130526112025.7bf00d3f@gentoo.org> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.18; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/qoy5p1CriDngMUQSx7I1WJg"; protocol="application/pgp-signature" X-Archives-Salt: 32e4dc7d-28b7-4711-84b5-2f13c8a93934 X-Archives-Hash: 31e9b4d20416fff142e34e8e4adbc025 --Sig_/qoy5p1CriDngMUQSx7I1WJg Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, 26 May 2013 11:20:25 +0200 Micha=C5=82 G=C3=B3rny wrote: > It is *easy*. >=20 > ln -s /sbin/newinit /sbin/init.new > mv /sbin/init.new /sbin/init > > Easy and atomic. The inconsistency potential is similar to one given > by init upgrades. Yet we don't do anything magical to defer init > upgrade until reboot, and that's why the upgrades go smoothly. Easy isn't always good. It's not atomic since you can't reboot and because of that I wouldn't call it smooth either. > > I think that safest way not using wrapper is to stop all services > > and keep only mounted /, than change things (symlinks,configuration > > update) and reboot.=20 >=20 > This can be done two ways. >=20 > One is hacking into init (RC) reboot procedure. It's fragile, it needs > to be fit into the right moment and I'm not sure if all inits will > handle this without actually needing to patch the code. And in the > end, the init gets replaced before init stops working anyway. You're making things way more complex than a wrapper would do. I'm not a fan of using the words "hacking", "fragile" and "not sure" for selling an approach; so, why were you suggesting the symlink approach? > The other is going beside init and directly into the reboot. This > either requires kernel hacking (please don't!) Yes, please don't, it's against our general objectives. http://www.gentoo.org/proj/en/kernel/maintenance.xml#doc_chap3 Furthermore, even if you would consider this then you can't be guaranteed that everyone uses genpatches; and I don't think we would want this in the eclass either, its users will very likely object. > or hacking the reboot procedure in init code. And of course > remounting R/W, then writing, remounting back... I don't think patching them is a reliable approach; it steps away from being loosely coupled and therefore makes it harder to understand, you are changing multiple things at once and introduce a maintenance burden. With a wrapper, you don't have a problem with any of those... Loose coupling, high cohesion. --=20 With kind regards, Tom Wijsman (TomWij) Gentoo Developer E-mail address : TomWij@gentoo.org GPG Public Key : 6D34E57D GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D --Sig_/qoy5p1CriDngMUQSx7I1WJg Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQEcBAEBAgAGBQJRodnCAAoJEJWyH81tNOV9WIYIALdRdXRyC1Caimk52fQUihce 8jnNOwabB0n3uQkF2uXmHM80g36FaQP99PkIXih6w8ulDVjA23CSRjgS5ys8CUgn gMU+FPhOfQSLc1pgFdvAIM2rzdZX7Ji54F2tSOdcHzTYL+q7sEAK6qY+WeLoPQH0 sAzRXXsKqpp5le2YMSF86Mc6Cn5PlWvFEmUgzTGArPfBK44y56gA8rS/CvhIX4Dq 0KKiamgeNdJiD1ztahwkG/KQyoqyf/K9XoIM6vxl69JgF+rVYPbvNdEib9GgzYpy 6sQgBBa4qDLwPyXBONHNJH3bxKxwIBzee7xBndxkK3yhMlvICfgabX2qlY2RgCA= =BCl5 -----END PGP SIGNATURE----- --Sig_/qoy5p1CriDngMUQSx7I1WJg--