On 23/10/2015 00:57, Guillermo wrote:
So, I don't know if the handler scripts for diverted signals that the new version of s6-linux-init-maker generates are intended to be compatible with BusyBox. But if that's the intention, then the ones for SIGUSR1 and SIGUSR2 are inverted: I think that the signal sent by 'busybox halt' to process 1 is SIGUSR1, so its handler should be the one calling s6-svscanctl -0 $tmpfsdir/service, and the signal sent by 'busybox poweroff' is SIGUSR2, so its handler should be the one calling s6-svscanctl -7 $tmpfsdir/service.
Ah, this is unfortunate. I don't think there's an universal convention for those signals; I looked at suckless init, which uses USR1 for poweroff (and doesn't have a signal for halt). I'm more interested in supporting busybox init than sinit, though (because sinit is incorrect: it lacks supervision of at least one process) - so I'll reverse the signals in s6-linux-init-maker. Thanks for the report.
And speaking of s6-linux-init-maker, the -e VAR=VALUE option generates a $basedir/env/VAR file that doesn't have a trailing newline after VALUE, although I don't know if s6-envdir cares.
s6-envdir does not care. -- Laurent