public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-dev] [openrc] [systemd] make `service` common for both OpenRC and SystemD (like Debian/Ubuntu/whatever did)
@ 2017-09-16 19:56 99% Vadim A. Misbakh-Soloviov
  0 siblings, 0 replies; 1+ results
From: Vadim A. Misbakh-Soloviov @ 2017-09-16 19:56 UTC (permalink / raw
  To: gentoo-dev

Hi there!

Every time I switch from mastering service on my work (Ubuntu-powered) to my 
own server farm (Gentoo powered) I'm going a bit frustrated: Ubuntu (with all 
my hate to many other things in it) has nice user-friendly way of managing 
services: you can freely call any of `service <servicename> action` irrelevant 
to which init-system is currently in use. Will it be systemd, or (whatever 
there is alternative there). `service` wrapper will detect it anyway and will 
do the proper things (forward it to either systemd or another service 
manager).

I'd like to suggest to remove `service` widget from openrc and make it the 
part of (which package? baselayout?)? Here is a pseudocode of how I see it:

```
servicename=${1}
action=${2}

if in_systemd; then
	systemctl "${action}" "${servicename}"
else
	rc-service "${servicename}" "${action}"
fi
```

Well, actually, there may be some more logic (for example, instance units 
(`unit@instance` in `systemd` vs `unit.instance` in openrc), "enable" action 
(forward it to `rc-update add` for `openrc`, probably) and maybe some more.
But anyway, the conception is something like that.


What do you think about that?


P.S. actually, it also would be nice to add "generators" thing to it too, to 
make it possible to manage services that have no systemd's units under SystemD 
and services that have only units under OpenRC (well, that one looks much 
harder than first variant, but, again, looks like deb/ubuntu guys did that 
work already and we can try to use their work as cheatsheet)


^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2017-09-16 19:56 99% [gentoo-dev] [openrc] [systemd] make `service` common for both OpenRC and SystemD (like Debian/Ubuntu/whatever did) Vadim A. Misbakh-Soloviov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox