~ubuntu-branches/ubuntu/raring/lsb/raring-proposed

« back to all changes in this revision

Viewing changes to debian/lsb-base.README.Debian

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2006-11-21 11:18:27 UTC
  • Revision ID: james.westby@ubuntu.com-20061121111827-j63sb1imu6pr71ql
Tags: 3.1-22ubuntu1
* Resynchronise with Debian. Remaining changes:
  - Depend on postfix rather than exim4 as preferred mail-transport-agent
    alternative.
  - Depend on libgl1-mesa-glx rather than libgl1-mesa as preferred libgl1
    alternative.
  - Add Ubuntu logging functions.
  - Drop the optional lsb-qt4 module to a suggests.
* Make log_action_end_msg always return zero, per
  debian/lsb-base.README.Debian.
* "ok" -> "OK" (closes: Malone #19245).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
-------------------
3
3
 
4
4
The Debian lsb-base package provides a series of logging functions to
5
 
permit simplified logging of init script actions.
 
5
permit simplified logging of init script actions.  These functions are
 
6
specific to Debian and (in some cases) other derived distributions.
6
7
 
7
8
  - log_daemon_msg "Starting/stopping long daemon name" "daemond"
8
9
 
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.
19
20
 
20
 
  - log_end_msg 0
 
21
  - log_end_msg 0/1
21
22
 
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.
 
27
 
 
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.
25
31
 
26
32
  - log_action_msg "Setting VARIABLE to VALUE"
27
33
 
59
65
 
60
66
    On color TTYs, the failure messages will be red.
61
67
 
 
68
    Note that unlike log_end_msg(), this function does not return the
 
69
    first argument as its exit code.
 
70
 
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.
65
74
 
66
 
This package also includes the LSB-specified functions:
67
 
 
68
 
log_success_msg
69
 
log_failure_msg
70
 
log_warning_msg
71
 
 
72
 
These functions *do not* comply with Debian policy and should only be used
73
 
by LSB packages.
74
 
 
75
75
To use these functions, source /lib/lsb/init-functions at the
76
76
beginning of your (Bourne sh or compatible) init script.
77
77
 
78
78
Please depend on lsb-base (>= 3.0-6) to ensure all of these
79
79
functions are available for your init scripts.
80
80
 
81
 
CUSTOMIZING OUTPUT
 
81
LSB LOGGING FUNCTIONS
 
82
 
 
83
This package also includes the LSB-specified logging functions:
 
84
 
 
85
log_success_msg message
 
86
log_failure_msg message
 
87
log_warning_msg message
 
88
 
 
89
These functions *do not* comply with Debian policy and should only be used
 
90
by LSB packages.
 
91
 
 
92
OTHER LSB FUNCTIONALITY
 
93
 
 
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.
 
97
 
 
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.
 
101
 
 
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.
 
106
 
 
107
For full documentation, please refer to:
 
108
 
 
109
http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html
 
110
 
 
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.
 
117
 
 
118
CUSTOMIZING LOGGING OUTPUT
82
119
 
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
87
 
a different way.
 
124
a different way; this may also be useful on systems where the console
 
125
log is not visible during startup.
88
126
 
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).
92
130
 
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.
 
132
 
 
133
 -- Chris Lawrence <lawrencc@debian.org>, Sat, 26 Aug 2006 21:40:06 -0500