So, I noticed the package includes example OpenRC service scripts
(wow!) for utmps-utmpd and utmps-wtmpd. Probably not the kind of
testing you hoped for, but for the sake of correctness: they won't
work :-P

 On the contrary, that's exactly the kind of testing I appreciate. :)
I've managed to do some decent testing of the code itself, and seems to be working as intended. But, as you've noticed, the
OpenRC scripts don't get as much coverage. :P

 Note that even on distributions using OpenRC, I tend to start utmps
under a s6 supervision tree: since utmps depends on s6 anyway (for
s6-ipcserver) unless the distro provides an alternative Unix domain
super-server, there's no drawback in taking full advantage of s6's
supervision capabilities.

 The arguments supplied to the program named in the assignment
to 'command' must go in an assignment to variable 'command_args', and
in these particular examples, the end of options marker ("--") before
s6-ipcserver's arguments interacts badly with OpenRC's mechanism for
invoking start-stop-daemon: arguments stored in variable
'start_stop_daemon_args', including -b, end up getting passed to
s6-ipcserver instead, and the script hangs waiting for this program to

 Blah. start-stop-daemon must die anyway. What's that people said
to me? "The problem with s6 is the unintuitive interface"? Yeah
buddy, at least it understands what a Unix command line is. >.>

Also, as an improvement, the script doesn't need to assume directory
/run/utmps exists: it can check that using OpenRC's 'checkpath'
command, and create it with the correct owner and mode if it does not
exist, just like service utmps-prepare does in the s6-rc examples (is
its definition directory wrongly named 'sutmp-prepare'?).

 Thanks, that's a useful idiom.
 And yes, the package was originally named "sutmp" and I was rightly
told it was a confusing name. So I renamed everything, but forgot that
definition directory. Fixed now.

Patch at the end of the message with those changes, plus some
additional ones for better readability.

 Applied, modulo gmail wrapping long lines and messing up your patch.


Reply via email to