From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AC96D1396D0 for ; Sun, 17 Sep 2017 09:13:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E3A611FC05D; Sun, 17 Sep 2017 09:13:07 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 83C82E0BE6 for ; Sun, 17 Sep 2017 09:13:07 +0000 (UTC) Received: from localhost (unknown [185.31.166.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bircoph) by smtp.gentoo.org (Postfix) with ESMTPSA id 650CF33BF1C for ; Sun, 17 Sep 2017 09:13:05 +0000 (UTC) Date: Sun, 17 Sep 2017 12:12:48 +0300 From: Andrew Savchenko To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [openrc] [systemd] make `service` common for both OpenRC and SystemD (like Debian/Ubuntu/whatever did) Message-Id: <20170917121248.379cef2936401535b14237f6@gentoo.org> In-Reply-To: <3005176.dSsCWkhPpk@note> References: <3005176.dSsCWkhPpk@note> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.30; i686-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; protocol="application/pgp-signature"; micalg="PGP-SHA512"; boundary="Signature=_Sun__17_Sep_2017_12_12_49_+0300_3j_0MhgsSRRY.zNn" X-Archives-Salt: ca1842e8-7215-4bec-afc2-d3f154007491 X-Archives-Hash: d415ee3bb52465c5bf955151d2e064a0 --Signature=_Sun__17_Sep_2017_12_12_49_+0300_3j_0MhgsSRRY.zNn Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 17 Sep 2017 02:56:08 +0700 Vadim A. Misbakh-Soloviov wrote: > Hi there! >=20 > Every time I switch from mastering service on my work (Ubuntu-powered) to= my=20 > own server farm (Gentoo powered) I'm going a bit frustrated: Ubuntu (with= all=20 > my hate to many other things in it) has nice user-friendly way of managin= g=20 > services: you can freely call any of `service action` irrel= evant=20 > to which init-system is currently in use. Will it be systemd, or (whateve= r=20 > there is alternative there). `service` wrapper will detect it anyway and = will=20 > do the proper things (forward it to either systemd or another service=20 > manager). >=20 > I'd like to suggest to remove `service` widget from openrc and make it th= e=20 > part of (which package? baselayout?)? Here is a pseudocode of how I see i= t: >=20 > ``` > servicename=3D${1} > action=3D${2} >=20 > if in_systemd; then > systemctl "${action}" "${servicename}" > else > rc-service "${servicename}" "${action}" > fi > ``` >=20 > Well, actually, there may be some more logic (for example, instance units= =20 > (`unit@instance` in `systemd` vs `unit.instance` in openrc), "enable" act= ion=20 > (forward it to `rc-update add` for `openrc`, probably) and maybe some mor= e. > But anyway, the conception is something like that. >=20 >=20 > What do you think about that? https://xkcd.com/927/ We will create even more confusion for Gentoo users with one more tool to do the same stuff. Of course you are free to implement some separate wrapper package, but it must be completely optional, since some users will have no use for it including myself. Really, unifying distributions is futile. We will have either the same and only distribution (to rule them all) or an attempt will fail. The same way you can try to unify emerge and apt tools via some wrapper manager. If one uses different distros, one needs to learn to switch between them. Best regards, Andrew Savchenko --Signature=_Sun__17_Sep_2017_12_12_49_+0300_3j_0MhgsSRRY.zNn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE63ZIHsdeM+1XgNer9lNaM7oe5I0FAlm+PJEACgkQ9lNaM7oe 5I3hOQ/8DWVkk7yDXJuxNIwaIZlJkaUpt6oCVtbK5stmEWML9DpC+bm3MUoVs4AT KwKwf13BkIWsiuJyDVv2OwS8awj7ZEG1vjt/6TrSzF0RBr4/bzwAH9wMVMqLOsvP BlhhNeVH93BdT1FtXEm+7g4m20nLWEgCVfCI35XfGW8XBQrzo/bsV2NsNWQLHtlS 0p1zI3kIMcwnVka/Vbk+fFtfx8jFrHuy2RHqwepOU75OGgDmNlI669ZFEQ8oEtft J18gkOXQK0BW8iLQ514zdmdUhWMSooese17lr20iNVlskns8yh2cY6J9WLfAmmtu zDA2b7G6nlY3jtbZPQSlsiQTCmCiP9xcjou5Vier3ovyy3gXQlOlG5YFWm400+C8 q4y7HGagzWwDZodQJE0s3OnipOvq8sg3GV3KAHKyw1LENsfwHV8JfnqSJHuQAKAl VT0G10XS69/qIpoE+wgKXcZRZ74Uh2kR+s4wdjuBMTMF91IIsrrWg8QZnatd1Ug0 YIW5oOHnjvPaEGJ2QMC3ZBCVFYnrbPpuG8eBIHmQBhQeUyttUPLIr9vdDHO6+0IP uEge7Kz8hK4kRa88SUTgfB4IseOLegvL7MQn5bCHTsIE6+1Ho6tVYyGCKqY1O4oz B9NsEhAlXAQPujP9tt/CgoCuFO3AxHGpQLIgZ2bAOKAIYBy0AaE= =4ba6 -----END PGP SIGNATURE----- --Signature=_Sun__17_Sep_2017_12_12_49_+0300_3j_0MhgsSRRY.zNn--