Re: Logging bootscript output

2007-02-23 Thread Vladimir A. Pavlov
On Friday 23 February 2007 00:14, Bruce Dubbs wrote: > Vladimir A. Pavlov wrote: > > 2. May be it would be better if /etc/rc.d/rc (I mean the main rc > >script. I don't remember how it's called in LFS) will run each > >bootscript using > > > > script_name 2>&1 |tee -a /var/log/bootlog > >

Re: Logging bootscript output

2007-02-22 Thread Dan Nicholson
On 2/22/07, Bruce Dubbs <[EMAIL PROTECTED]> wrote: > Vladimir A. Pavlov wrote: > > Just a few notes. > > Thanks for the input. > > > > 2. May be it would be better if /etc/rc.d/rc (I mean the main rc > >script. I don't remember how it's called in LFS) will run each > >bootscript using > > >

Re: Logging bootscript output

2007-02-22 Thread Bruce Dubbs
Vladimir A. Pavlov wrote: > Just a few notes. Thanks for the input. > 2. May be it would be better if /etc/rc.d/rc (I mean the main rc >script. I don't remember how it's called in LFS) will run each >bootscript using > > script_name 2>&1 |tee -a /var/log/bootlog > >rather then simp

Re: Logging bootscript output

2007-02-22 Thread Vladimir A. Pavlov
Just a few notes. 1. What exactly do you wish to log? Only the messages like "The script started" and "The script stopped" or everything a script usually prints on the screen? Your implementation seems to only log the former messages. For this purpose a special function is usually use

Re: Logging bootscript output

2007-02-21 Thread Bruce Dubbs
Bruce Dubbs wrote: > #!/bin/bash > > i=0 > > while read line; do > if [ $line == 'fini' ]; then break; fi > > time=$(date +%T) > l[$i]="$time $line" > i=$(($i+1)) > done > > j=0 > > while [ $j -lt $i ]; do > echo ${l[$j]} # >> /var/log/bootlog > j=$(($j+1)) > done Changing t

Logging bootscript output

2007-02-21 Thread Bruce Dubbs
I've been doing a bit of thinking about logging bootscript output. If the first script that ran (S00bootlog) was something like this: mknod -m600 /dev/bootlog p /bin/bootlog.sh < /dev/bootlog & Where bootlog.sh is something like: #!/bin/bash i=0 while read line; do if [ $l