Debian bug report logs - #1499

Package: sysvinit; Reported by: CD Rasmussen <cdr@sme.siemens.com>; 34 days old.

Message received at debian-bugs:


From debian.org!imurdock Thu Sep 28 15:17:05 1995
Return-Path: <imurdock@debian.org>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0syRGK-000GetC; Thu, 28 Sep 95 15:17 PDT
Received: from imagine.imaginit.com by pixar.com with SMTP id AA24360
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 28 Sep 1995 15:16:44 -0700
Received: by imagine.imaginit.com
	id <m0syRKO-000015C@imagine.imaginit.com>
	(Debian /\oo/\ Smail3.1.29.1 #29.33); Thu, 28 Sep 95 17:21 EST
Message-Id: <m0syRKO-000015C@imagine.imaginit.com>
Date: Thu, 28 Sep 95 17:21 EST
From: Ian Murdock <imurdock@debian.org>
To: debian-bugs@pixar.com
In-Reply-To: <m0syPYj-000GeDC@mongo.pixar.com> (message from Bruce Perens on
	Thu, 28 Sep 1995 13:27:57 -0700)
Subject: Re: Bug#1499:

   Date: Thu, 28 Sep 1995 13:27:57 -0700
   From: Bruce Perens <bruce@Pixar.com>

   iwj10@cus.cam.ac.uk said:
   > Can't we retire this thing ?

   Yeah, but not _now_. After the release.

I'm not sure that any packages use it, but many packages source it.

In the next release of sysvinit, Bruce, you should remove the

   . /etc/init.d/functions

line from the top of the /etc/init.d/skeleton script.  That will
result in it not appearing in any new scripts.  At some point after
the release, we can mandate that all packages be modified not to use
the /etc/init.d/function script.  Then, after all packages have been
fixed, we can remove /etc/init.d/functions.

As Bruce said, however, this should happen after the release.

(In the meantime, /etc/init.d/functions could be modified to do
nothing, so it doesn't disable exection of the scripts from the
shell, as the current script does.)

Acknowledgement sent to Ian Murdock <imurdock@debian.org>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1499; Package sysvinit. Full text available.

Message received at debian-bugs:


From sme.siemens.com!cdr Thu Sep 28 13:29:03 1995
Return-Path: <cdr@sme.siemens.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0syPZm-000GeDC; Thu, 28 Sep 95 13:29 PDT
Received: from scr.siemens.com by pixar.com with SMTP id AA18037
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 28 Sep 1995 13:28:43 -0700
Received: from cons.mountain ([129.73.58.158]) by scr.siemens.com (8.6.10/8.6.6) with SMTP id QAA03515; Thu, 28 Sep 1995 16:28:10 -0400
Received: from localhost by cons.mountain (4.1/SMI-4.1)
	id AA07109; Thu, 28 Sep 95 16:25:30 EDT
Message-Id: <9509282025.AA07109@cons.mountain>
To: Ian Jackson <iwj10@cus.cam.ac.uk>, debian-bugs@pixar.com
Reply-To: cdr@sme.siemens.com
Subject: Re: Bug#1499: init.d/functions problems
In-Reply-To: Your message of "Thu, 28 Sep 1995 20:01:00 -0000."
             <m0syODS-0002ZJZ@chiark.al.cl.cam.ac.uk> 
Date: Thu, 28 Sep 1995 16:25:29 -0400
From: CD Rasmussen <cdr@sme.siemens.com>

I like Ian Jackson's idea of ditching the functions file better than
my patch.  I was wondering who used those calls but figured it was one
of those requisite Debian things.

Costa

Acknowledgement sent to cdr@sme.siemens.com:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1499; Package sysvinit. Full text available.

Message received at debian-bugs:


From pixar.com!bruce Thu Sep 28 13:29:02 1995
Return-Path: <bruce@pixar.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0syPZm-000GfWC; Thu, 28 Sep 95 13:29 PDT
Received: from mongo.pixar.com by pixar.com with SMTP id AA18039
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 28 Sep 1995 13:28:43 -0700
Received: by mongo.pixar.com (Smail3.1.28.1 #15)
	id m0syPYj-000GeDC; Thu, 28 Sep 95 13:27 PDT
Message-Id: <m0syPYj-000GeDC@mongo.pixar.com>
X-Mailer: exmh version 1.6.2 7/18/95
To: Ian Jackson <iwj10@cus.cam.ac.uk>, debian-bugs@Pixar.com
Cc: bruce@Pixar.com
Subject: Re: Bug#1499: 
In-Reply-To: Your message of "Thu, 28 Sep 1995 20:01:00 PDT."
             <m0syODS-0002ZJZ@chiark.al.cl.cam.ac.uk> 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Thu, 28 Sep 1995 13:27:57 -0700
From: Bruce Perens <bruce@Pixar.com>


iwj10@cus.cam.ac.uk said:
> Can't we retire this thing ?

Yeah, but not _now_. After the release.

	Bruce

--
-- Attention Radio Amateurs: For information on "Linux for Hams",
-- read the WWW page http://www.hams.com/LinuxForHams, 
-- or e-mail the word "help" to info@hams.com


Acknowledgement sent to Bruce Perens <bruce@Pixar.com>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1499; Package sysvinit. Full text available.

Message received at debian-bugs:


From cus.cam.ac.uk!iwj10 Thu Sep 28 12:43:53 1995
Return-Path: <iwj10@cus.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0syOs5-0006L6C; Thu, 28 Sep 95 12:43 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA15623
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 28 Sep 1995 12:43:34 -0700
Received: by bootes.cus.cam.ac.uk 
	(Smail-3.1.29.0 #36) id m0syOry-000BzdC; Thu, 28 Sep 95 20:43 BST
Received: by chiark
	id <m0syODS-0002ZJZ@chiark.al.cl.cam.ac.uk>
	(Debian /\oo/\ Smail3.1.29.1 #29.33); Thu, 28 Sep 95 20:01 BST
Message-Id: <m0syODS-0002ZJZ@chiark.al.cl.cam.ac.uk>
Date: Thu, 28 Sep 95 20:01 BST
From: Ian Jackson <iwj10@cus.cam.ac.uk>
To: debian-bugs@pixar.com
Subject: Re: Bug#1499: 

CD Rasmussen writes ("Bug#1499: "):
> Package: sysvinit
> Version: 2.56-6
> 
> Problem Description:
> 
>    When I try to run "/etc/init.d/xdm stop" I get a usage statement.
>    This is when xdm is already running.
> 
>    Most of the init.d scripts source the init.d/functions file which
>    would normally be no problem but the first thing in the file is
>    code to set the RUNLEVEL variables by using the set command.  This
>    swallows any command line arguments for the script.

Why does /etc/init.d/xdm need init.d/functions ?  If it really does
there is almost certainly something wrong with it.  The xdm script
should be changed not to use init.d/functions.

See my earlier comments about another package having problems with
init.d/functions.

Can't we retire this thing ?

Ian.

Acknowledgement sent to Ian Jackson <iwj10@cus.cam.ac.uk>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1499; Package sysvinit. Full text available.

Message received at debian-bugs:


From sme.siemens.com!cdr Wed Sep 27 19:27:26 1995
Return-Path: <cdr@sme.siemens.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sy8h4-0006fFC; Wed, 27 Sep 95 19:27 PDT
Received: from scr.siemens.com by pixar.com with SMTP id AA01093
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Wed, 27 Sep 1995 19:27:07 -0700
Received: from cons.mountain ([129.73.58.158]) by scr.siemens.com (8.6.10/8.6.6) with SMTP id WAA01629 for <debian-bugs@pixar.com>; Wed, 27 Sep 1995 22:27:15 -0400
Received: from localhost by cons.mountain (4.1/SMI-4.1)
	id AA05433; Wed, 27 Sep 95 22:24:34 EDT
Message-Id: <9509280224.AA05433@cons.mountain>
To: debian-bugs@pixar.com
Subject: 
Date: Wed, 27 Sep 1995 22:24:34 -0400
From: CD Rasmussen <cdr@sme.siemens.com>

Package: sysvinit
Version: 2.56-6

Problem Description:

   When I try to run "/etc/init.d/xdm stop" I get a usage statement.
   This is when xdm is already running.

   Most of the init.d scripts source the init.d/functions file which
   would normally be no problem but the first thing in the file is
   code to set the RUNLEVEL variables by using the set command.  This
   swallows any command line arguments for the script.

   The best way I can think of that does not cause editing of every
   file that includes init.d/functions is to make the code not use set
   to parse the output from /sbin/runlevel.  This can easily be done
   by making use of a local evaluation for a function call.  Also the
   if statement around the assignment is not needed since the :=
   operator does that logic on a per variable basis.

Here is a tested patch.

========== snip ====================
--- functions-orig	Sat Feb 25 16:20:35 1995
+++ functions	Wed Sep 27 17:57:57 1995
@@ -13,16 +13,13 @@
   export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
 
   # Set RUNLEVEL and PREVLEVEL
-  if [ "$RUNLEVEL" = "" ]
-  then
-	levels=`runlevel`
-	if [ $? = 0 ]
-	then
-		eval set $levels
-		PREVLEVEL=$1
-		RUNLEVEL=$2
-	fi
-  fi
+  get_runlevel()
+  {
+    : ${PREVLEVEL:=$1}
+    : ${RUNLEVEL=$2}
+  }
+
+  get_runlevel `/sbin/runlevel`
 
   # A function to start a program.
   daemon() {
========== snip ====================
   
Hope this helps,
  Costa
--
  Constantine Rasmussen      508-750-7500 x7020     cdr@sme.siemens.com

Acknowledgement sent to CD Rasmussen <cdr@sme.siemens.com>:
New bug report received and forwarded. Full text available.
Report forwarded to debian-devel@pixar.com:
Bug#1499; Package sysvinit. 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