home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / doc / lsb-base / README.Debian < prev   
Encoding:
Text File  |  2006-07-03  |  3.2 KB  |  94 lines

  1. lsb-base for Debian
  2. -------------------
  3.  
  4. The Debian lsb-base package provides a series of logging functions to
  5. permit simplified logging of init script actions.
  6.  
  7.   - log_daemon_msg "Starting/stopping long daemon name" "daemond"
  8.  
  9.     Log starting/stopping of daemons.  On Debian, outputs:
  10.  
  11.     "Starting/stopping long daemon name: daemond"
  12.  
  13.     and leaves the cursor at the end of the line.
  14.  
  15.   - log_progress_msg "daemon2d"
  16.  
  17.     Log startup of a second daemon (e.g. sysklogd, nfs init scripts).
  18.     On Debian, outputs " daemon2d" and leaves the cursor at the EOL.
  19.  
  20.   - log_end_msg 0
  21.  
  22.     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.
  25.  
  26.   - log_action_msg "Setting VARIABLE to VALUE"
  27.  
  28.     Log an atomic action by your init script.  Typically, this is the
  29.     setting of a kernel variable, but it might be something else that is
  30.     not expected to take any time (or fail).
  31.  
  32.     On Debian, a trailing period will be added to the message,
  33.     followed by a newline.
  34.  
  35.   - log_action_begin_msg "Configuring network interfaces"
  36.  
  37.     Log the start of an action that is expected to take some time.  On
  38.     Debian, an elipsis (...) will follow the message, and the cursor will
  39.     stay at EOL.
  40.  
  41.   - log_action_cont_msg "flushing ARP cache"
  42.  
  43.     Log an action as part of a process started by log_action_start_msg().
  44.     On Debian, this message will receive a trailing elipsis, and the cursor
  45.     will stay at EOL.
  46.  
  47.   - log_action_end_msg {0|1} ["message"]
  48.  
  49.     Log the end of the action started by log_action_start_msg().  If one
  50.     argument is supplied, either "done." (0) or "failed." (1) will be output,
  51.     followed by a newline.  If a second argument is supplied, the message
  52.     will appear as follows:
  53.  
  54.     "done (your message here)." --- if first argument is 0
  55.     "failed (your message here)." --- if first argument is 1
  56.  
  57.     This argument must be quoted, or otherwise only the first word will
  58.     be output.
  59.  
  60.     On color TTYs, the failure messages will be red.
  61.  
  62. A deprecated function, log_start_msg, is also provided for
  63. compatibility with a few older packages and a derived distribution.
  64. This may eventually disappear.
  65.  
  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. To use these functions, source /lib/lsb/init-functions at the
  76. beginning of your (Bourne sh or compatible) init script.
  77.  
  78. Please depend on lsb-base (>= 3.0-6) to ensure all of these
  79. functions are available for your init scripts.
  80.  
  81. CUSTOMIZING OUTPUT
  82.  
  83. If it exists, /etc/lsb-base-logging.sh will be sourced by
  84. /lib/lsb/init-functions.  You may override any of the log_* functions
  85. in this file.  The intent is for this file to be supplied as a
  86. conffile by derived distributions wishing to log init script events in
  87. a different way.
  88.  
  89. If supplied, this script fragment should be compatible with any Debian
  90. /bin/sh, as init scripts sourcing this file may be running under any
  91. Bourne-style shell permitted by Debian policy (i.e. not just bash).
  92.  
  93.  -- Chris Lawrence <lawrencc@debian.org>, Sat Sep 24 19:15:02 2005
  94.