Debian bug report logs - #1079, boring messages


Message sent to debian-devel@pixar.com:


Subject: Bug#1079: Scripts in /etc/init.d cannot be called directly
Reply-To: Swen Thuemmler <swen@uni-paderborn.de>, debian-bugs@pixar.com
Resent-To: debian-devel@pixar.com
Resent-From: Swen Thuemmler <swen@uni-paderborn.de>
Resent-Sender: iwj10@cus.cam.ac.uk
Resent-Date: Fri, 07 Jul 1995 10:18:03 GMT
Resent-Message-ID: <debian-bugs-handler.1079.070710042523803@pixar.com>
X-Debian-PR-Package: sysvinit
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Fri, 07 Jul 1995 10:18:03 GMT
Received: with rfc822 via encapsulated-mail id 070710042523803;
          Fri, 07 Jul 1995 10:04:25 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sUAFd-0005nTC; Fri, 7 Jul 95 03:03 PDT
Received: from uni-paderborn.de by pixar.com with SMTP id AA04918
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Fri, 7 Jul 1995 03:00:20 -0700
Received: from linux.uni-paderborn.de (linux.uni-paderborn.de [131.234.12.32]) by uni-paderborn.de (8.6.12/8.6.12) with ESMTP id MAA04538 for <debian-bugs@pixar.com>; Fri, 7 Jul 1995 12:01:43 +0200
Received: (swen@localhost) by linux.uni-paderborn.de (8.6.12/client-pb) id MAA00350; Fri, 7 Jul 1995 12:01:42 +0200
Date: Fri, 7 Jul 1995 12:01:41 +0200 (MET DST)
From: Swen Thuemmler <swen@uni-paderborn.de>
To: debian-bugs@pixar.com
Message-Id: <Pine.LNX.3.91.950707115605.312B-100000@linux.uni-paderborn.de>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Package: sysvinit
Version: 2.56-5

In some scripts in /etc/init.d there seems to be a bug. I think it is
intented to be able to call the scripts directly by e.g.

$ /etc/init.d/skeleton start
Usage: /etc/init.d/skeleton {start|stop}
$

The problem is the line

. /etc/init.d/functions

which changes the Parameter $1

Suggested fix:

Save the parameter before sourcing functions, e.g.:

...
SAVEARG=$1
. /etc/init.d/functions
case "$SAVEARG" in
...

Greetings, Swen



Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Swen Thuemmler <swen@uni-paderborn.de>
Subject: Bug#1079: Acknowledgement (was: Scripts in /etc/init.d cannot be called directly)
In-Reply-To: <Pine.LNX.3.91.950707115605.312B-100000@linux.uni-paderborn.de>
References: <Pine.LNX.3.91.950707115605.312B-100000@linux.uni-paderborn.de>

Thank you for the problem report you have sent regarding Debian GNU/Linux.
This is an automatically generated reply, to let you know your message has
been received.  It is being forwarded to the developers' mailing list for
their attention; they will reply in due course.

If you wish to submit further information on your problem, please send
it to debian-bugs@pixar.com, but please ensure that the Subject
line of your message starts with "Bug#1079" or "Re: Bug#1079" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#1079: Scripts in /etc/init.d cannot be called directly
Reply-To: iwj10@cus.cam.ac.uk (Ian Jackson), debian-bugs@pixar.com
Resent-To: debian-devel@pixar.com
Resent-From: iwj10@cus.cam.ac.uk (Ian Jackson)
Resent-Sender: iwj10@cus.cam.ac.uk
Resent-Date: Fri, 07 Jul 1995 19:48:02 GMT
Resent-Message-ID: <debian-bugs-handler.1079.07071942528211@pixar.com>
X-Debian-PR-Package: sysvinit
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Fri, 07 Jul 1995 19:48:02 GMT
Received: with rfc822 via encapsulated-mail id 07071942528211;
          Fri, 07 Jul 1995 19:42:52 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sUJHZ-0006ZUC; Fri, 7 Jul 95 12:41 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA03322
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Fri, 7 Jul 1995 12:40:19 -0700
Received: by bootes.cus.cam.ac.uk
	(Smail-3.1.29.0 #36) id m0sUJHW-000BznC; Fri, 7 Jul 95 20:41 BST
Received: by chiark
	id <m0sUJ6t-0000YFZ@chiark.al.cl.cam.ac.uk>
	(Debian /\oo/\ Smail3.1.29.1 #29.32); Fri, 7 Jul 95 20:30 BST
Message-Id: <m0sUJ6t-0000YFZ@chiark.al.cl.cam.ac.uk>
Date: Fri, 7 Jul 95 20:30 BST
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: debian-bugs@pixar.com

Swen Thuemmler writes ("Bug#1079: Scripts in /etc/init.d cannot be called directly"):
> [...]
> In some scripts in /etc/init.d there seems to be a bug. I think it is
> intented to be able to call the scripts directly by e.g.
> [...]
> The problem is the line
> . /etc/init.d/functions
> which changes the Parameter $1

There is little reason for files in /etc/init.d to use the `functions'
file.  The file `functions' on my system contains

* code to set PREVLEVEL and RUNLEVEL based on the output of the
`runlevel' command.  The only scripts in /etc/init.d that use it are
`rc' and `powerfail' - arguably this could be done by using `runlevel'
directly in those scripts.

* shell functions `daemon' and `stop' that do a half-baked version of
`start-stop-daemon'.  Scripts should use `start-stop-daemon' instead;
the `daemon' and `stop' functions are not reliable.  There are no
scripts in my /etc/init.d directory that use `daemon' or `stop'.

I suggest that the file `functions' be removed.

Ian.


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: iwj10@cus.cam.ac.uk (Ian Jackson)
Subject: Bug#1079: Info received (was Bug#1079: Scripts in /etc/init.d cannot be called directly)
In-Reply-To: <m0sUJ6t-0000YFZ@chiark.al.cl.cam.ac.uk>
References: <m0sUJ6t-0000YFZ@chiark.al.cl.cam.ac.uk>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue to submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#1079" or "Re: Bug#1079" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 07:43:01 GMT Wed 01 Nov