From: Chris Lawrence Date: Wed, 27 Sep 2006 23:10:12 +0000 (-0500) Subject: lsb 3.1-16 Debian release. X-Git-Tag: archive/raspbian/10.2018112800+rpi1^2~236 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=98a00b73d766aa9bd840cd35a39f790e451b1377;p=lsb.git lsb 3.1-16 Debian release. --- diff --git a/debian/TODO b/debian/TODO index 79ce91a..e22f632 100644 --- a/debian/TODO +++ b/debian/TODO @@ -3,3 +3,4 @@ A quickie TODO list for lsb*: * Finish lsbinstall * Move dynamic linker symlinks from postinst into package itself. (?) * Only build lsb-* for LSB architectures in Debian. +* Make lsb stuff available in a Python package. diff --git a/debian/changelog b/debian/changelog index 0045663..022e33c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +lsb (3.1-16) unstable; urgency=low + + * Improve documentation of killproc(). (Closes: #384814) + * Also improve documentation of pidofproc() in the same vein. + * Move lsb_release to /usr. (Closes: #389380) + * Modify log_use_fancy_output() to only test once for a fancy TTY; patch + by Brendan O'Dea. (Closes: #389497) + * Fix semantics of killproc() to behave properly when $sig is specified. + (Closes: #389403) + + -- Chris Lawrence Wed, 27 Sep 2006 18:10:12 -0500 + lsb (3.1-15) unstable; urgency=low * Fix assignment to $opt in pidofproc(). (Closes: #384540) diff --git a/debian/lsb-base.README.Debian b/debian/lsb-base.README.Debian index b97ce11..0ca9871 100644 --- a/debian/lsb-base.README.Debian +++ b/debian/lsb-base.README.Debian @@ -2,7 +2,8 @@ lsb-base for Debian ------------------- The Debian lsb-base package provides a series of logging functions to -permit simplified logging of init script actions. +permit simplified logging of init script actions. These functions are +specific to Debian and (in some cases) other derived distributions. - log_daemon_msg "Starting/stopping long daemon name" "daemond" @@ -25,7 +26,8 @@ permit simplified logging of init script actions. TTY) followed by newline. Unsucessful startup will cause the specified failure code to be - returned by this function. + returned by this function; unless trapped, this may end your init + script depending on whether or not set -e is used. - log_action_msg "Setting VARIABLE to VALUE" @@ -63,6 +65,9 @@ permit simplified logging of init script actions. On color TTYs, the failure messages will be red. + Note that unlike log_end_msg(), this function does not return the + first argument as its exit code. + A deprecated function, log_start_msg, is also provided for compatibility with a few older packages and a derived distribution. This may eventually disappear. @@ -91,10 +96,13 @@ start_daemon [-f] [-n nicelevel] [-p pidfile] pathname [args...] implement this functionality. killproc [-p pidfile] pathname [signal] - Stops "pathname" (using "pidfile", if specified, to find the process ID). + Stops "pathname" (using "pidfile", if specified, to find the process + ID). This is implemented using start-stop-daemon as well. pidofproc [-p pidfile] pathname - Find the process ID of pathname. + Find the process ID of pathname. If the pidfile is specified, we use the + first space-delimited word; otherwise, /bin/pidof is used from the + sysvinit package, if available. For full documentation, please refer to: @@ -102,7 +110,10 @@ http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/in Note: Debian packages probably should use start-stop-daemon directly; however, these functions may be useful in porting init scripts from -other distributions. +other distributions. Also, if you are developing software for wider +use, you should not expect these functions to be implemented +identically on other LSB-conforming distributions; the only guaranteed +behaviors are those in the specification above. CUSTOMIZING LOGGING OUTPUT @@ -119,4 +130,4 @@ Bourne-style shell permitted by Debian policy (i.e. not just bash). "Fancy output" can be overriden by setting FANCYTTY=0 in this file. - -- Chris Lawrence , Fri, 11 Aug 2006 23:38:28 -0500 + -- Chris Lawrence , Sat, 26 Aug 2006 21:40:06 -0500 diff --git a/debian/lsb-release.dirs b/debian/lsb-release.dirs index 5e56e04..415f082 100644 --- a/debian/lsb-release.dirs +++ b/debian/lsb-release.dirs @@ -1 +1 @@ -/bin +/usr/bin diff --git a/debian/rules b/debian/rules index aa3298d..56aab83 100755 --- a/debian/rules +++ b/debian/rules @@ -84,7 +84,7 @@ install: build #$(MAKE) install DESTDIR=$(CURDIR)/debian/lsb cp -p initdutils.py install_initd remove_initd lsbinstall debian/lsb-core/usr/lib/lsb cp -p init-functions debian/lsb-base/lib/lsb - cp -p lsb_release debian/lsb-release/bin + cp -p lsb_release debian/lsb-release/usr/bin # Build architecture-independent files here. binary-indep: build install diff --git a/init-functions b/init-functions index 099e64e..c4ddfc8 100644 --- a/init-functions +++ b/init-functions @@ -95,14 +95,13 @@ pidofproc () { # start-stop-daemon uses the same algorithm as "pidofproc" above. killproc () { - local pidfile sig status base i specified + local pidfile sig status base i pidfile= - specified= OPTIND=1 while getopts p: opt ; do case "$opt" in - p) pidfile="$OPTARG"; specified=1;; + p) pidfile="$OPTARG";; esac done shift $(($OPTIND - 1)) @@ -114,9 +113,8 @@ killproc () { sig=$(echo ${2:-} | sed -e 's/^-\(.*\)/\1/') sig=$(echo $sig | sed -e 's/^SIG\(.*\)/\1/') - sig=${sig:-TERM} - if [ "$specified" ]; then - /sbin/start-stop-daemon --stop --pidfile "$pidfile" --signal $sig --quiet --name "$base" + if [ -n "$sig" ]; then + /sbin/start-stop-daemon --stop --pidfile "$pidfile" --signal "$sig" --quiet --name "$base" else /sbin/start-stop-daemon --stop --pidfile "$pidfile" --retry 5 --quiet --oknodo --name "$base" fi @@ -133,16 +131,17 @@ killproc () { log_use_fancy_output () { TPUT=/usr/bin/tput EXPR=/usr/bin/expr - if [ FANCYTTY = 0 ]; then - false - fi - if [ "x$TERM" != "xdumb" ] && [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1 && $TPUT setaf 1 >/dev/null 2>&1; then - FANCYTTY=1 - true - else - FANCYTTY=0 - false + if [ -z $FANCYTTY ]; then + if [ "x$TERM" != "xdumb" ] && [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1 && $TPUT setaf 1 >/dev/null 2>&1; then + FANCYTTY=1 + else + FANCYTTY=0 + fi fi + case "$FANCYTTY" in + 1|Y|yes|true) true;; + *) false;; + esac } log_success_msg () {