Devuan bug report logs - #599
initscripts: typo in /etc/init.d/sendsigs (easy fix)

version graph

Package: initscripts; Maintainer for initscripts is Devuan Developers <devuan-dev@lists.dyne.org>; Source for initscripts is src:sysvinit.

Reported by: Jerome BENOIT <calculus@nylyn.rezozer.net>

Date: Sat, 7 Aug 2021 17:32:01 UTC

Severity: normal

Tags: moreinfo

Found in version 2.93-8+devuan1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to devuan-bugs@lists.dyne.org, Devuan Developers <devuan-dev@lists.dyne.org>:
bug#599; Package initscripts. (Sat, 07 Aug 2021 17:32:01 GMT) (full text, mbox, link).


Acknowledgement sent to Jerome BENOIT <calculus@nylyn.rezozer.net>:
New bug report received and forwarded. Copy sent to Devuan Developers <devuan-dev@lists.dyne.org>. (Sat, 07 Aug 2021 17:32:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.devuan.org (full text, mbox, reply):

From: Jerome BENOIT <calculus@nylyn.rezozer.net>
To: Devuan Bug Tracking System <submit@bugs.devuan.org>
Subject: initscripts: typo in /etc/init.d/sendsigs (easy fix)
Date: Sat, 07 Aug 2021 17:23:17 +0000
Package: initscripts
Version: 2.93-8+devuan1
Severity: normal

Dear Maintainer,

	In the /etc/init.d/sendsigs script, at the beginning of function
	do_stop(), in the for-loop, the in-argument seems to be mispelled:
	the terminal '.d' is missing.

Cheers, and thanks for your work,
Jerome

-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 3 (beowulf)
Release:	3
Codename:	beowulf
Architecture: x86_64

Kernel: Linux 5.10.0-0.bpo.7-amd64 (SMP w/24 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages initscripts depends on:
ii  coreutils       8.30-3
ii  debianutils     4.8.6.1
ii  lsb-base        10.2019051400
ii  mount           2.33.1-0.1+devuan1~beowulf2
ii  sysv-rc         2.93-8+devuan1
ii  sysvinit-utils  2.93-8+devuan1

Versions of packages initscripts recommends:
ii  e2fsprogs  1.44.5-1+deb10u3
ii  psmisc     23.2-1

initscripts suggests no packages.

-- no debconf information

Information forwarded to devuan-bugs@lists.dyne.org, Devuan Developers <devuan-dev@lists.dyne.org>:
bug#599; Package initscripts. (Sat, 07 Aug 2021 18:32:01 GMT) (full text, mbox, link).


Message #8 received at 599@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: Jerome BENOIT <calculus@nylyn.rezozer.net>, 599@bugs.devuan.org
Subject: Re: bug#599: initscripts: typo in /etc/init.d/sendsigs (easy fix)
Date: Sat, 7 Aug 2021 19:23:56 +0100
Control: tags -1 moreinfo

Jerome,

Thanks for this.

On Sat, Aug 07, 2021 at 05:23:17PM +0000, Jerome BENOIT wrote:
> Package: initscripts
> Version: 2.93-8+devuan1
> Severity: normal
> 
> Dear Maintainer,
> 
> 	In the /etc/init.d/sendsigs script, at the beginning of function
> 	do_stop(), in the for-loop, the in-argument seems to be mispelled:
> 	the terminal '.d' is missing.

Hmmm, I am not so sure about this.
 
> do_stop () {
> 	OMITPIDS=
> 
> 	for omitfile in /run/sendsigs.omit; do

I think this is where you think the typo is ^^^^?

Isn't this legacy handling for /run/sendsigs.omit? Admittedly that file is not
present on my beowulf system..

> 		if [ -e $omitfile ]; then

.. so this is skipped.

> 			for pid in $(cat $omitfile); do
> 				OMITPIDS="${OMITPIDS:+$OMITPIDS }-o $pid"
> 			done
> 		fi
> 	done
> 
> 	# Load sendsigs.omit.d/packagename files too, to make it
> 	# possible for scripts that need to modify the list of pids at
> 	# run time without race conditions.
> 	for omitdir in /run/sendsigs.omit.d; do

Files in /run/sendsigs.omit.d/ are handled here.

> 		if [ -d "${omitdir}" ]; then
> 			for pidfile in "${omitdir}/"*; do
> 				[ -f "$pidfile" ] || continue
> 				for pid in $(cat $pidfile); do
> 					OMITPIDS="${OMITPIDS:+$OMITPIDS }-o $pid"
> 				done
> 			done
> 		fi
> 	done

Or have I misunderstood you?

Thanks

Mark

Added tag(s) moreinfo. Request was from Mark Hindley <mark@hindley.org.uk> to 599-submit@bugs.devuan.org. (Sat, 07 Aug 2021 18:32:04 GMT) (full text, mbox, link).


Information forwarded to devuan-bugs@lists.dyne.org, Devuan Developers <devuan-dev@lists.dyne.org>:
bug#599; Package initscripts. (Sat, 07 Aug 2021 21:02:01 GMT) (full text, mbox, link).


Acknowledgement sent to calculus@rezozer.net:
Extra info received and forwarded to list. Copy sent to Devuan Developers <devuan-dev@lists.dyne.org>. (Sat, 07 Aug 2021 21:02:03 GMT) (full text, mbox, link).


Message #15 received at 599@bugs.devuan.org (full text, mbox, reply):

From: Jerome BENOIT <calculus@rezozer.net>
To: 599@bugs.devuan.org
Subject: Re: bug#599: initscripts: typo in /etc/init.d/sendsigs (easy fix)
Date: Sat, 7 Aug 2021 22:51:02 +0200
[Message part 1 (text/plain, inline)]
On Sat, 7 Aug 2021 19:23:56 +0100 Mark Hindley <mark@hindley.org.uk> wrote:
> Control: tags -1 moreinfo

Actually I think that my first fix was actually incorrect.

Please find in attachment the current version, "my" current version, and
the corresponding patch.

I think that otherwise these loops make no sense.

Cheers,
Jerome
[599_bugs_devuan_org-sendsigs.patch (text/x-patch, attachment)]
[sendsigs (text/plain, attachment)]
[sendsigs-dpkg-dist-with_typo (text/plain, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to devuan-bugs@lists.dyne.org, Devuan Developers <devuan-dev@lists.dyne.org>:
bug#599; Package initscripts. (Sat, 07 Aug 2021 21:02:06 GMT) (full text, mbox, link).


Acknowledgement sent to calculus@rezozer.net:
Extra info received and forwarded to list. Copy sent to Devuan Developers <devuan-dev@lists.dyne.org>. (Sat, 07 Aug 2021 21:02:08 GMT) (full text, mbox, link).


Information forwarded to devuan-bugs@lists.dyne.org, Devuan Developers <devuan-dev@lists.dyne.org>:
bug#599; Package initscripts. (Sun, 08 Aug 2021 06:52:02 GMT) (full text, mbox, link).


Message #23 received at 599@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: calculus@rezozer.net, 599@bugs.devuan.org
Subject: Re: bug#599: initscripts: typo in /etc/init.d/sendsigs (easy fix)
Date: Sun, 8 Aug 2021 07:47:11 +0100
On Sat, Aug 07, 2021 at 10:51:02PM +0200, Jerome BENOIT wrote:
> On Sat, 7 Aug 2021 19:23:56 +0100 Mark Hindley <mark@hindley.org.uk> wrote:
> > Control: tags -1 moreinfo
> 
> Actually I think that my first fix was actually incorrect.
> 
> Please find in attachment the current version, "my" current version, and
> the corresponding patch.
> 
> I think that otherwise these loops make no sense.

I am still not convinced by this. Read /usr/share/doc/initscripts/README.Debian
to see an explanation of the intented behaviour. In particular

   Process id's listed in /run/sendsigs.omit, or any file in the
   /run/sendsigs.omit.d/ directory will be omitted by sendsigs.

I don't see any discrepancy between the existing distributed code and that
stated behaviour. What am I missing?

Thanks

Mark

Information forwarded to devuan-bugs@lists.dyne.org, Devuan Developers <devuan-dev@lists.dyne.org>:
bug#599; Package initscripts. (Sun, 08 Aug 2021 07:02:02 GMT) (full text, mbox, link).


Message #26 received at 599@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: calculus@rezozer.net, 599@bugs.devuan.org
Subject: Re: bug#599: initscripts: typo in /etc/init.d/sendsigs (easy fix)
Date: Sun, 8 Aug 2021 07:53:37 +0100
On Sun, Aug 08, 2021 at 07:47:11AM +0100, Mark Hindley wrote:
> I don't see any discrepancy between the existing distributed code and that
> stated behaviour. What am I missing?

I should have added that I agree the for loops are not strictly necessary. The
appear left over from when /lib/init/rw was also used as well as /run. See
commit a7469405b3a2d25c0f80916e912a62fcbbe433e7 for the removal of that which
still left the outer for loops intact. But I still don't see a bug.

Mark

Information forwarded to devuan-bugs@lists.dyne.org, Devuan Developers <devuan-dev@lists.dyne.org>:
bug#599; Package initscripts. (Sun, 08 Aug 2021 12:42:01 GMT) (full text, mbox, link).


Acknowledgement sent to calculus@rezozer.net:
Extra info received and forwarded to list. Copy sent to Devuan Developers <devuan-dev@lists.dyne.org>. (Sun, 08 Aug 2021 12:42:05 GMT) (full text, mbox, link).


Message #31 received at 599@bugs.devuan.org (full text, mbox, reply):

From: Jerome BENOIT <calculus@rezozer.net>
To: 599@bugs.devuan.org
Subject: Re: bug#599: initscripts: typo in /etc/init.d/sendsigs (easy fix)
Date: Sun, 8 Aug 2021 14:36:57 +0200
[Message part 1 (text/plain, inline)]
Hello Mark, thanks for pointing me to /usr/share/doc/initscripts/README.Debian .
I am sorry I could not find the commit you reference to.

Indeed the current script fulfills the policy in the above README.Debian .

I would however make the minor change in the first loop [ -e $omitfile ] to [ -f $omitfile ] to make clearer
that a file is expected (see patch 599_bugs_devuan_org-sendsigs-filetest.patch )

Having said that I think that making loops over one element is rather confusing
and it deserves some explanation if it must be kept it that way
(see patch 599_bugs_devuan_org-sendsigs-lessconfusing.patch ).

Cheers,
Jerome

-- 
Jerome BENOIT | calculus+at-rezozer^dot*net
https://qa.debian.org/developer.php?login=calculus@rezozer.net
AE28 AE15 710D FF1D 87E5  A762 3F92 19A6 7F36 C68B
[599_bugs_devuan_org-sendsigs-filetest.patch (text/x-patch, attachment)]
[599_bugs_devuan_org-sendsigs-lessconfusing.patch (text/x-patch, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to devuan-bugs@lists.dyne.org, Devuan Developers <devuan-dev@lists.dyne.org>:
bug#599; Package initscripts. (Sun, 08 Aug 2021 12:42:07 GMT) (full text, mbox, link).


Acknowledgement sent to calculus@rezozer.net:
Extra info received and forwarded to list. Copy sent to Devuan Developers <devuan-dev@lists.dyne.org>. (Sun, 08 Aug 2021 12:42:09 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Mon Nov 25 02:29:45 2024;