Just stumbled upon an issue: Latest openrc issues warnings if the parameter -c/--chuid is used. However, often noone will see those warnings, because --quiet suppresses them. Just talked on irc with idl0r and we agreed that it's a bug in start-stop-daemon and it shouldn't suppress warnings on --quiet.
Before I agree that this is a bug in s-s-d, I want to know how baselayout-1 worked. If this is different behavior than bl1, I can agree that this is a bug. However, if the behavior is the same as bl1, then I would say that the init scripts need to be fixed to not use --quiet.
Mike, do you know if this was an intended change from baselayout-1?
Created attachment 284113 [details] fix-ewarn.patch If we want to go ahead with this change, this patch will take care of it. This is not a bug in s-s-d, but possibly in libeinfo. What does everyone else think? Should we add this? William
i dont think it was intentional. but i also dont think your patch is exactly how baselayout-1 did things. in quiet mode, it would just dump the string ... it wouldnt include the colorized output and such.
Mike, in that case, why would we want the output to be different in quiet mode vs normal mode? A warning is a warning, so shouldn't we colorize it regardless of whether we are in quiet mode?
Mike, We actually have a setting, rc_nocolor, to control whether colorization is used, so if we apply my patch, the user gets a say over whether the colorization is used, which I think is probably a better choice than forcing it one way or another just because --quiet is used. What do you think?
I have added this patch as commit 4ee62c7. It will be part of the next release of openrc.
(In reply to comment #6) i dont think you got my comment. look at the baselayout-1 code: ewarn() { if [[ ${RC_QUIET_STDOUT} == "yes" ]] ; then echo " $*" else [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo echo -e " ${WARN}*${NORMAL} ${RC_INDENTATION}$*" fi it has nothing to do with color. the colorization logic is handled by setting WARN/NORMAL/etc... to "", but the quiet logic is RC_QUIET_STDOUT.
I did see that. There is no RC_QUIET_STDOUT variable in openrc, but this is controled by the is_quiet() function in libeinfo. Look at the einfo function in there to see what I'm talking about. I just took out the check for is_quiet() in ewarn because I can't think of a situation where you would want warnings to be suppressed.
Hi, so now there is no way to stop a daemon without printing a warning, if the daemon may have already (correctly) terminated by itself?
(In reply to comment #10) > Hi, so now there is no way to stop a daemon without printing a warning, if > the daemon may have already (correctly) terminated by itself? The request on this bug was to not suppress warnings, so that is how the code now works. All the -q command line option did was set the EINFO_QUIET environment variable. Bug #439174 has been opened wrt this same issue, so please do not add more to this bug.