Hi Michal, Michal Lesiak wrote on Sat, Apr 26, 2014 at 11:47:00PM +0200:
> I'm converting a .rc script made by someone a coupe of years ago for > the same product I'm currently working on. It's important for this > tale as this may mean that this actually worked for some previous > versions. > I'm working on 5.2 version. That's unsupported for nearly a year now. Consider upgrading to 5.5 after May 1. > 1. I have a custom "rc_register()" sub defined in my .rc script, but > I cannot make rc subsystem recognize that - trying to run that ends > with calling rc_usage(). I've checked up (briefly) rc.subr and I > cannot see there any possibility to have custom rc_${SUB} functions > implemented. > So, is it possible or maybe it was possible some time ago? Saying /etc/rc.d/foo register to have rc_cmd() call rc_register() is not possible, and as far as i can see it never was. The rc_cmd() switch called rc_err() for *) from rev. 1.1, and rc_usage since rev. 1.47. Maybe someone at your place hacked up /etc/rc.d/rc.subr, adding custom code to that file? > 2. I'm having a very simple problem of getting any STDOUT output > from the daemon I'm running. Just as well I'm not getting anything > with simple "echo foo" put into rc_start(), but the more serious > issue is when the daemon fails to start, prints out a message to > STDOUT (it's a Perl script) but rc subsystem only says that it has > failed with all the output from the daemon lost somewhere. > Is it my fault or is it a design or, as in the previous case, it > worked and is not working anymore? See Antoine's answer. Yours, Ingo