:: Re: [DNG] Devuan cannot exist witho…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Steve Litt
日付:  
To: dng
題目: Re: [DNG] Devuan cannot exist without the help of Debian
On Fri, 22 Nov 2019 18:31:25 +0100
viverna <viverna@???> wrote:


> No, we will not allow it!
> I propose this: a script called INJ - Init Freedom inJector
>
> I wrote this summer in this list about a possibility of inject init
> run scripts (for example runit) in all Devuan packages automatically.


This is a great idea. I've been in favor of something similar since
2015. It frees "upstreams" from the responsibility of maintaining init
script/configurations for init systems they don't care about or perhaps
despise. Daemon start files are written by experts on the init system.

> I'm writing a simple script that inject init diversity in a single
> package.



> Workflow I imagined it like this:
> - Init script experts write run scripts for all daemon based on rules 
>   specified below (also sysvinit)
> - Script read a package one by one:
>     - Open package in tmp dir
>     - For all init system included in Devuan:
>         - If exists run script for package
>             - Insert run script
>             - Edit if requested postinst and prerm script
>     - Create package from tmp dir
> - New package created (automatically)

>
> Run script resides in /var/local/INITSYSTEM/ and are copied in the
> package.


Nice!

>
> Script I wrote support epoch and runit. Other init can be supported
> if implemented.


Thank you so much for remembering Epoch! It's excellent and fast.
Although Epoch was last maintained in 2016, it was the fastest and
easiest init to configure, and my experience was that it was in the
same ballpark, boot time wise, as systemd and runit.

Thank you for doing runit! Runit is probably the simplest init system
around, which is important for some people. Also, runit is similar
enough to s6 that runit scripts could probably be converted to s6
scripts by a simple AWK program.

One more thing: Systemd sucks, but their unit files are pretty good
specifications for any daemon start file:

* Run as what user?
* Run as what group?
* Expect the daemon to background itself?
* What services must be online for this daemon to function?
* What is the exact syntax for the daemon to run properly?
* What must happen before the daemon is run?
* What must happen after the daemon finishes?

I think we could get 90% of the way to a set of legitimate daemon start
scripts by running each unit file through a program to produce a daemon
start file for a different init system.


> For example /var/local/runit/openssh-server/sshd/run
> #!/bin/sh
> exec 2>&1
> sv start rsyslogd || exit 1
> mkdir -p /run/sshd
> exec /usr/sbin/sshd -D


Nice! I've been testing for functioning dependencies, and just quitting
if not functioning, on the theory that eventually the dependency would
be started. Your method is much more proactive.

SteveT

Steve Litt
November 2019 featured book: Manager's Guide to Technical
Troubleshooting Second edition
http://www.troubleshooters.com/mgr