Package: discover
Version: 2.0.7-2.1
Severity: minor

Hello, here a 1st patch to let the init script honour the VERBOSE=no
setting:

--- discover.orig       2004-12-08 19:10:10.000000000 +0100
+++ discover    2006-05-30 20:04:17.000000000 +0200
@@ -6,8 +6,15 @@

 case "$1" in
 start|restart)
-    discover-modprobe -v
+    if [ "$VERBOSE" = "no" ] ; then
+       discover-modprobe
+    else
+       discover-modprobe -v
+    fi
     ;;
 stop|reload|force-reload)
+    exit 0
     ;;
+*)  echo "usage: /etc/init.d/discover [start|stop]"
+    exit 1
 esac


And here comes a patch to make discover-modprobe happy with - and _ in
module names (the modprobe doc says that using any of them in module
names should not make a difference). I wrote this patch because on one
of my systems snd_intel8x0 caused a little problem ...

--- discover-modprobe.orig      2005-04-24 15:33:52.000000000 +0200
+++ discover-modprobe   2006-05-30 19:54:03.000000000 +0200
@@ -57,7 +57,7 @@

 skip ()
 {
-    echo ${skip} | grep -q $1
+    echo ${skip} | sed 's/-/_/g' | grep -q $1
     return $?
 }

@@ -71,7 +71,7 @@
 # Determine if the module is already loaded is_loaded() {
     module="$1"
-    if sed 's/^\([^ ]\+\).*/\1/' /proc/modules | grep -q "^${module}\$" ; then
+    if sed -e 's/^\([^ ]\+\).*/\1/' -e's/-/_/g' /proc/modules | grep -q 
"^${module}\$" ; then
         true
     else
         false
@@ -127,7 +127,7 @@

 # Load the modules.
 for module_info in ${module_details}; do
-    module_name=$(echo ${module_info} | sed 's/^\([^ ]\+\).*/\1/')
+    module_name=$(echo ${module_info} | sed -e's/^\([^ ]\+\).*/\1/' 
-e's/-/_/g')
     if [ ${module_name} = "ignore" ] || [ ${module_name} = "unknown" ]; then
         continue
     fi

Thanks!

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-14-amd
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages discover depends on:
ii  libdiscover2                  2.0.7-2.1  hardware identification library

discover recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to