[artix-general] [s6] clamd + freshclam configs and internet connectivity

Dudemanguy dudemanguy at artixlinux.org
Wed Sep 22 05:45:07 CEST 2021


On 9/21/21 18:58, Javier wrote:
> Ohh, that's pretty good news, though there are several official 
> services/oneshots that would benefit from it, so not sure if only the 
> users should take advantage of it.  Freshclam is just an example, but 
> there are others, like ntpd, smbd and nmbd.  Not sure, but I suspect 
> dnsmasq would also benefit from it, and there might be others, like 
> services provided over internet, like email and such...  So perhaps on 
> your final commit, you make those official services/oneshots requiring 
> internet connection depend on the "network" one.  BTW, some time back, 
> for personal purposes I tried making some oneshot of mine depending on 
> "network", but it was failing, given the interfaces were not up when 
> trying to bring the oneshot up.  But I'd guess it was too early to test 
> the dependency, hehe...  As of now, "network" only checks for the 
> ethernet interfaces to be up, but that doesn't mean there's internet 
> connection available yet, not sure if that's part of your changes, 
> hehe...  I just stop depending on it, since it didn't mean what I really 
> needed any ways, hehe

Well the workflow will be a little bit different. The idea is that
services that require a network will be added to a network bundle. Some
magic happens in the background so that this bundle gets launched when
the network is detected. The primary reason for this is because the
initial s6-rc call on system bootup is blocking. So if we have a service
that runs in the foreground that tries to get a network, it will block
you from logging in until it is done (no good). As much as I wish there
was some dynamic oneshot that could magically be in the background that
can find when the network is up and go down by itself when the network
goes away, that doesn't exist and s6-rc isn't capable of it. Here's to
hoping that the in-progress s6-rc rewrite provides some mechanism to
do that. The best we can currently do is initial network detection.

> Not sure if all daemons configs provide such "system" logging configs.  
> I'm sure mpd does.  I don't know if by commenting out logs destinations 
> make daemons log into sddout/stderr, actually I'm not sure if choosing 
> "system" logs for mpd, makes mpd log into stdout/stderr, but I'll 
> install syslog-ng and syslog-ng-s6.  When I installed artix with s6, I 
> though it was not necessary given s6 came with its own logger, hehe.

In a perfect world, every daemon would have an option to write to stderr
or stdout and we wouldn't have to worry about this. Unfortunately, there
are some things that only write stuff to syslog. The s6 tooling to do
this is very nice though. It doesn't litter your /var/log which a bunch
of crap like syslog-ng and such does. It just reads /dev/log. Hook up
s6-log up to that and it now you have log rotation and all that good
stuff. This wasn't my original idea btw, I discovered it in skarnet's
examples in one of the git repos.


More information about the artix-general mailing list