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 B62041381F3 for ; Tue, 28 May 2013 04:19:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F0898E09AA; Tue, 28 May 2013 04:19:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 18C4AE0973 for ; Tue, 28 May 2013 04:19:03 +0000 (UTC) Received: from localhost (178-37-163-206.adsl.inetia.pl [178.37.163.206]) (using SSLv3 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id F137633E126; Tue, 28 May 2013 04:19:00 +0000 (UTC) Date: Tue, 28 May 2013 06:19:33 +0200 From: =?ISO-8859-2?B?TWljaGGzIEfzcm55?= To: gentoo-dev@lists.gentoo.org Cc: lu_zero@gentoo.org Subject: Re: [gentoo-dev] eselect init Message-ID: <20130528061933.325d7d0f@gentoo.org> In-Reply-To: <51A42ABB.7090408@gentoo.org> References: <51A08A68.3020900@gentoo.org> <20130526084332.1a8afa69@gentoo.org> <51A1DC0C.2070706@gentoo.org> <20130526125742.4584d094@gentoo.org> <51A1F493.90101@gentoo.org> <51A22310.70202@gentoo.org> <51A42ABB.7090408@gentoo.org> Organization: Gentoo 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-SHA512; boundary="Sig_/ECeVR/XJKZfUoQ8C9cWDqdz"; protocol="application/pgp-signature" X-Archives-Salt: 7972f64d-0838-4c47-b592-ecc53edc4b31 X-Archives-Hash: 64e966115eecaa99af81401d8898eec7 --Sig_/ECeVR/XJKZfUoQ8C9cWDqdz Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable On Tue, 28 May 2013 05:55:39 +0200 Luca Barbato wrote: > On 5/26/13 4:58 PM, Ian Stakenvicius wrote: > > The way it's being proposed (and please correct me if i'm wrong), the > > wrapper is a direct replacement binary (small C program) for all init > > systems, and would based on some configuration file or whatnot > > determine and exec the init system it's supposed to -- and make any > > other necessary changes too, such as switching /etc/inittab) >=20 > The really minimal wrapper would be something like >=20 > #!/bin/sh >=20 > INIT=3D/bin/init >=20 > if [[ -e /etc/switch-init ]]; then > . /etc/switch-init > fi >=20 > exec ${INIT} >=20 > With switch-init doing stuff needed, including remounting the rootfs rw=20 > if there are stuff to be changed and if we want stick to symlinks it=20 > could replace itself by a symlink. >=20 > Yes, it would be that simple. And you actually make the boot depend on: 1) valid /bin/sh, 2) valid /etc/switch-init which would not interfere with boot process. With switch-init being executed as a shell script, it can do anything. And I wouldn't be surprised if you made it do various things you'd like to be done. Not to mention what would happen if it gets corrupted into binary mess and shell tries to execute that. There's no fallback that could handle shell failures, you know. --=20 Best regards, Micha=B3 G=F3rny --Sig_/ECeVR/XJKZfUoQ8C9cWDqdz Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQJ8BAEBCgBmBQJRpDBYXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RUJGMjBGOTk2RkIzQzIyQ0M2RkNBNDBC QUJGMUQ1RkY4QzgxMTBBAAoJELq/HV/4yBEKTg0P/20eb0hqN8IpJFHmU4YwFNbU 6PgRUXpttuu6C3udYnHDTsjJbnp8/K+aTulpDbppwZL75UfFaSLkXkG4L1ydrRam BytoDtYsaC9+L070/v1u10qizEx8hqLbtygUr+vUTOJarXO9uFeLDDejC3jVZh77 wOSxITmZPLLgFES0P+4xnLmdKRgbKOQGatRnQaNVb4MGoWSJdRkgVhznFnnRDpPe okgmnOJWjy+yFPrxmdUYRptTwGWDQAQTmnUQIdnX7B20iujVz+CGj6DLwlAeB4Pd 8XeR6HEQ10RsGkSEkGH6GwPrFn8z/ZgpvaQ5t0n0uCg/H64D1+qpN1XJsIyEPFrU XLP5rjuixo0x0hPkLYIKFF9zMzCv295P7amUkYQRlFkYUzAErBloZcBSUz0l4/sw 1fAOTvz3DnDOLouYEq6bh1mBjFZwSnKdh/h0HrfRJoAr68U+hF22dFkeblKWuEv8 c4frc/fwJf/8SeV8ardHb+N2GJcawYFgks0js7VpK22mKZvJvd+jcG3bn9AvnwDF 8EoQZy3h7xGA2BclFn86Dna2O/EbX7m4tzUgTYg5N+WtbkQ28X1K2LhI60bDEIwL bTImHHE5MhKv0AZwLtE2wZOgHe6oQi2tVQoKd/FhpM5dtZ0mOag1YpNSeITDo99N bZ/MYu1gbPMdf6VmRNop =rl9H -----END PGP SIGNATURE----- --Sig_/ECeVR/XJKZfUoQ8C9cWDqdz--