Initscripts and tput
Scott James Remnant
scott at netsplit.com
Wed Sep 1 07:12:08 CDT 2004
On Tue, 2004-08-31 at 23:07 -0700, Matt Zimmerman wrote:
> On Wed, Sep 01, 2004 at 01:49:51AM -0400, Nathaniel McCallum wrote:
>
> > Nathaniel McCallum wrote:
> >
> > >After a long session hacking initscripts today, I realized that we are
> > >relying on tput to get ansi control characters. This is not bad except
> > >that tput is in /usr/bin/ and /usr may not be available to use before
> > >mounting filesystems. There is a couple solutions as i see it:
> > >
> > >1. move tput from /usr/bin to /bin in the terminfo-bin package
> > >2. fall back to hardcoded ansi control characters (may not work on some
> > >strange terminals)
> > >3. other solution...
> > >
> > >What do you think?
> >
> I think my preference is to move tput,
>
For consistency we should move all of ncurses-bin into /bin ... I
generally dislike moving single binaries just so they're available for
you earlier in the boot process. I also slightly dislike moving this
many binaries, they don't really belong there.
> though I would also be interested in
> alternatives which allowed for a simplified output format (not involving
> terminal control sequences) for the very early stages of the boot process
> (pre-mountall.sh).
>
I think I prefer this alternative though:
[ -x /usr/bin/tput ] && tput ...
Colour becomes "active" once /usr has been mounted, which is relatively
early in the boot sequence anyway -- most of the preceding scripts won't
need OK/FAIL type messages. And for 95% of installs, this will work
from script#1 because /usr won't be separately mounted.
Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ubuntu.com/archives/sounder/attachments/20040901/53070c95/attachment.pgp
More information about the sounder
mailing list