1 |
On Sun, 17 Sep 2017 12:05:07 +0200 Michał Górny wrote: |
2 |
> W dniu nie, 17.09.2017 o godzinie 12∶12 +0300, użytkownik Andrew |
3 |
> Savchenko napisał: |
4 |
> > On Sun, 17 Sep 2017 02:56:08 +0700 Vadim A. Misbakh-Soloviov wrote: |
5 |
> > > Hi there! |
6 |
> > > |
7 |
> > > Every time I switch from mastering service on my work (Ubuntu-powered) to my |
8 |
> > > own server farm (Gentoo powered) I'm going a bit frustrated: Ubuntu (with all |
9 |
> > > my hate to many other things in it) has nice user-friendly way of managing |
10 |
> > > services: you can freely call any of `service <servicename> action` irrelevant |
11 |
> > > to which init-system is currently in use. Will it be systemd, or (whatever |
12 |
> > > there is alternative there). `service` wrapper will detect it anyway and will |
13 |
> > > do the proper things (forward it to either systemd or another service |
14 |
> > > manager). |
15 |
> > > |
16 |
> > > I'd like to suggest to remove `service` widget from openrc and make it the |
17 |
> > > part of (which package? baselayout?)? Here is a pseudocode of how I see it: |
18 |
> > > |
19 |
> > > ``` |
20 |
> > > servicename=${1} |
21 |
> > > action=${2} |
22 |
> > > |
23 |
> > > if in_systemd; then |
24 |
> > > systemctl "${action}" "${servicename}" |
25 |
> > > else |
26 |
> > > rc-service "${servicename}" "${action}" |
27 |
> > > fi |
28 |
> > > ``` |
29 |
> > > |
30 |
> > > Well, actually, there may be some more logic (for example, instance units |
31 |
> > > (`unit@instance` in `systemd` vs `unit.instance` in openrc), "enable" action |
32 |
> > > (forward it to `rc-update add` for `openrc`, probably) and maybe some more. |
33 |
> > > But anyway, the conception is something like that. |
34 |
> > > |
35 |
> > > |
36 |
> > > What do you think about that? |
37 |
> > |
38 |
> > https://xkcd.com/927/ |
39 |
> > |
40 |
> > We will create even more confusion for Gentoo users with one more |
41 |
> > tool to do the same stuff. |
42 |
> > |
43 |
> > Of course you are free to implement some separate wrapper package, |
44 |
> > but it must be completely optional, since some users will have no |
45 |
> > use for it including myself. |
46 |
> > |
47 |
> > Really, unifying distributions is futile. We will have either the |
48 |
> > same and only distribution (to rule them all) or an attempt will |
49 |
> > fail. The same way you can try to unify emerge and apt tools via |
50 |
> > some wrapper manager. |
51 |
> |
52 |
> Fun fact: systemd was created to unify distributions in one init system. |
53 |
|
54 |
Exactly. This case is perfectly covered by https://xkcd.com/927/ :) |
55 |
|
56 |
Best regards, |
57 |
Andrew Savchenko |