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 B91BA1396D0 for ; Sun, 17 Sep 2017 15:46:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0016B1FC17E; Sun, 17 Sep 2017 15:44:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 9E96E1FC17A for ; Sun, 17 Sep 2017 15:44:18 +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 C9B4033BF1C for ; Sun, 17 Sep 2017 15:44:15 +0000 (UTC) Date: Sun, 17 Sep 2017 18:44:11 +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: <20170917184411.49bb1d5af5326468a3b66b0b@gentoo.org> In-Reply-To: <1505642707.1554.1.camel@gentoo.org> References: <3005176.dSsCWkhPpk@note> <20170917121248.379cef2936401535b14237f6@gentoo.org> <1505642707.1554.1.camel@gentoo.org> 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_18_44_12_+0300_PSIHB01U8KSJc1zy" X-Archives-Salt: 6f9a40cf-84cc-4b8e-9547-b7ee625a0883 X-Archives-Hash: 07ceed6d4ef30755fffd91ca3dd96b3c --Signature=_Sun__17_Sep_2017_18_44_12_+0300_PSIHB01U8KSJc1zy Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 17 Sep 2017 12:05:07 +0200 Micha=C5=82 G=C3=B3rny wrote: > W dniu nie, 17.09.2017 o godzinie 12=E2=88=B612=E2=80=89+0300, u=C5=BCytk= ownik Andrew > Savchenko napisa=C5=82: > > 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 man= aging=20 > > > services: you can freely call any of `service action` i= rrelevant=20 > > > to which init-system is currently in use. Will it be systemd, or (wha= tever=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 i= t the=20 > > > part of (which package? baselayout?)? Here is a pseudocode of how I s= ee it: > > >=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 u= nits=20 > > > (`unit@instance` in `systemd` vs `unit.instance` in openrc), "enable"= action=20 > > > (forward it to `rc-update add` for `openrc`, probably) and maybe some= more. > > > But anyway, the conception is something like that. > > >=20 > > >=20 > > > What do you think about that? > >=20 > > https://xkcd.com/927/ > >=20 > > We will create even more confusion for Gentoo users with one more > > tool to do the same stuff. > >=20 > > 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. > >=20 > > 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. >=20 > Fun fact: systemd was created to unify distributions in one init system. =20 Exactly. This case is perfectly covered by https://xkcd.com/927/ :) Best regards, Andrew Savchenko --Signature=_Sun__17_Sep_2017_18_44_12_+0300_PSIHB01U8KSJc1zy Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE63ZIHsdeM+1XgNer9lNaM7oe5I0FAlm+mEwACgkQ9lNaM7oe 5I0rSA//TiNFIv0qDulQX3EfNon9ap2Fl39RNLoDbY/kE+2pPrjYNdibjtv/BwjR +LaCmWBwNGV0Wn/1D0xs0tI57/VOyyZGpfxX5nLz46LXv0hvjGlzV4QjUlfkO1cz wYK83WM0wjxU0ZRFgCfxYMpmriP1hiMCiJnoQ81q3h04x6Pen6o9Id5J2RWr4Y9E idmsWPX+FQK3y0qdJsisVFAC6rNb8J7/eitU4y/gEp2fdXO9o4XQAHU7MnqN7mHJ hSdePuDH69YpdFFCDQvXl8HzNjcLJei1fyj1X3vdtgNdcv4qbQ1cTb5AQGlHrkT8 t2KvOGuuR6afRAngRY+xfxKImliORnpRqxYf9pu9POdKByp5KmaVw/9H7Tu67B1Q EiKygy5pFVZeHRMBC6CPWAVzsV/X5Qw4UGIjUrusiykPsKXX50rLEIcsmXjZ71Ji 8AdS3Rs7SATjFGb3o3tF13mWe+xPsRtEfbQZc1jWzmk8vx1DHuYVmNarrvy1wIju kdRw27Axm18wAfNBBe3Zmu1STshj1s+/FcPsHtD6XTs3LmKp4qg3LkqbaZMaC451 FcbP3+AL3JvHMC1kB6HWqr/UME4IwBgz5iJGh+9T13fptc0oIybCeLT1YnnmWAfe Pe8wkoKqbayl045epnLk52bsj1vwcRH3krnGezVCRdinN1IYQ84= =1Exy -----END PGP SIGNATURE----- --Signature=_Sun__17_Sep_2017_18_44_12_+0300_PSIHB01U8KSJc1zy--