Acknowledgement sent to Stef Coene <stef.coene@docum.org>:
New Bug report received and forwarded. Copy sent to Fumitoshi UKAI <ukai@debian.or.jp>.
(full text, mbox, link).
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: hotplug: can not load any module with a - in the name
Date: Wed, 31 Mar 2004 13:25:55 +0200
Package: hotplug
Version: 0.0.20040329-1
Severity: important
Tags: patch
Hi,
In function load_drivers in /etc/hotplug/hotplug.functions, lsmod is
used to see if the driver is loaded or not. All *mod commando's accept
modules names with _ or -. So you can use snd_intel8x0 or snd-intel8x0
on the command line. But lsmod gives a list of loaded modules with the
_ in the names, even if is the module written with a -.
The check in load_drivers uses the module name to see if the module
is loaded or not. If the module is written with a - in the name, lsmod
reports it with a _, so the modules is never detected as already loaded
and the script attempts to reload the module.
I also changes some other parts of the script. I changed the messages
printed on the console so the output is more readable and removed a
duplicated -q option (this is also set wen MODPROBE is defined).
Patches:
--- /etc/init.d/hotplug 2004-03-31 13:19:05.000000000 +0200
+++ /etc/init.d/hotplug-ori 2004-03-31 13:20:28.000000000 +0200
@@ -25,5 +25,5 @@
continue
fi
- echo " $name"
+ echo -n " $name"
fi
$RC $1 || echo -n " [failed]"
@@ -34,8 +34,8 @@
case "$1" in
start)
- echo "Starting hotplug subsystem:"
+ echo -n "Starting hotplug subsystem:"
echo /sbin/hotplug > /proc/sys/kernel/hotplug
run_rcs $1
- echo "done"
+ echo "."
;;
--- /etc/hotplug/hotplug.functions 2004-03-31 13:23:08.000000000 +0200
+++ /etc/hotplug/hotplug.functions-ori 2004-03-31 13:20:40.000000000 +0200
@@ -141,26 +141,26 @@
# maybe driver modules need loading
LOADED=false
- MODULE_GREP=`echo $MODULE | sed s/-/_/g`
- if ! lsmod | grep -q "^$MODULE_GREP " > /dev/null 2>&1; then
+ if ! lsmod | grep -q "^$MODULE " > /dev/null 2>&1; then
if grep -q "^$MODULE\$" $HOTPLUG_DIR/blacklist \
>/dev/null 2>&1; then
- debug_mesg " $MODULE: blacklisted"
+ debug_mesg "... blacklisted module: $MODULE"
+ continue
+ fi
# statically linked modules aren't shown by 'lsmod',
# and user mode drivers will ONLY have a setup script;
# it's not an error if a module doesn't exist or won't load.
- elif $MODPROBE -n $MODULE >/dev/null 2>&1 &&
+ if $MODPROBE -q -n $MODULE >/dev/null 2>&1 &&
! $MODPROBE $MODULE >/dev/null 2>&1 ; then
- mesg " $MODULE: can not be loaded"
+ mesg "... can't load module $MODULE"
else
# /etc/modules.conf may have set non-default module
# parameters ... handle per-device parameters in apps
# (ioctls etc) not in setup scripts or modules.conf
- mesg " $MODULE: sucessfully loaded"
LOADED=true
fi
else
# This module is already loaded
- mesg " $MODULE: already loaded"
+ mesg "kernel driver $MODULE already loaded"
LOADED=true
fi
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.4
Locale: LANG=C, LC_CTYPE=C
Versions of packages hotplug depends on:
ii debconf 1.4.20 Debian configuration management sy
ii module-init-tools 3.0-pre10-2 tools for managing Linux kernel mo
ii modutils 2.4.26-1 Linux module utilities
ii procps 1:3.2.0-1 The /proc file system utilities
-- debconf information excluded
Reply sent to Fumitoshi UKAI <ukai@debian.or.jp>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Stef Coene <stef.coene@docum.org>:
Bug acknowledged by developer.
(full text, mbox, link).
Subject: Bug#241218: fixed in hotplug 0.0.20040329-2
Date: Wed, 31 Mar 2004 13:17:07 -0500
Source: hotplug
Source-Version: 0.0.20040329-2
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-2.diff.gz
to pool/main/h/hotplug/hotplug_0.0.20040329-2.diff.gz
hotplug_0.0.20040329-2.dsc
to pool/main/h/hotplug/hotplug_0.0.20040329-2.dsc
hotplug_0.0.20040329-2_all.deb
to pool/main/h/hotplug/hotplug_0.0.20040329-2_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 241218@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Fumitoshi UKAI <ukai@debian.or.jp> (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: Thu, 1 Apr 2004 02:52:48 +0900
Source: hotplug
Binary: hotplug
Architecture: source all
Version: 0.0.20040329-2
Distribution: unstable
Urgency: low
Maintainer: Fumitoshi UKAI <ukai@debian.or.jp>
Changed-By: Fumitoshi UKAI <ukai@debian.or.jp>
Description:
hotplug - Linux Hotplug Scripts
Closes: 238198241218
Changes:
hotplug (0.0.20040329-2) unstable; urgency=low
.
* patches/010_load_drivers_module_name: $MODULE needs s/-/_/g to
match with lsmod output.
closes: Bug#241218
* patches/009_usb.agent_remover: use $DEVPATH for $REMOVER
closes: Bug#238198
* patches/011_usb.rc_dont_force_hcds: don't use debug_mesg
Files:
ab05ccfe6a09a7734f87f91bc6f7af9c 671 admin standard hotplug_0.0.20040329-2.dsc
9e90b194edb859b7029a0e646ce2e15f 28233 admin standard hotplug_0.0.20040329-2.diff.gz
1e7d7652dadfdea68e04598ab1ef7642 51560 admin standard hotplug_0.0.20040329-2_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD4DBQFAawbg9D5yZjzIjAkRArxUAJdcpZqCpoIZdlpaGNDRSB41Qo7eAKCkimJq
eggg2L3cUQAZtcKG1WoRaQ==
=zO49
-----END PGP SIGNATURE-----
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/.