Hi!

After further analysis, I realized that the config script was not working,
since the debconf templates are missing.  Since there's a changelog entry
that states that debconf stuff was removed, I assume that the config script
was being installed by mistake.

Therefore, I removed the config file from debian/rules, so that it does not
get installed.

I'm attaching the full interdiff output, again, with this change.  I'll
still be uploading to the delayed queue.

-- 
Love,
        Marga
diff -u thttpd-2.23beta1/libhttpd.c thttpd-2.23beta1/libhttpd.c
--- thttpd-2.23beta1/libhttpd.c
+++ thttpd-2.23beta1/libhttpd.c
@@ -77,6 +77,10 @@
 # endif
 #endif
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
 extern char* crypt( const char* key, const char* setting );
 
 #include "libhttpd.h"
diff -u thttpd-2.23beta1/thttpd.c thttpd-2.23beta1/thttpd.c
--- thttpd-2.23beta1/thttpd.c
+++ thttpd-2.23beta1/thttpd.c
@@ -63,6 +63,9 @@
 #define SHUT_WR 1
 #endif
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
 
 static char* argv0;
 static int debug;
diff -u thttpd-2.23beta1/debian/prerm thttpd-2.23beta1/debian/prerm
--- thttpd-2.23beta1/debian/prerm
+++ thttpd-2.23beta1/debian/prerm
@@ -7,7 +7,11 @@
                #
                #       Stop the daemon
                #
-               invoke-rc.d thttpd stop
+               if [ -x /usr/sbin/invoke-rc.d ]; then
+                       invoke-rc.d thttpd stop
+               else
+                       /etc/init.d/thttpd stop
+               fi
                [ -L /usr/doc/thttpd ] && rm -f /usr/doc/thttpd
                ;;
        failed-upgrade)
diff -u thttpd-2.23beta1/debian/changelog thttpd-2.23beta1/debian/changelog
--- thttpd-2.23beta1/debian/changelog
+++ thttpd-2.23beta1/debian/changelog
@@ -1,3 +1,25 @@
+thttpd (2.23beta1-4.2) unstable; urgency=low
+
+  * Non-maintainer upload to fix a policy issue and other bugs.
+  * Patched config, postinst, prerm and logrotate so that invoke-rc.d is used
+    whenever needed.  Also fixed problems with redirecting stderr.
+    Thanks to Rodrigo Campos for the patch.
+    (Closes: #333305, #237617)
+  * Patched libhttpd.c and thttpd.c so that MAXPATHLEN gets define in Hurd.
+    Thanks to Michael Banck for the patch.  (Closes: #308681)
+  * Added check to be sure that the PIDFILE is not a stale file. Thanks to
+    Bastian Kleineidam for the patch.
+    (Closes: #385055, #334610, #247930, #384738)
+  * Added a "sleep 1" line in the restart option of the init script.
+    (Closes: #236329, #379850, #301719)
+  * Added quotes to debian/config test for the PORT variable, to prevent
+    a shell problem. 
+  * Modified debian/rules so that the config script does not get installed,
+    since the templates are removed and it loops infinetely, otherwise.
+    (Closes: #350960)
+
+ -- Margarita Manterola <[EMAIL PROTECTED]>  Sat,  9 Sep 2006 12:56:05 -0300
+
 thttpd (2.23beta1-4.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -u thttpd-2.23beta1/debian/rules thttpd-2.23beta1/debian/rules
--- thttpd-2.23beta1/debian/rules
+++ thttpd-2.23beta1/debian/rules
@@ -81,7 +81,7 @@
            $(tmp)/$(sysconfdir)/$(PACKAGE)
        install --mode=755 debian/thttpd.rc   
$(tmp)/$(sysconfdir)/init.d/$(PACKAGE)
        install --mode=644 debian/conffiles   $(tmp)/DEBIAN
-       install --mode=755 debian/{postinst,postrm,prerm,config} \
+       install --mode=755 debian/{postinst,postrm,prerm} \
                $(tmp)/DEBIAN
        install --mode=644 debian/thttpd.logrotate \
                $(tmp)/$(sysconfdir)/logrotate.d/thttpd
diff -u thttpd-2.23beta1/debian/postinst thttpd-2.23beta1/debian/postinst
--- thttpd-2.23beta1/debian/postinst
+++ thttpd-2.23beta1/debian/postinst
@@ -7,7 +7,11 @@
                echo "Updating rc.d symbolic links to start thttpd upon 
booting."
                update-rc.d thttpd defaults 20 > /dev/null
                echo "Starting thttpd ..."
-               /etc/init.d/thttpd start  > /dev/null || true
+               if [ -x /usr/sbin/invoke-rc.d ]; then
+                       invoke-rc.d thttpd start  > /dev/null || true
+               else
+                       /etc/init.d/thttpd start  > /dev/null || true
+               fi              
                ;;
        *)
                #
diff -u thttpd-2.23beta1/debian/config thttpd-2.23beta1/debian/config
--- thttpd-2.23beta1/debian/config
+++ thttpd-2.23beta1/debian/config
@@ -97,7 +97,7 @@
     db_get thttpd/select_port
     PORT=$RET
 
-    if [ -z $PORT ]; then
+    if [ -z "$PORT" ]; then
         PORT=$DEFPORT
     fi
 }
@@ -120,7 +120,11 @@
 
 if [ "$INSTALL_STAT" = "installed" ]; then
     if [ -x /etc/init.d/thttpd ]; then
-        /etc/init.d/thttpd stop 1>&2> /dev/null || true
+        if [ -x /usr/sbin/invoke-rc.d ]; then
+            invoke-rc.d thttpd stop > /dev/null 2>&1 || true
+        else
+            /etc/init.d/thttpd stop > /dev/null 2>&1 || true
+        fi
     fi
 fi
 
diff -u thttpd-2.23beta1/debian/thttpd.rc thttpd-2.23beta1/debian/thttpd.rc
--- thttpd-2.23beta1/debian/thttpd.rc
+++ thttpd-2.23beta1/debian/thttpd.rc
@@ -23,7 +23,14 @@
     start)
         echo -n "Starting web server: "
         if [ -f $PIDFILE ]; then
-            echo "$DAEMON already running."
+            PID=`cat $PIDFILE`
+            if ps ax | grep -q "^$PID"; then
+                echo "$DAEMON already running."
+            else
+                rm -f $PIDFILE
+                $DAEMON -C $CONFFILE -i $PIDFILE
+                echo "$NAME. "
+            fi
         else
             $DAEMON -C $CONFFILE -i $PIDFILE
             echo "$NAME. "
@@ -32,8 +39,13 @@
     stop)
         echo -n "Stopping web server: "
         if [ -f $PIDFILE ]; then
-            kill -10 `cat $PIDFILE`
-            echo "$NAME"
+            PID=`cat $PIDFILE`
+            if ps ax | grep -q "^$PID"; then
+                kill -10 $PID
+                echo "$NAME"
+            else
+                echo "No $DAEMON found running; none killed."
+            fi
             rm -f $PIDFILE
         else
             echo "No $DAEMON found running; none killed."
@@ -42,8 +54,13 @@
     force-stop)
         echo -n "Terminating web server: "
         if [ -f $PIDFILE ]; then
-            kill -10 `cat $PIDFILE`
-            echo "$NAME"
+            PID=`cat $PIDFILE`
+            if ps ax | grep -q "^$PID"; then
+                kill -10 $PID
+                echo "$NAME"
+            else
+                echo "No $DAEMON found running; none killed."
+            fi
             rm -f $PIDFILE
         else
             echo "No $DAEMON found running; none killed."
@@ -51,6 +68,7 @@
         ;;
     restart|force-reload)
         $INIT stop 
+        sleep 1 
         $INIT start
         ;;
     *)
diff -u thttpd-2.23beta1/debian/thttpd.logrotate 
thttpd-2.23beta1/debian/thttpd.logrotate
--- thttpd-2.23beta1/debian/thttpd.logrotate
+++ thttpd-2.23beta1/debian/thttpd.logrotate
@@ -11,7 +11,11 @@
     endscript
     postrotate
        if [ -f /tmp/start_thttpd ]; then
-           /etc/init.d/thttpd restart 2>&1 > /dev/null
+               if [ -x /usr/sbin/invoke-rc.d ]; then
+                       invoke-rc.d thttpd restart > /dev/null 2>&1
+               else
+                       /etc/init.d/thttpd restart > /dev/null 2>&1
+               fi
            rm -f /tmp/start_thttpd
        fi
     endscript

Reply via email to