hotplug: /etc/init.d/hotplug stopped working because 'unset' fails

Bug #13323 reported by Debian Bug Importer
4
Affects Status Importance Assigned to Milestone
hotplug (Debian)
Fix Released
Unknown
hotplug (Ubuntu)
Invalid
High
Unassigned

Bug Description

Automatically imported from Debian bug report #297137 http://bugs.debian.org/297137

Revision history for this message
In , Marco d'Itri (md) wrote : severity of 297137 is normal

# Automatically generated email from bts, devscripts version 2.8.10
severity 297137 normal

Revision history for this message
In , Marco d'Itri (md) wrote : Re: Bug#297137: hotplug: /etc/init.d/hotplug stopped working because 'unset' fails

tag 297137 unreproducible moreinfo
thanks

On Feb 27, Jan Echternach <email address hidden> wrote:

> I've tracked it down to an 'unset' call failing, apparently because the

I tested this script with bash, dash and even posh, and it works fine.

#!/bin/sh -e
echo a
unset no_such_variable1 no_such_variable2
echo b

Do you want to try again?

--
ciao,
Marco

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #297137 http://bugs.debian.org/297137

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Sun, 27 Feb 2005 13:03:11 +0100
From: Jan Echternach <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: hotplug: /etc/init.d/hotplug stopped working because 'unset' fails

Package: hotplug
Version: 0.0.20040329-17
Severity: grave
Tags: patch
Justification: renders package unusable

"/etc/init.d/hotplug start" aborts almost immediately, it doesn't even
print the "Starting hotplug subsystem" message. I didn't notice this
until I tried to use an USB device and found that no USB modules
were loaded. Other modules like hw_random had not been loaded either.

I've tracked it down to an 'unset' call failing, apparently because the
variable to be unset hasn't been set in the first place. This simple
patch made it work again:

--- hotplug-orig Wed Feb 16 01:40:28 2005
+++ hotplug Sun Feb 27 12:23:29 2005
@@ -24,7 +24,7 @@
 # $prune_output (the list with the elements removed) and $prune_discard
 # (the list of the elements discarded).
 prune() {
- unset prune_output prune_discard
+ unset prune_output prune_discard || :
     local discard

     for x in $1; do
@@ -55,7 +55,7 @@
     # Append it to the new list, knowing that dependancies are satisfied.
     echo "$sorted_list $prune_discard"

- unset prune_output prune_discard
+ unset prune_output prune_discard || :
 }

 quiet_printk() {
@@ -132,7 +132,7 @@
     ;;

 status)
- unset QUIET
+ unset QUIET || :
     run_rcs $1 "Hotplug status"
     ;;

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux ogar 2.6.10-1-686 #1 Tue Jan 18 04:34:19 EST 2005 i686
Locale: LANG=C, LC_CTYPE=de_DE

Versions of packages hotplug depends on:
ii debconf 1.4.46 Debian configuration management sy
ii grep 2.5.1.ds1-4 GNU grep, egrep and fgrep
ii module-init-tools 3.2-pre1-2 tools for managing Linux kernel mo
ii modutils 2.4.26-1.2 Linux module utilities
ii procps 1:2.0.7-8.woody1 The /proc file system utilities.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Sun, 27 Feb 2005 13:25:45 +0100
From: Marco d'Itri <email address hidden>
To: <email address hidden>
Subject: severity of 297137 is normal

# Automatically generated email from bts, devscripts version 2.8.10
severity 297137 normal

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sun, 27 Feb 2005 13:34:20 +0100
From: <email address hidden> (Marco d'Itri)
To: Jan Echternach <email address hidden>, <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#297137: hotplug: /etc/init.d/hotplug stopped working because 'unset' fails

--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

tag 297137 unreproducible moreinfo
thanks

On Feb 27, Jan Echternach <email address hidden> wrote:

> I've tracked it down to an 'unset' call failing, apparently because the

I tested this script with bash, dash and even posh, and it works fine.

#!/bin/sh -e
echo a
unset no_such_variable1 no_such_variable2
echo b

Do you want to try again?

--=20
ciao,
Marco

--KsGdsel6WgEHnImy
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCIb5MFGfw2OHuP7ERApAsAJ90mUafFby35VI+aUExap3ioXDWQACcCwRj
N5yUMYppmvJWIVNnL+snhiw=
=rgDV
-----END PGP SIGNATURE-----

--KsGdsel6WgEHnImy--

Revision history for this message
In , Jan Echternach (jan-goneko) wrote :

On Sun, Feb 27, 2005 at 01:34:20PM +0100, Marco d'Itri wrote:
> I tested this script with bash, dash and even posh, and it works fine.
>
> #!/bin/sh -e
> echo a
> unset no_such_variable1 no_such_variable2
> echo b

jan@ogar:~$ ./testunset.sh
a
jan@ogar:~$ dpkg -S /bin/sh
bash: /bin/sh
jan@ogar:~$ dpkg -l bash
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii bash 2.05a-11 The GNU Bourne Again SHell

After upgrading bash to bash/unstable:

jan@ogar:~$ ./testunset.sh
a
b
jan@ogar:~$ dpkg -l bash
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii bash 3.0-14 The GNU Bourne Again SHell

Looks like a bug in old bash versions since SUSv2 says

  "Unsetting a variable or function that was not previously set is not
  considered an error and will not cause the shell to abort."

--
Jan fortune: can't load library '/libc.so.4'
                                      No such library.

Revision history for this message
In , Marco d'Itri (md) wrote :

On Feb 27, Jan Echternach <email address hidden> wrote:

> Looks like a bug in old bash versions since SUSv2 says
Since this is not reproducible with the version of bash currently in
testing, I'm closing the bug.

--
ciao,
Marco

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sun, 27 Feb 2005 15:22:08 +0100
From: <email address hidden> (Jan Echternach)
To: <email address hidden>
Subject: Re: Bug#297137: hotplug: /etc/init.d/hotplug stopped working because 'unset' fails

On Sun, Feb 27, 2005 at 01:34:20PM +0100, Marco d'Itri wrote:
> I tested this script with bash, dash and even posh, and it works fine.
>
> #!/bin/sh -e
> echo a
> unset no_such_variable1 no_such_variable2
> echo b

jan@ogar:~$ ./testunset.sh
a
jan@ogar:~$ dpkg -S /bin/sh
bash: /bin/sh
jan@ogar:~$ dpkg -l bash
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii bash 2.05a-11 The GNU Bourne Again SHell

After upgrading bash to bash/unstable:

jan@ogar:~$ ./testunset.sh
a
b
jan@ogar:~$ dpkg -l bash
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii bash 3.0-14 The GNU Bourne Again SHell

Looks like a bug in old bash versions since SUSv2 says

  "Unsetting a variable or function that was not previously set is not
  considered an error and will not cause the shell to abort."

--
Jan fortune: can't load library '/libc.so.4'
                                      No such library.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sun, 27 Feb 2005 15:58:41 +0100
From: <email address hidden> (Marco d'Itri)
To: Jan Echternach <email address hidden>, <email address hidden>
Subject: Re: Bug#297137: hotplug: /etc/init.d/hotplug stopped working because 'unset' fails

--UFHRwCdBEJvubb2X
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Feb 27, Jan Echternach <email address hidden> wrote:

> Looks like a bug in old bash versions since SUSv2 says
Since this is not reproducible with the version of bash currently in
testing, I'm closing the bug.

--=20
ciao,
Marco

--UFHRwCdBEJvubb2X
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCIeAhFGfw2OHuP7ERAjCBAJwPu5pNetEM2KAxuz4rH5Z1vTmnigCglCHD
p50WjWrPCgqFyABtf0UTUng=
=CumM
-----END PGP SIGNATURE-----

--UFHRwCdBEJvubb2X--

Revision history for this message
Matt Zimmerman (mdz) wrote :

old, fixed bug in bash

Revision history for this message
In , Marco d'Itri (md) wrote : Re: Bug#300113: hotplug: Hotplug system does not start.

severity 297137 normal
tag 297137 sid sarge moreinfo
tag 297137 must conflict with bash << 2.05-0beta1
thanks

On Mar 17, Braun Gabor <email address hidden> wrote:

> (2) uses "unset" to unset variables which are not known to be set.
> The unset command returns non-zero when applied to a
> read-only or unset variable (see the bash man page).
Not my version of bash (nor dash, nor posh), and the man page agrees:

    The exit status is true unless a name is readonly.

Looks like this was changed in bash 2.05b-beta1. Can you confirm that
your version is older?

--
ciao,
Marco

Revision history for this message
In , Marco d'Itri (md) wrote : retitle 297137 to must conflict with bash << 2.05-0beta1

# Automatically generated email from bts, devscripts version 2.8.10
retitle 297137 must conflict with bash << 2.05-0beta1

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 17 Mar 2005 20:17:18 +0100
From: <email address hidden> (Marco d'Itri)
To: Braun Gabor <email address hidden>, <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#300113: hotplug: Hotplug system does not start.

--0OAP2g/MAC+5xKAE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

severity 297137 normal
tag 297137 sid sarge moreinfo
tag 297137 must conflict with bash << 2.05-0beta1
thanks

On Mar 17, Braun Gabor <email address hidden> wrote:

> (2) uses "unset" to unset variables which are not known to be set.
> The unset command returns non-zero when applied to a
> read-only or unset variable (see the bash man page).
Not my version of bash (nor dash, nor posh), and the man page agrees:

    The exit status is true unless a name is readonly.

Looks like this was changed in bash 2.05b-beta1. Can you confirm that
your version is older?

--=20
ciao,
Marco

--0OAP2g/MAC+5xKAE
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCOde+FGfw2OHuP7ERAvN+AKCm/1UISXWV7WZOIDLcjopL9EFdXgCdHNvO
uGsgqos0eYe+WCVykWJpgDo=
=g5d/
-----END PGP SIGNATURE-----

--0OAP2g/MAC+5xKAE--

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Thu, 17 Mar 2005 20:34:19 +0100
From: Marco d'Itri <email address hidden>
To: <email address hidden>
Subject: retitle 297137 to must conflict with bash << 2.05-0beta1

# Automatically generated email from bts, devscripts version 2.8.10
retitle 297137 must conflict with bash << 2.05-0beta1

Revision history for this message
In , Marco d'Itri (md) wrote : tagging 300113

# Automatically generated email from bts, devscripts version 2.8.10
tags 300113 pending
retitle 297137 hotplug must conflict with bash << 2.05-0beta1

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Sat, 19 Mar 2005 23:27:00 +0100
From: Marco d'Itri <email address hidden>
To: <email address hidden>
Subject: tagging 300113

# Automatically generated email from bts, devscripts version 2.8.10
tags 300113 pending
retitle 297137 hotplug must conflict with bash << 2.05-0beta1

Revision history for this message
In , Aurelien Jarno (aurel32) wrote : Bug#297137: fixed in openclipart 0.10+dfsg-4

Source: openclipart
Source-Version: 0.10+dfsg-4

We believe that the bug you reported is fixed in the latest version of
openclipart, which is due to be installed in the Debian FTP archive:

openclipart-openoffice.org_0.10+dfsg-4_all.deb
  to pool/main/o/openclipart/openclipart-openoffice.org_0.10+dfsg-4_all.deb
openclipart-png_0.10+dfsg-4_all.deb
  to pool/main/o/openclipart/openclipart-png_0.10+dfsg-4_all.deb
openclipart-svg_0.10+dfsg-4_all.deb
  to pool/main/o/openclipart/openclipart-svg_0.10+dfsg-4_all.deb
openclipart_0.10+dfsg-4.diff.gz
  to pool/main/o/openclipart/openclipart_0.10+dfsg-4.diff.gz
openclipart_0.10+dfsg-4.dsc
  to pool/main/o/openclipart/openclipart_0.10+dfsg-4.dsc
openclipart_0.10+dfsg-4_all.deb
  to pool/main/o/openclipart/openclipart_0.10+dfsg-4_all.deb

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aurelien Jarno <email address hidden> (supplier of updated openclipart package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 5 Mar 2005 01:17:08 +0100
Source: openclipart
Binary: openclipart-svg openclipart-openoffice.org openclipart-png openclipart
Architecture: source all
Version: 0.10+dfsg-4
Distribution: unstable
Urgency: low
Maintainer: Aurelien Jarno <email address hidden>
Changed-By: Aurelien Jarno <email address hidden>
Description:
 openclipart - Open Clip Art Library
 openclipart-openoffice.org - clip art for OpenOffice.org gallery
 openclipart-png - clip art in PNG format
 openclipart-svg - clip art in SVG format
Closes: 297137
Changes:
 openclipart (0.10+dfsg-4) unstable; urgency=low
 .
   * Suggest some more SVG apps (closes: bug#297137).
Files:
 b609000894f24525d3c63681385124b8 675 graphics extra openclipart_0.10+dfsg-4.dsc
 08336f8924efeac5c67ce1e21a6009a3 3679682 graphics extra openclipart_0.10+dfsg-4.diff.gz
 984b1e94f8b148d2f3d6bd144d069904 3496 graphics extra openclipart_0.10+dfsg-4_all.deb
 2466682c2bb49b81f6a2b90c4908f64a 13296998 graphics extra openclipart-svg_0.10+dfsg-4_all.deb
 0ddbc07d622cb3be215464e9aee18038 8408702 graphics extra openclipart-png_0.10+dfsg-4_all.deb
 5056b14b801b2a9389066da7b85ccde9 3508150 graphics extra openclipart-openoffice.org_0.10+dfsg-4_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCKPshw3ao2vG823MRAoRhAKCGtkTCX/o+c1Rd8z09JWc5/MnJsACdE4bT
sWwmRc3HoiBu24JZmbsBX0w=
=1gA6
-----END PGP SIGNATURE-----

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Sun, 20 Mar 2005 12:16:53 -0500
From: Aurelien Jarno <email address hidden>
To: <email address hidden>
Subject: Bug#297137: fixed in openclipart 0.10+dfsg-4

Source: openclipart
Source-Version: 0.10+dfsg-4

We believe that the bug you reported is fixed in the latest version of
openclipart, which is due to be installed in the Debian FTP archive:

openclipart-openoffice.org_0.10+dfsg-4_all.deb
  to pool/main/o/openclipart/openclipart-openoffice.org_0.10+dfsg-4_all.deb
openclipart-png_0.10+dfsg-4_all.deb
  to pool/main/o/openclipart/openclipart-png_0.10+dfsg-4_all.deb
openclipart-svg_0.10+dfsg-4_all.deb
  to pool/main/o/openclipart/openclipart-svg_0.10+dfsg-4_all.deb
openclipart_0.10+dfsg-4.diff.gz
  to pool/main/o/openclipart/openclipart_0.10+dfsg-4.diff.gz
openclipart_0.10+dfsg-4.dsc
  to pool/main/o/openclipart/openclipart_0.10+dfsg-4.dsc
openclipart_0.10+dfsg-4_all.deb
  to pool/main/o/openclipart/openclipart_0.10+dfsg-4_all.deb

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aurelien Jarno <email address hidden> (supplier of updated openclipart package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 5 Mar 2005 01:17:08 +0100
Source: openclipart
Binary: openclipart-svg openclipart-openoffice.org openclipart-png openclipart
Architecture: source all
Version: 0.10+dfsg-4
Distribution: unstable
Urgency: low
Maintainer: Aurelien Jarno <email address hidden>
Changed-By: Aurelien Jarno <email address hidden>
Description:
 openclipart - Open Clip Art Library
 openclipart-openoffice.org - clip art for OpenOffice.org gallery
 openclipart-png - clip art in PNG format
 openclipart-svg - clip art in SVG format
Closes: 297137
Changes:
 openclipart (0.10+dfsg-4) unstable; urgency=low
 .
   * Suggest some more SVG apps (closes: bug#297137).
Files:
 b609000894f24525d3c63681385124b8 675 graphics extra openclipart_0.10+dfsg-4.dsc
 08336f8924efeac5c67ce1e21a6009a3 3679682 graphics extra openclipart_0.10+dfsg-4.diff.gz
 984b1e94f8b148d2f3d6bd144d069904 3496 graphics extra openclipart_0.10+dfsg-4_all.deb
 2466682c2bb49b81f6a2b90c4908f64a 13296998 graphics extra openclipart-svg_0.10+dfsg-4_all.deb
 0ddbc07d622cb3be215464e9aee18038 8408702 graphics extra openclipart-png_0.10+dfsg-4_all.deb
 5056b14b801b2a9389066da7b85ccde9 3508150 graphics extra openclipart-openoffice.org_0.10+dfsg-4_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCKPshw3ao2vG823MRAoRhAKCGtkTCX/o+c1Rd8z09JWc5/MnJsACdE4bT
sWwmRc3HoiBu24JZmbsBX0w=
=1gA6
-----END PGP SIGNATURE-----

Changed in hotplug:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.