[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#670144: fancy output sometimes broken



On 2012-04-23 14:24:07 +0200, Didier 'OdyX' Raboud wrote:
> retitle 670144 fancy output sometimes broken by misbehaving initscripts

I don't think that they are misbehaving. See below.

> Le 23.04.2012 13:56, Michael Biebl a écrit :
> > the new "fancy" output is nice. I've noticed a few services though,
> > where it is broken, e.g. the udev or fsck init script. The output looks
> > like this:
> > [....] Running foo
> > (doing something)
> > done.]
[...]

> In most cases I encountered, this is due to init scripts not using the
> functions from /lib/lsb/init-functions (as documented in
> /usr/share/doc/lsb-base/README.Debian) properly.

Even scripts using these functions are affected.

> For example, no screen output is supposed to happen between the
> log_daemon_msg and log_end_msg calls.

I think your wrong, at least nowadays. This can happen in practice
because some scripts are run in parallel. For instance:

Sun Jan  5 23:09:44 2014: [....] Starting domain name service...: bind9[....] Starting dictionary server: dictd^[[?25l^[[?1c^[7^[[1G[^[[32m ok ^[[39;49m^[8^[[?25h^[[?0c.

Before bind9 got ready, dictd was started, hence the problem.

> Same for log_action_begin_msg and log_action_end_msg.
> 
> Now, the conceptual thing that could help would be the ability to set
> and unset terminal left margins, to avoid having the new lines start at
> column 0.

This would not be sufficient. The log_daemon_msg function must
also make sure that its output is at the start of a new line.
This is possible (zsh does this by default for prompt output),
though this is a bit of a hack and this would somewhat break
the current bootlogd version.

However, for the log_end_msg call, I don't have a solution other
than duplicating the line to make sure that the message appears
in a correct context.

Well, a new kind of console that can manage start/end identifiers
would solve the problem (hoping a race condition cannot occur),
but that's on the kernel side, isn't it?

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: