On Tue, 12 Mar 2002, David Douthitt wrote:

> On 3/12/02 at 6:56 AM, Jeff Newmiller <[EMAIL PROTECTED]>
> wrote:
> 
> > On Mon, 11 Mar 2002, David Douthitt wrote:
> 
> > > Not really....  May I recommend:
> > 
> > If you _are_ going to make a script, all sorts of options
> > are available. As I said before, the problem is that it
> > will have to be made easy to install... packaged, I guess.
> 
> I would prefer to have it preinstalled into local.lrp (in
> /usr/local/bin) or perhaps in usr.lrp (in /usr/sbin perhaps).

If you are going to pre-install it as part of the distro, then you already
know what diagnostics you need, and the whole "which" thing is pointless.

> > > ( echo "Messages log\n"
> > 
> > echo doesn't process escapes unless told to.
> 
> At least one version I deal with daily doesn't need the -e option to
> handle this.  I suspect it was Linux, but I dunno.

It requires the option on my system.  If the portability of the
"which" solution is needed, then the least common denominator must be
adhered to.

> > I prefer to be able to specify output destination.  This
> > may be undesirable from the point of view of teaching the
> > uninitiated how to use it, but I think the trade is worth
> > it.
> 
> #!/bin/ksh

/bin/ksh is not typically available.

> OUTPUT=${1:-/tmp/debug_output.txt}
> 
> (
> # ....snip....
> ) > $OUTPUT
> 
> ...how about that?

an interesting idea, but then I cannot use "more".

> > Of course, you are stuck if your system doesn't have "which" :)
> 
> Not quite:
> 
> if type netstat > /dev/null 2>&1 ; then
>    ....
>    
> ...works.  Probably better, as type is an ash builtin and which is
> included (or not) in busybox.

That is clean.

> > I have not really reviewed the set of diagnostics for
> > completeness yet. For example, lsmod probably ought to be
> > included.  Perhaps "cat
> > /etc/issue" ought to be included as well.
> 
> /etc/issue includes ANSI escapes; are you SURE that would be a good
> idea?

Yeah, okay, but I am looking for some way to identify the flavor of the
distro.  If we could strip the ansi codes out somehow with sed...

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[EMAIL PROTECTED]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------


_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to