Package: lsb-base
Version: 3.1-24
Severity: normal

Hi,

the following patch prevents an LSB-ized init script (which should run
set -e) from aborting prematurely if s-s-d returns non-zero:

--- init-functions      2007-11-16 17:27:34.000000000 +0100
+++ /lib/lsb/init-functions     2007-11-16 17:29:56.000000000 +0100
@@ -115,12 +115,12 @@
 
     sig=$(echo ${2:-} | sed -e 's/^-\(.*\)/\1/')
     sig=$(echo $sig | sed -e 's/^SIG\(.*\)/\1/')
+    status=0
     if [ -n "$sig" ]; then
-        /sbin/start-stop-daemon --stop --pidfile "$pidfile" --signal "$sig" 
--quiet $name_param
+        /sbin/start-stop-daemon --stop --pidfile "$pidfile" --signal "$sig" 
--quiet $name_param || status="$?"
     else
-        /sbin/start-stop-daemon --stop --pidfile "$pidfile" --retry 5 --quiet 
--oknodo $name_param
+        /sbin/start-stop-daemon --stop --pidfile "$pidfile" --retry 5 --quiet 
--oknodo $name_param || status="$?"
     fi
-    status="$?"
     if [ "$status" = 1 ]; then
         [ -n "$sig" ] && return 0
         return 3 # program is not running

In the original version, status cannot be non-zero as an set -e script
would terminate before setting the status.

Greetings
Marc

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.23.1-zgsrv (SMP w/1 CPU core; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages lsb-base depends on:
ii  ncurses-bin               5.6+20071006-3 Terminal-related programs and man 
ii  sed                       4.1.5-4        The GNU sed stream editor

lsb-base recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to