hotplug: Hotplug system does not start.

Bug #14145 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 #300113 http://bugs.debian.org/300113

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

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

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

Message-ID: <email address hidden>
Date: Thu, 17 Mar 2005 19:23:40 +0100
From: <email address hidden> (Braun Gabor)
To: <email address hidden>
Subject: hotplug: Hotplug system does not start.

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

At boot time nothing hotplug related appears on the screen, not even
something like "Starting hotplug subsystem". When inserting a
pendrive it is unmountable (/dev/sda1 does not exist).
(This is the only thing I use hotplug for.)

The init script /etc/init.d/hotplug seems to have no effect:
when called with no argument it prints a usage message
(as expected), when called
with 'restart' or 'status' it does not print anything and nothing
seems to happen. The pendrive remains unmountable.

I think the problem is that the init script /etc/init.d/hotplug
  (1) runs under "sh -e" so it exits immediately when a command
      returns non-zero
      (as described in the output of 'sh -c "help set"');
  (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).

For example, when the prune command is first called, it immediately
unsets prune_discard and prune_output which were not set before.
Also when invoking the script with argument "status" the QUIET
variable is unset though it may not be set.

The following patch, which works for me, replaces "unset VARIABLE"
with "unset VARIABLE || true" so that unsetting variables which need
not be set does not stop the script unwantedly. This may introduce
problems when prune_output or prune_discard is read-only for some
reason.

Patch:
--- /etc/init.d/hotplug~ Wed Feb 16 01:40:28 2005
+++ /etc/init.d/hotplug Thu Mar 17 18:20:49 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 || true
     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 || true
 }

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

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

Best wishes,

 Gabor Braun

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux gabor 2.6.9.20041228 #1 Tue Dec 28 17:03:16 CET 2004 i686
Locale: LANG=hu_HU.iso88592, LC_CTYPE=hu_HU.iso88592

Versions of packages hotplug depends on:
ii debconf 1.4.30.11 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:3.2.1-2 The /proc file system utilities

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
Matt Zimmerman (mdz) wrote :

Looks like a kernel problem, user is running an old 2.6.9 snapshot

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
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 , Marco d'Itri (md) wrote : Bug#300113: fixed in hotplug 0.0.20040329-20
Download full text (3.3 KiB)

Source: hotplug
Source-Version: 0.0.20040329-20

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

hotplug_0.0.20040329-20.diff.gz
  to pool/main/h/hotplug/hotplug_0.0.20040329-20.diff.gz
hotplug_0.0.20040329-20.dsc
  to pool/main/h/hotplug/hotplug_0.0.20040329-20.dsc
hotplug_0.0.20040329-20_all.deb
  to pool/main/h/hotplug/hotplug_0.0.20040329-20_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.
Marco d'Itri <email address hidden> (supplier of updated hotplug 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: Sun, 20 Mar 2005 15:04:42 +0100
Source: hotplug
Binary: hotplug
Architecture: source all
Version: 0.0.20040329-20
Distribution: unstable
Urgency: medium
Maintainer: Fumitoshi UKAI <email address hidden>
Changed-By: Marco d'Itri <email address hidden>
Description:
 hotplug - Linux Hotplug Scripts
Closes: 272947 295738 296640 297226 297705 298353 299215 299946 300113
Changes:
 hotplug (0.0.20040329-20) unstable; urgency=medium
 .
   * Fixed postrm failure when removing already removed directories.
     (Closes: #297705)
   * Sort the modules in the debconf question, patch by Sean Finney.
     (Closes: #295738)
   * Added patch scsi.agent_cleanup implementing support for loading the sg
     driver and the blacklist check. (Closes: #272947)
     Also added a scsi.rc script, by Jeff Bailey of Ubuntu.
   * Added versioned dependencies on bash and sed. (Closes: #300113, #299946)
   * Removed patch pci_agent_removers, because $DEVPATH does not exist
     anymore after a device has been removed. (Closes: #298353)
     (Actually this was a patch to usb.agent.)
   * Consolidated the patches 010_load_drivers_module_name,
     013_load_drivers_check_module_dup, 014_load_drivers_blacklist_dir and
     052_module_name_for_blacklist in the new patch 010_functions_misc.
     This also fixes another -/_ mismatch in modules names. (Closes: #299215)
   * Removed patch 007_more_logging which has been merged in
     015_load_drivers_mesg_format.
   * Added de4x5 and am53c974 to the blacklist. (See: #294867, #296199)
   * Modified postinst to add an example of the QUIET variable to
     /etc/default/hotplug if not present. (Closes: #297226)
   * Fixed an init script bug which made it ignore scripts not in $RC_ORDER.
   * Moved net.rc to a new init script hotplug-net run at S41.
     (Closes: #296640)
   * Removed the useless workaround introduced in -18.
Files:
 e96913e4bad1b78d991bd32ba97aa1b9 668 admin standard hotplug_0.0.20040329-20.dsc
 d86d4092cd7a20e83ad019d19b5f459a 48963 admin standard hotplug_0.0.20040329-20.diff.gz
 b744d1521fc5a04aa19022084ac9f3d7 67594 admin standard hotplug_0.0.20040329-20_...

Read more...

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (3.5 KiB)

Message-Id: <email address hidden>
Date: Sun, 20 Mar 2005 09:32:11 -0500
From: Marco d'Itri <email address hidden>
To: <email address hidden>
Subject: Bug#300113: fixed in hotplug 0.0.20040329-20

Source: hotplug
Source-Version: 0.0.20040329-20

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

hotplug_0.0.20040329-20.diff.gz
  to pool/main/h/hotplug/hotplug_0.0.20040329-20.diff.gz
hotplug_0.0.20040329-20.dsc
  to pool/main/h/hotplug/hotplug_0.0.20040329-20.dsc
hotplug_0.0.20040329-20_all.deb
  to pool/main/h/hotplug/hotplug_0.0.20040329-20_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.
Marco d'Itri <email address hidden> (supplier of updated hotplug 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: Sun, 20 Mar 2005 15:04:42 +0100
Source: hotplug
Binary: hotplug
Architecture: source all
Version: 0.0.20040329-20
Distribution: unstable
Urgency: medium
Maintainer: Fumitoshi UKAI <email address hidden>
Changed-By: Marco d'Itri <email address hidden>
Description:
 hotplug - Linux Hotplug Scripts
Closes: 272947 295738 296640 297226 297705 298353 299215 299946 300113
Changes:
 hotplug (0.0.20040329-20) unstable; urgency=medium
 .
   * Fixed postrm failure when removing already removed directories.
     (Closes: #297705)
   * Sort the modules in the debconf question, patch by Sean Finney.
     (Closes: #295738)
   * Added patch scsi.agent_cleanup implementing support for loading the sg
     driver and the blacklist check. (Closes: #272947)
     Also added a scsi.rc script, by Jeff Bailey of Ubuntu.
   * Added versioned dependencies on bash and sed. (Closes: #300113, #299946)
   * Removed patch pci_agent_removers, because $DEVPATH does not exist
     anymore after a device has been removed. (Closes: #298353)
     (Actually this was a patch to usb.agent.)
   * Consolidated the patches 010_load_drivers_module_name,
     013_load_drivers_check_module_dup, 014_load_drivers_blacklist_dir and
     052_module_name_for_blacklist in the new patch 010_functions_misc.
     This also fixes another -/_ mismatch in modules names. (Closes: #299215)
   * Removed patch 007_more_logging which has been merged in
     015_load_drivers_mesg_format.
   * Added de4x5 and am53c974 to the blacklist. (See: #294867, #296199)
   * Modified postinst to add an example of the QUIET variable to
     /etc/default/hotplug if not present. (Closes: #297226)
   * Fixed an init script bug which made it ignore scripts not in $RC_ORDER.
   * Moved net.rc to a new init script hotplug-net run at S41.
     (Closes: #296640)
   * Removed the useless workaround introduced in -18.
Files:
 e96913e4bad1b78d991bd32ba97aa1b9 668...

Read more...

Revision history for this message
In , Jan Echternach (jan-goneko) wrote : Bug#297137 / Bug#300113: bash 2.05-0beta1 not recent enough

The version of bash that failed for me in Bug#297137 was 2.05a-11.
The version in the Depends field in hotplug-0.0.20040329-20 is 2.05-0beta1
which is OLDER than 2.05a-11. The comment in Bug#300113 speaks of version
2.05b-beta1 which doesn't exist. The changelog entry for version 2.05b-1
suggests that this is the version that has the 'unset' bug fixed, and
2.05b-1 is newer than 2.05a-11.

--
Jan

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

Message-ID: <email address hidden>
Date: Mon, 21 Mar 2005 22:09:19 +0100
From: <email address hidden> (Jan Echternach)
To: <email address hidden>
Cc: Marco d'Itri <email address hidden>
Subject: Bug#297137 / Bug#300113: bash 2.05-0beta1 not recent enough

The version of bash that failed for me in Bug#297137 was 2.05a-11.
The version in the Depends field in hotplug-0.0.20040329-20 is 2.05-0beta1
which is OLDER than 2.05a-11. The comment in Bug#300113 speaks of version
2.05b-beta1 which doesn't exist. The changelog entry for version 2.05b-1
suggests that this is the version that has the 'unset' bug fixed, and
2.05b-1 is newer than 2.05a-11.

--
Jan

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.