17
18
Log startup of a second daemon (e.g. sysklogd, nfs init scripts).
18
19
On Debian, outputs " daemon2d" and leaves the cursor at the EOL.
22
23
Log successful startup. On Debian, outputs "." followed by newline.
23
1 may also be specified, which indicates failure; currently implemented
24
as outputting "failed!" (in red on a color TTY) followed by newline.
24
A non-zero code may also be specified, which indicates failure;
25
currently implemented as outputting "failed!" (in red on a color
26
TTY) followed by newline.
28
Unsucessful startup will cause the specified failure code to be
29
returned by this function; unless trapped, this may end your init
30
script depending on whether or not set -e is used.
26
32
- log_action_msg "Setting VARIABLE to VALUE"
60
66
On color TTYs, the failure messages will be red.
68
Note that unlike log_end_msg(), this function does not return the
69
first argument as its exit code.
62
71
A deprecated function, log_start_msg, is also provided for
63
72
compatibility with a few older packages and a derived distribution.
64
73
This may eventually disappear.
66
This package also includes the LSB-specified functions:
72
These functions *do not* comply with Debian policy and should only be used
75
75
To use these functions, source /lib/lsb/init-functions at the
76
76
beginning of your (Bourne sh or compatible) init script.
78
78
Please depend on lsb-base (>= 3.0-6) to ensure all of these
79
79
functions are available for your init scripts.
83
This package also includes the LSB-specified logging functions:
85
log_success_msg message
86
log_failure_msg message
87
log_warning_msg message
89
These functions *do not* comply with Debian policy and should only be used
92
OTHER LSB FUNCTIONALITY
94
start_daemon [-f] [-n nicelevel] [-p pidfile] pathname [args...]
95
Start "pathname" as a daemon. We call Debian's start-stop-daemon to
96
implement this functionality.
98
killproc [-p pidfile] pathname [signal]
99
Stops "pathname" (using "pidfile", if specified, to find the process
100
ID). This is implemented using start-stop-daemon as well.
102
pidofproc [-p pidfile] pathname
103
Find the process ID of pathname. If the pidfile is specified, we use the
104
first space-delimited word; otherwise, /bin/pidof is used from the
105
sysvinit package, if available.
107
For full documentation, please refer to:
109
http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html
111
Note: Debian packages probably should use start-stop-daemon directly;
112
however, these functions may be useful in porting init scripts from
113
other distributions. Also, if you are developing software for wider
114
use, you should not expect these functions to be implemented
115
identically on other LSB-conforming distributions; the only guaranteed
116
behaviors are those in the specification above.
118
CUSTOMIZING LOGGING OUTPUT
83
120
If it exists, /etc/lsb-base-logging.sh will be sourced by
84
121
/lib/lsb/init-functions. You may override any of the log_* functions
85
122
in this file. The intent is for this file to be supplied as a
86
123
conffile by derived distributions wishing to log init script events in
124
a different way; this may also be useful on systems where the console
125
log is not visible during startup.
89
127
If supplied, this script fragment should be compatible with any Debian
90
128
/bin/sh, as init scripts sourcing this file may be running under any
91
129
Bourne-style shell permitted by Debian policy (i.e. not just bash).
93
-- Chris Lawrence <lawrencc@debian.org>, Sat Sep 24 19:15:02 2005
131
"Fancy output" can be overriden by setting FANCYTTY=0 in this file.
133
-- Chris Lawrence <lawrencc@debian.org>, Sat, 26 Aug 2006 21:40:06 -0500