Package: lighttpd
Version: 1.4.26-3
Severity: wishlist
Tags: patch

Please consider applying the attached patch from Ubuntu, which adds a
syntax check to the start and reload actions in the init script.

This has been requested initially for Ubuntu at:
https://launchpad.net/bugs/286887
(See https://launchpad.net/bugs/600767 for a roundup of the patch
history)

-- System Information:
Debian Release: squeeze/sid
  APT prefers lucid-updates
  APT policy: (500, 'lucid-updates'), (500, 'lucid-security'), (500, 
'lucid-proposed'), (500, 'lucid-backports'), (500, 'lucid')
Architecture: i386 (i686)

Kernel: Linux 2.6.35-6-generic (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lighttpd depends on:
ii  libattr1        1:2.4.44-1               Extended attribute shared library
ii  libbz2-1.0      1.0.5-4                  high-quality block-sorting file co
ii  libc6           2.11.1-0ubuntu7.2        Embedded GNU C Library: Shared lib
ii  libgamin0 [libf 0.1.10-1ubuntu3          Client library for the gamin file 
ii  libldap-2.4-2   2.4.21-0ubuntu5          OpenLDAP libraries
ii  libpcre3        7.8-3build1              Perl 5 Compatible Regular Expressi
ii  libssl0.9.8     0.9.8k-7ubuntu8          SSL shared libraries
pn  libterm-readlin <none>                   (no description available)
ii  lsb-base        4.0-0ubuntu8             Linux Standard Base 4.0 init scrip
ii  mime-support    3.48-1ubuntu1            MIME files 'mime.types' & 'mailcap
ii  zlib1g          1:1.2.3.3.dfsg-15ubuntu1 compression library - runtime

Versions of packages lighttpd recommends:
pn  spawn-fcgi                    <none>     (no description available)

Versions of packages lighttpd suggests:
ii  apache2-utils          2.2.14-5ubuntu8   utility programs for webservers
ii  openssl                0.9.8k-7ubuntu8   Secure Socket Layer (SSL) binary a
ii  rrdtool                1.3.8-1ubuntu1    Time-series data storage and displ
ii  ufw                    0.30pre1-0ubuntu2 program for managing a Netfilter f
diff -Nru lighttpd-1.4.26/debian/lighttpd.init lighttpd-1.4.26/debian/lighttpd.init
--- lighttpd-1.4.26/debian/lighttpd.init	2010-06-01 14:20:09.000000000 +0200
+++ lighttpd-1.4.26/debian/lighttpd.init	2010-07-15 20:25:24.000000000 +0200
@@ -32,8 +32,13 @@
 
 . /lib/lsb/init-functions
 
+syntax_check() {
+	$DAEMON -t $DAEMON_OPTS || exit $?
+}
+
 case "$1" in
     start)
+        syntax_check
         log_daemon_msg "Starting $DESC" $NAME
         if ! start-stop-daemon --start --oknodo --quiet \
             --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
@@ -55,6 +60,7 @@
         fi
         ;;
     reload|force-reload)
+        syntax_check
         log_daemon_msg "Reloading $DESC configuration" $NAME
         if start-stop-daemon --stop --signal INT --quiet \
             --pidfile $PIDFILE --exec $DAEMON

Reply via email to