Debian bug report logs - #1437
Debian sendmail

Package: sendmail; Reported by: Brian Dowling <bdowling@ccs.neu.edu>; 39 days old.
Bug assigned to package `sendmail'. Request was from imurdock@debian.org (Ian Murdock) to debian-bugs-request@pixar.com. Full text available.

Message received at debian-bugs:


From netg.se!ac Sun Sep 24 06:53:04 1995
Return-Path: <ac@netg.se>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0swrUN-0003afC; Sun, 24 Sep 95 06:53 PDT
Received: from vega.netg.se by pixar.com with SMTP id AA22557
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sun, 24 Sep 1995 06:52:42 -0700
Received: (from ac@localhost) by vega.netg.se id OAA04974
  (8.6.12/IDA-1.6); Sun, 24 Sep 1995 14:52:55 +0100
Date: Sun, 24 Sep 1995 14:52:55 +0100 (MET)
From: Anders Chrigstrom <ac@netg.se>
To: Debian bugs <debian-bugs@pixar.com>
Subject: Bug#1437
Message-Id: <Pine.LNX.3.91.950924145224.4731A-100000@vega.netg.se>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


sendmail-8.6.12-7 contains a correct /etc/init.d/sendmail.

I guess i was a little too urgent to meet the package submission deadline.



--
Anders Chrigstrom               Email: ac@netg.se
TerraTel AB                       Tfn: +46 31 28 03 73



Acknowledgement sent to Anders Chrigstrom <ac@netg.se>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1437. Full text available.

Message received at debian-bugs:


From ccs.neu.edu!bdowling Fri Sep 22 14:39:40 1995
Return-Path: <bdowling@ccs.neu.edu>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0swFop-000FH7C; Fri, 22 Sep 95 14:39 PDT
Received: from amber.ccs.neu.edu by pixar.com with SMTP id AA17556
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Fri, 22 Sep 1995 14:39:21 -0700
Received: from camelot.ccs.neu.edu (root@camelot.ccs.neu.edu [129.10.111.87])
	by amber.ccs.neu.edu (8.6.12/8.6.4) with ESMTP id RAA29385; Fri, 22 Sep 1995 17:39:23 -0400
Received: from localhost.ccs.neu.edu (bdowling@localhost.ccs.neu.edu [127.0.0.1])
	by camelot.ccs.neu.edu (8.6.12/8.6.4) with SMTP id RAA28298; Fri, 22 Sep 1995 17:39:22 -0400
Message-Id: <199509222139.RAA28298@camelot.ccs.neu.edu>
X-Authentication-Warning: camelot.ccs.neu.edu: Host localhost.ccs.neu.edu didn't use HELO protocol
To: debian-bugs@pixar.com, ac@netg.se
Cc: bdowling@camelot.ccs.neu.edu
Subject: Debian sendmail
Date: Fri, 22 Sep 95 17:39:17 -0400
From: Brian Dowling <bdowling@ccs.neu.edu>


Howdy!

I noticed that the sendmail package,

ftp://ftp.debian.org/debian/binary/mail/sendmail-8.6.12-6.deb 

contains a slight error, the included /etc/init.d/sendmail script starts
/usr/sbin/sendmail ok, but 'stop' kills /usr/sbin/cron ! :)

I noticed this when I upgraded and went to restart sendmail, 
"Stopped /usr/sbin/cron (pid 123)" ??  Uh, I think not :)


Also, the script "/etc/init.d/functions 2.00 03-Oct-1994" which appears to be
sourced by a number of other /etc/init.d scripts (ppp, xntp, syslogd, etc),
has a minor bug as well.  I currently have sysvinit-2.56-3.deb installed, but
sysvinit-2.57b-0.deb appears to have the same functions script.

Note the following code:

----------------------------------------------------------------------
  # Set RUNLEVEL and PREVLEVEL
  if [ "$RUNLEVEL" = "" ]
  then
        levels=`runlevel`
        if [ $? = 0 ]
        then
                eval set $levels
                PREVLEVEL=$1
                RUNLEVEL=$2
        fi
  fi
----------------------------------------------------------------------

Because it uses 'set' if $RUNLEVEL is not defined, it munges $1 and $2 ...
which may have been arguments the 'real' script needed, i.e "start" or "stop".
This is annoying when, like me, you like to start and stop services
occasionally.  Since these nice init scripts are there, I'd like to use them
to do this consistently.

A quick fix for this, is, if you assume these sripts only accept one argment,
would be to save $1 and restore it.  The other alternative I can think of (not
being a strong /bin/sh programmer), is to turn this section into a function,
and just call it right away, this is what I did.  I was trying to think about
how to use $* or $@ or something to store the previous args, and then later a
set to restore them, but I found this solution to be simpler.

fwiw, I included a patch for how I fixed these at the end.

BTW, where should I look for discusion about 'dpkg' and 'dselect'?  I'm
personally interested in tools like this (standardized software installation,
etc) and may have some input and ideas for improvements.

Cheers,
Brian					http://www.ccs.neu.edu/home/bdowling/


--- sendmail.ORIG       Fri Sep 22 17:03:57 1995
+++ sendmail    Fri Sep 22 17:11:04 1995
@@ -5,7 +5,7 @@
 
 case "$1" in
 start) start-stop-daemon --start --verbose --exec /usr/sbin/sendmail -- -bd
-q10m ;;
-stop)  start-stop-daemon --stop --verbose --exec /usr/sbin/cron ;;
+stop)  start-stop-daemon --stop --verbose --exec /usr/sbin/sendmail ;;
 *)     echo "Usage: /etc/init.d/sendmail start|stop"; exit 1 ;;
 esac
 exit 0
--- functions.ORIG      Fri Sep 22 16:54:53 1995
+++ functions   Fri Sep 22 17:12:57 1995
@@ -12,6 +12,7 @@
   # First set up a default search path.
   export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
 
+  setrunlevel() {
   # Set RUNLEVEL and PREVLEVEL
   if [ "$RUNLEVEL" = "" ]
   then
@@ -23,6 +24,9 @@
                RUNLEVEL=$2
        fi
   fi
+  }
+
+  setrunlevel
 
   # A function to start a program.
   daemon() {

Acknowledgement sent to Brian Dowling <bdowling@ccs.neu.edu>:
New bug report received and forwarded.

Your message didn't have a Package: line at the start (in the pseudo-header following the real mail header), or didn't have a psuedo-header at all.

This makes it much harder for us to categorise and deal with your problem report; please ensure that you say which package(s) and version(s) the problem is with next time. Some time in the future the problem reports system may start rejecting such messages.

Full text available.


Report forwarded to debian-devel@pixar.com:
Bug#1437. Full text available.
Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 07:43:01 GMT Wed 01 Nov