Marc Haber <[EMAIL PROTECTED]> writes: > Steve Langasek <[EMAIL PROTECTED]> wrote:
>> Further, why should individual init scripts that are already going to >> all the effort of using the LSB interfaces be expected to handle >> VERBOSE individually? Why isn't this part of the log_* implementation? > The LSB init script stuff is a red herring anyway since the Interface is > badly designed and utterly incomplete. Init scripts are therefore forced > to abuse the provided functions if something "special" is needed. Is there any way that we can fix this? I *really* like the basic idea and would be quite happy to never again write an "echo -n" in an init script. Getting all of the output right to look reasonable even in a pure text interface is kind of a pain, and I can definitely see why different people may prefer different output formats for the boot messages. But the current provided functions have some significant issues. To take one of the most obvious, they don't deal with failure at all well. If you try to start something and it fails with an error message, you end up with the error message plastered after the starting message without any blank line (and therefore often going over 80 columns), then a newline and a space, and then the failed message. They also don't deal at all well with programs that produce console output when they start (fairly common when loading kernel modules, for instance). I need some way to tell the output system that I'm about to do something that's going to produce output and they should do something reasonable with the formatting rather than just tack it on to the end of whatever line happens to be on the screen. And maybe it's just me, but having a library of convenience functions that, if used according to directions, end up having you write code like this seems rather silly: [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" do_start_kdc case "$?" in 0|1) if [ "x$RUN_KRB524D" = "xtrue" ] ; then [ "$VERBOSE" != no ] && log_progress_msg "krb524d" do_start_krb524d case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac else [ "$VERBOSE" != no ] && log_end_msg 0 fi ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; Surely the library should be dealing with some of this sort of thing. I don't have any time at all to work on this personally, but I'm happy to send this somewhere as a bug report or something if it would be helpful and I'll gladly cheer on someone else who wants to tackle this! I've been pushing back on having lintian warn when the LSB functions aren't used precisely because things like this mean that I'm not at all convinced they're an improvement. I think that if these issues were addressed, they *would* be an improvement, and there are some significant benefits to be gained from running everything through a central set of functions for exactly the same reasons that we do the same thing with package installation prompting and debconf. -- Russ Allbery ([EMAIL PROTECTED]) <http://www.eyrie.org/~eagle/> -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]