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
|
lsb-base for Debian
-------------------
The Debian lsb-base package provides a series of logging functions to
permit simplified logging of init script actions.
- log_daemon_msg "Starting/stopping long daemon name" "daemond"
Log starting/stopping of daemons. On Debian, outputs:
"Starting/stopping long daemon name: daemond"
and leaves the cursor at the end of the line.
- log_progress_msg "daemon2d"
Log startup of a second daemon (e.g. sysklogd, nfs init scripts).
On Debian, outputs " daemon2d" and leaves the cursor at the EOL.
- log_end_msg 0
Log successful startup. On Debian, outputs "." followed by newline.
1 may also be specified, which indicates failure; currently implemented
as outputting "failed!" (in red on a color TTY) followed by newline.
- log_action_msg "Setting VARIABLE to VALUE"
Log an atomic action by your init script. Typically, this is the
setting of a kernel variable, but it might be something else that is
not expected to take any time (or fail).
On Debian, a trailing period will be added to the message,
followed by a newline.
- log_action_begin_msg "Configuring network interfaces"
Log the start of an action that is expected to take some time. On
Debian, an elipsis (...) will follow the message, and the cursor will
stay at EOL.
- log_action_cont_msg "flushing ARP cache"
Log an action as part of a process started by log_action_start_msg().
On Debian, this message will receive a trailing elipsis, and the cursor
will stay at EOL.
- log_action_end_msg {0|1} ["message"]
Log the end of the action started by log_action_start_msg(). If one
argument is supplied, either "done." (0) or "failed." (1) will be output,
followed by a newline. If a second argument is supplied, the message
will appear as follows:
"done (your message here)." --- if first argument is 0
"failed (your message here)." --- if first argument is 1
This argument must be quoted, or otherwise only the first word will
be output.
On color TTYs, the failure messages will be red.
A deprecated function, log_start_msg, is also provided for
compatibility with a few older packages and a derived distribution.
This may eventually disappear.
This package also includes the LSB-specified functions:
log_success_msg
log_failure_msg
log_warning_msg
These functions *do not* comply with Debian policy and should only be used
by LSB packages.
To use these functions, source /lib/lsb/init-functions at the
beginning of your (Bourne sh or compatible) init script.
Please depend on lsb-base (>= 3.0-6) to ensure all of these
functions are available for your init scripts.
CUSTOMIZING OUTPUT
If it exists, /etc/lsb-base-logging.sh will be sourced by
/lib/lsb/init-functions. You may override any of the log_* functions
in this file. The intent is for this file to be supplied as a
conffile by derived distributions wishing to log init script events in
a different way.
If supplied, this script fragment should be compatible with any Debian
/bin/sh, as init scripts sourcing this file may be running under any
Bourne-style shell permitted by Debian policy (i.e. not just bash).
-- Chris Lawrence <lawrencc@debian.org>, Sat Sep 24 19:15:02 2005
|