:: Re: [DNG] runit, ifupdown and simpl…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: aitor
Fecha:  
A: dng
Temas antiguos: Re: [DNG] vdev in chimaera
Asunto: Re: [DNG] runit, ifupdown and simple-netaid (was: vdev in chimaera)
Hi,

On 15/2/22 8:40, aitor wrote:
> On 11/2/22 12:11, Didier Kryn wrote:
>> My normal interfaces file contains an "auto" stanza for wlan0,
>> which is superfluous, according to messages from ifplugd, and*only*
>> "iface eth0 inet dhcp" for eth0 because it comes first in the file and
>> "auto" and/or "allow-hotplug" can just cause the abovementionned delay
>> when no Ethernet cable is connected.
> Please, give a try to the following image:
> https://www.gnuinos.org/mirror/chimaera/live/ <https://www.gnuinos.org/mirror/chimaera/live/>
> There are several services being handled by runit in these images, and ifupdown's networking is one of them.
> Better said, it's not a service -as you pointed out- but a script that starts another service, that is dhcp.
> You can test the image in live mode, and you'll find that the delay caused by the configuration in
> /etc/network/interfaces disappears. Also, even if you boot without wired connection, the connection will be
> stablished without the need of restarting the service when you plug/unplug the ethernet cable again and again.
> Note, on the other hand, that the time interval in the periodic reminder of the automatically_connect option of
> simple-netaid (setup in /etc/simple-netaid/snetaid.conf) is equal to zero so as not to interfere with the
> stanzas defined in /etc/network/interfaces. Hence, the wired connection is stablished thanks to these definitions.
> And yes..., *both* stanzas are required for that. With this in mind, I decided to leave the automatically connect
> option of simple-netaid only for wired devices.


All those that tested the live images, just report to you that simple-netaid was not being responsive due to a missing
runit script in my packaging of procps (sysctl).

This script was missing as a result of a typo in the line:

dh $@ --with runit

in debian/rules. Concretely, there was a superfluous space in blank after the hyphens: that is, "-- with runit".

Before procceding further, I shall clarify that procps -someone may correct me at this point- isn't a service in the
broadest sense of the word. At least, it's not a service that requires supervision, not a long running daemon. Rather,
it's more like a script that causes all the content in its config file to be piped to the sysctl command. So, just like
the networking script provided by ifupdown, it must be run once because the act of starting the service is pretty much
the same as what you're manually doing when running such script.

With this in mind, I added the following lines to /etc/runit/1 in order to boot up the services and not supervise them:

touch /etc/sv/procps/down

touch /etc/sv/networking/down

All we need to do now is manually invoke each service via:


sv once <service>


from another runit script that may depend on it to work properly.

This said, it's easy to understand the way in which the missing runit script of procps was affecting to the networking
script, and therefore to the daemon of simple-netaid. Because a line that misbehave at the beginning of a runit script
blocks the whole service.

Someone else out there also has noticed this hung in simple-netaid, and today I fixed it and uploaded new iso images:

https://www.gnuinos.org/mirror/chimaera/ <https://www.gnuinos.org/mirror/chimaera/>

Thanks for your help,

Aitor.