1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
|
.\" Process this file with
.\" groff -mdoc -Tascii <filename>
.\"
.Dd @docdate@
.Os Linux
.Dt MESSAGES \&3 "libbash messages Library Manual"
.\"
.Sh NAME
.\"
.\"
.Nm messages
.Nd libbash library that implements a set of functions to print standard status messages
.\"
.\"
.Sh SYNOPSIS
.\"
.Bl -tag -compact -width 1234567890
.\"
.It Cm printOK
.Op indent
.\"
.It Cm printFAIL
.Op indent
.\"
.It Cm printNA
.Op indent
.\"
.\"
.It Cm printATTN
.Op indent
.\"
.\"
.It Cm printWAIT
.Op indent
.\"
.\"
.\"
.El
.\"
.\"
.Sh DESCRIPTION
.\"
.\" GENERAL
.Ss General
.Bd -filled
.Nm
is a collection of functions to print standard status messages - those [ OK ] and
[FAIL] messages you see during Linux boot process.
.Pp
The function list:
.Bl -tag -compact -width hashdelete12345 -offset indent
.It Sy printOK
Prints a standard [ OK ] message (green)
.It Sy printFAIL
Prints a standard [FAIL] message (red)
.It Sy printNA
Prints a standard [ N/A] message (yellow)
.It Sy printATTN
Prints a standard [ATTN] message (yellow)
.It Sy printWAIT
Prints a standard [WAIT] message (yellow)
.El
.Ed
.Pp
Detailed interface description follows.
.\"
.Ss indent
Column to move to before printing.
.Pp
Default indent is calculated as TTY_WIDTH-10. If current tty width
can not be determined (for example, in case of serial console), it defaults
to 80, so default indent is 80-10=10
.\"
.Sh FUNCTIONS DESCRIPTIONS
.Ss Cm printOK Bq Ns Fa indent Ns Li
.\"
Prints a standard [ OK ] message (green)
.\"
.\"
.Ss Cm printFAIL Bq Ns Fa indent Ns Li
.\"
Prints a standard [FAIL] message (red)
.\"
.\"
.Ss Cm printNA Bq Ns Fa indent Ns Li
.\"
Prints a standard [ N/A] message (yellow)
.Pp
.\"
.\"
.Ss Cm printATTN Bq Ns Fa indent Ns Li
.\"
Prints a standard [ATTN] message (yellow)
.\"
.\"
.Ss Cm printWAIT Bq Ns Fa indent Ns Li
.\"
Prints a standard [WAIT] message (yellow)
.\"
.\"
.Sh EXAMPLES
.\"
.\"
Run a program named MyProg, and report it's success or failure:
.Bd -literal -offset ident-two
echo -n 'Running MyProg...'
printWAIT
if MyProg ; then
printOK
else
printFAIL
fi
.Ed
.\"
.\"
.\"
.\"
.Sh AUTHORS
.\"
.\"
.An "Hai Zaar" Aq haizaar@haizaar.com
.An "Gil Ran" Aq gil@ran4.net
.\"
.\"
.Sh SEE ALSO
.Xr ldbash 1 ,
.Xr libbash 1
|