Rich Freeman posted on Sat, 04 May 2013 08:54:16 -0400 as excerpted:

> On Sat, May 4, 2013 at 6:42 AM, Luca Barbato <lu_z...@gentoo.org> wrote:
>> Hopefully we might have a gsoc student volunteering to make a
>> runscript/lsb-script/systemd-unit compiler and a small abstraction so
>> we write a single init.d script and generate what's needed.
>> Probably we might even support pure-runit that way with minimal effort.
>>
> I'm skeptical that this will ever make sense - both init systems have
> features that it would make sense for units/scripts to make use of in a
> more tailored fashion.

Same here.  Sure, an automated conversion is possible and arguably might 
serve as a starting point, but you're losing the best of both initsystems 
in the process.

> That said, if you really wanted to inter-convert, my gut feeling is that
> it would be easier to go from a systemd unit to an init.d script, and
> not the other way around.  A systemd unit is more like a specification -
> it describes the end result of what systemd should do.
> An init.d script is an executable program

You're a bit behind on openrc features, I think. =:^)  It's actually 
quite possible for openrc/runscript "scripts" to be written in a "spec-
style" format similar to systemd's unit files, just as it's possible for 
systemd to run "legacy" shell-style scripts with little or no 
modification, as some distros did with their initial conversion, 
according to what I've read.

I think there's even some in-tree examples, tho I'm too lazy to go 
looking ATM and their package maintainers and/or williamh would be more 
familiar with them and could probably point them out off the top of their 
head without looking.

> The reality is that systemd units are floating around all over the place
> - when I installed it on a Gentoo box I ended up just Googling for
> already-written units for daemons that lacked them in Gentoo and tweaked
> them.

That's what I have always figured I'd do, if I were to decide to convert 
here before all the packages I init here had in-tree unit-files.

> Systemd units are much easier to write (typically) than init.d scripts
> so this could be an area where end-users could contribute.

See above.  In theory it should be about even either way, since both 
systemd and openrc can do either scripted or spec-style "units".  
However, I expect systemd's "google resource" to be deeper in this 
regard, both with regard to the units themselves and to documentation 
about them, and the experience quotient probably favors systemd as well, 
so in practice you're almost certainly right, if only from the previous 
experience and googlable documentation and samples perspective.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


Reply via email to