Last change
on this file since 3577 was 746, checked in by Bruno Cornec, 18 years ago |
- Still trying to fix LABEL + LVM in mindi
- Removed some X11 files remaining
- remove some ps options not available with busybox
- Use LOGFILE constantly in init & LogIt
|
-
Property svn:keywords
set to
Id
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # $Id: LogIt 746 2006-08-05 10:00:51Z bruno $
|
---|
4 | #
|
---|
5 |
|
---|
6 | # if [ ! -e "/bin/date" ] ; then
|
---|
7 | # currdate=""
|
---|
8 | # else
|
---|
9 | # currdate=`date +%H:%M`
|
---|
10 | # fi
|
---|
11 | currdate=""
|
---|
12 |
|
---|
13 | LOGFILE=/tmp/mondo-restore.log
|
---|
14 | if [ ! -e "$LOGFILE" ] ; then
|
---|
15 | echo "...first line..." > $LOGFILE
|
---|
16 | fi
|
---|
17 |
|
---|
18 | # LogIt $phrase ------ log only
|
---|
19 | # LogIt $phrase 1 ---- log & display
|
---|
20 | # LogIt $phrase 2 ---- log & display w/o LF
|
---|
21 | # LogIt $prhase 3 ---- log & display, blanking the current screen line
|
---|
22 | # before displaying message _with_ LF
|
---|
23 | # LogIt $phrase 9 ---- log IF --verbose is ON
|
---|
24 |
|
---|
25 | if [ "$#" = "1" ] ; then
|
---|
26 | echo -e "$currdate $1" >> $LOGFILE
|
---|
27 | elif [ "$#" = "2" ] ; then
|
---|
28 | if [ "$2" = "0" ] ; then
|
---|
29 | echo -e "$currdate $1" >> $LOGFILE
|
---|
30 | elif [ "$2" = "1" ] ; then
|
---|
31 | echo -e "$1"
|
---|
32 | echo -e "$currdate $1" >> $LOGFILE
|
---|
33 | elif [ "$2" = "2" ] ; then
|
---|
34 | echo -e -n " \r$1\r"
|
---|
35 | echo -e "$currdate $1" >> $LOGFILE
|
---|
36 | elif [ "$2" = "3" ] ; then
|
---|
37 | echo -e -n " \r$1\n"
|
---|
38 | echo -e "$currdate $1" >> $LOGFILE
|
---|
39 | elif [ "$2" = "9" ] ; then
|
---|
40 | if [ "$DEBUGGING" = "yes" ] ; then
|
---|
41 | echo -e "$currdate $1" >> $LOGFILE
|
---|
42 | fi
|
---|
43 | else
|
---|
44 | LogIt "LogIt '$1' '$2' .. unknown 2nd param"
|
---|
45 | exit 1
|
---|
46 | fi
|
---|
47 | else
|
---|
48 | LogIt "LogIt '$1' .. silly params"
|
---|
49 | exit 1
|
---|
50 | fi
|
---|
51 |
|
---|
52 |
|
---|
53 | exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.