Debian Bug report logs - #299215
hotplug.functions: Bug matching module name

version graph

Package: hotplug; Maintainer for hotplug is (unknown);

Reported by: Thomas Hood <jdthood@aglu.demon.nl>

Date: Sat, 12 Mar 2005 16:48:02 UTC

Severity: minor

Found in version 0.0.20040329-17

Fixed in version hotplug/0.0.20040329-20

Done: Marco d'Itri <md@linux.it>

Bug is archived. No further changes may be made.

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


Report forwarded to debian-bugs-dist@lists.debian.org, Fumitoshi UKAI <ukai@debian.or.jp>:
Bug#299215; Package hotplug. (full text, mbox, link).


Acknowledgement sent to Thomas Hood <jdthood@aglu.demon.nl>:
New Bug report received and forwarded. Copy sent to Fumitoshi UKAI <ukai@debian.or.jp>. (full text, mbox, link).


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

From: Thomas Hood <jdthood@aglu.demon.nl>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: hotplug.functions: Bug matching module name
Date: Sat, 12 Mar 2005 17:33:15 +0100
Package: hotplug
Version: 0.0.20040329-17
Severity: minor

/etc/hotplug/hotplug.functions includes this line:

   if ! lsmod | grep -q "^$(echo $MODULE|sed -e 's/-/_/g') " > /dev/null 2>&1; then

I am running Linux 2.4.27.  DRIVERS contains, among other names, "snd-cs46xx" which
in its turn gets assigned to MODULE. sed converts the hyphen in this string to an
underscore for grep's regexp argument.  lsmod outputs "snd-cs46xx", not
"snd_cs46xx", so grep returns failure.  I assume that the opposite result was
intended.

$ lsmod | grep "^$(echo snd-cs46xx|sed -e 's/-/_/g') "
$ lsmod | sed -e 's/-/_/g' | grep "^$(echo snd-cs46xx|sed -e 's/-/_/g') "
snd_cs46xx             68744   0

Originally I see:

    snd-cs46xx: loaded successfully

After applying the following patch I see:

    snd-cs46xx: already loaded

168c168
< 	if ! lsmod | grep -q "^$(echo $MODULE|sed -e 's/-/_/g') " > /dev/null 2>&1; then
---
> 	if ! lsmod | sed -e 's/-/_/g' | grep -q "^$(echo $MODULE|sed -e 's/-/_/g') " > /dev/null 2>&1; then


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing'), (50, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.4.27-2-686
Locale: LANG=en_IE@euro, LC_CTYPE=en_IE@euro (charmap=ISO-8859-15)

Versions of packages hotplug depends on:
ii  debconf                      1.4.32      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.27-0.1  Linux module utilities
ii  procps                       1:3.2.3-1   The /proc file system utilities

-- debconf information:
* hotplug/ignore_pci_class_display: true
* hotplug/net_agent_policy: hotplug
* hotplug/static_module_list:
* hotplug/usb_keyboard:
  hotplug/x11_usbmice_hack: false



Information forwarded to debian-bugs-dist@lists.debian.org, Fumitoshi UKAI <ukai@debian.or.jp>:
Bug#299215; Package hotplug. (full text, mbox, link).


Acknowledgement sent to md@Linux.IT (Marco d'Itri):
Extra info received and forwarded to list. Copy sent to Fumitoshi UKAI <ukai@debian.or.jp>. (full text, mbox, link).


Message #10 received at 299215@bugs.debian.org (full text, mbox, reply):

From: md@Linux.IT (Marco d'Itri)
To: Thomas Hood <jdthood@aglu.demon.nl>, 299215@bugs.debian.org
Subject: Re: Bug#299215: hotplug.functions: Bug matching module name
Date: Sat, 12 Mar 2005 18:12:33 +0100
[Message part 1 (text/plain, inline)]
On Mar 12, Thomas Hood <jdthood@aglu.demon.nl> wrote:

> I am running Linux 2.4.27.  DRIVERS contains, among other names, "snd-cs46xx" which
> in its turn gets assigned to MODULE. sed converts the hyphen in this string to an
> underscore for grep's regexp argument.  lsmod outputs "snd-cs46xx", not
> "snd_cs46xx", so grep returns failure.  I assume that the opposite result was
> intended.
No, 2.6 kernels use names with underscores.

I think that something like this was intented instead:

lsmod | grep -sqi "^$(echo $MODULE | sed -e 's/[-_]/[-_]/g') "

-- 
ciao,
Marco
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Fumitoshi UKAI <ukai@debian.or.jp>:
Bug#299215; Package hotplug. (full text, mbox, link).


Acknowledgement sent to Thomas Hood <jdthood@aglu.demon.nl>:
Extra info received and forwarded to list. Copy sent to Fumitoshi UKAI <ukai@debian.or.jp>. (full text, mbox, link).


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

From: Thomas Hood <jdthood@aglu.demon.nl>
To: 299215@bugs.debian.org
Subject: Re: Bug#299215: hotplug.functions: Bug matching module name
Date: Sat, 12 Mar 2005 18:32:42 +0100
On Sat, 2005-03-12 at 18:12 +0100, Marco d'Itri wrote:
> I think that something like this was intented instead:
> 
> lsmod | grep -sqi "^$(echo $MODULE | sed -e 's/[-_]/[-_]/g') "


Yes, that should work too and it saves one sed process.

-- 
Thomas Hood <jdthood@aglu.demon.nl>




Reply sent to Marco d'Itri <md@linux.it>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Thomas Hood <jdthood@aglu.demon.nl>:
Bug acknowledged by developer. (full text, mbox, link).


Message #20 received at 299215-close@bugs.debian.org (full text, mbox, reply):

From: Marco d'Itri <md@linux.it>
To: 299215-close@bugs.debian.org
Subject: Bug#299215: fixed in hotplug 0.0.20040329-20
Date: Sun, 20 Mar 2005 09:32:10 -0500
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 299215@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Marco d'Itri <md@linux.it> (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 ftpmaster@debian.org)


-----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 <ukai@debian.or.jp>
Changed-By: Marco d'Itri <md@linux.it>
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_all.deb

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

iD8DBQFCPYUDFGfw2OHuP7ERAmp5AJ9j2MR1XX5mUZCRz3clWtUmLROGNQCfT5WZ
KT2Hmkr7AVqC7WiGKEwvEtI=
=Huc6
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Jan 23 19:50:52 2026; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.