Your message dated Thu, 28 Jul 2005 03:32:19 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#312884: fixed in sl-modem 2.9.9d-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 10 Jun 2005 15:29:09 +0000
>From [EMAIL PROTECTED] Fri Jun 10 08:29:08 2005
Return-path: <[EMAIL PROTECTED]>
Received: from netblock-66-245-252-35.dslextreme.com (tigger.sf.gildea.net) 
[66.245.252.35] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DglRU-0000t4-00; Fri, 10 Jun 2005 08:29:08 -0700
Received: by tigger.sf.gildea.net (Postfix, from userid 1000)
        id EFFB43CC00E; Fri, 10 Jun 2005 08:29:07 -0700 (PDT)
Received: from tigger.sf.gildea.net (localhost [127.0.0.1])
        by tigger.sf.gildea.net (Postfix) with ESMTP id E3DE86D4088
        for <[EMAIL PROTECTED]>; Fri, 10 Jun 2005 08:29:07 -0700 (PDT)
From: Stephen Gildea <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: init.d/sl-modem-daemon: unload module on stop, add "status", fix 
timing on start
X-Mailer: MH-E 7.82; nmh 1.1; GNU Emacs 21.4.1
Date: Fri, 10 Jun 2005 08:29:07 -0700
Message-Id: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: sl-modem-daemon
Version: 2.9.9a-1
Tags: patch

The enclosed patch makes the following improvements to the
/etc/init.d/sl-modem-daemon script:

1.  On "stop", unload the kernel module.  This is the most important
change, as unloading the kernel module powers down the device hardware,
which I'm hoping extends the battery life on my laptop.

To do this, I removed the "config" call from the "stop" action.  The
"config" function loads the kernel module to figure out the device to
pass to "start".  This is counterproductive if we are stopping and want
to be unloading the module.

The stop command also now instructs start-stop-daemon to wait for the
daemon to quit before trying to unload its module.

2.  Fix the timing on "start."  If the daemon is started too fast after
loading the ALSA kernel module, the snd_pcm_open() call in the daemon
will fail because the needed devices haven't appeared in /dev yet.  I
added a wait loop after the modprobe and before starting the daemon.

(Or this wait could be moved into modem/modem_main.c instead so that the
daemon sleeps and retries the open a few times before quitting on
failure.)

Another minor fix to the module loading in "start" is the check for the
module already existing.  The check was looking for "snd-intel8x0m" in
/proc/modules, but on my system it appears as "snd_intel8x0m".  I
changed the check to grep for "snd.intel8x0m" so that either name will
be found.

3.  Add a "status" option.

 < Stephen


--- sl-modem-2.9.9a/debian/sl-modem-daemon.init 2005-06-08 13:51:05
+++ debian/sl-modem-daemon.init 2005-06-08 17:00:20
@@ -96,13 +96,19 @@
 
 start() {
    if [ "$ALSA" ] ; then
-      test -e /proc/asound/Modem || grep -q 'snd-intel8x0m' /proc/modules ||  
{ 
+      test -e /proc/asound/Modem || grep -q 'snd.intel8x0m' /proc/modules ||  
{ 
             echo -n "Loading ALSA modem driver into kernel ... " 
             $modprobe snd-intel8x0m && echo "done." ||  {
                echo "failed."
                exit -1
             }
       }
+      DEV_SND_FILE=/dev/snd/controlC${SLMODEMD_DEVICE##*:}
+      for start_reps in `seq 100` ; do
+         test -r "$DEV_SND_FILE" && break
+         : wait $start_reps for the kernel module to make the device 
$DEV_SND_FILE appear
+         sleep 0.1
+      done
       echo -n "Starting SmartLink Modem driver for: $SLMODEMD_DEVICE"
       start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON 
--make-pidfile --background --quiet -- --alsa $OPTS
    else
@@ -129,18 +135,49 @@
 
 stop() {
        echo -n "Shutting down SmartLink Modem driver normally"
+  RETVAL=0
   if [ "`pidof $NAME`" ] ; then 
-     if start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON ; 
then
+     if start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON 
--retry 1 ; then
         echo .
      else
         echo " probably failed."
         echo "Trying it the hard way (send SIGKILL all $NAME processes): " 
-        killall -KILL $NAME || return 1
+        killall -KILL $NAME || RETVAL=1
      fi
   else
      echo " ... no $NAME daemon running."
   fi
-  return 0
+  test "$RETVAL" -ne 0 || rm -f "$PIDFILE"
+  ! grep -q 'snd.intel8x0m' /proc/modules || { 
+      echo -n "Unloading ALSA modem driver from kernel ... " 
+      "$modprobe" -r snd-intel8x0m && echo "done." || {
+         echo "failed."
+         RETVAL=1
+      }
+  }
+  ! grep -q 'slamr' /proc/modules || { 
+      echo -n "Unloading SmartLink Modem driver from kernel ... " 
+      "$modprobe" -r slamr && echo "done." || {
+         echo "failed."
+         RETVAL=1
+      }
+  }
+  return "$RETVAL"
+}
+
+status() {
+    echo -n "Status of $DESC: "
+    if [ ! -r "$PIDFILE" ]; then
+       echo "$NAME is not running."
+       exit 3
+    fi
+    if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
+       echo "$NAME is running."
+       exit 0
+    else
+       echo "$NAME is not running but $PIDFILE exists."
+       exit 1
+    fi
 }
 
 # See how we were called.
@@ -163,14 +200,16 @@
    start
    ;;
    stop)
-   config
-   stop && rm -f $PIDFILE
+   stop
    ;;
    restart|reload)
+   stop
    config
-   stop && rm -f $PIDFILE
    start
    ;;
+   status)
+   status
+   ;;
    *)
    echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
    exit 1

---------------------------------------
Received: (at 312884-close) by bugs.debian.org; 28 Jul 2005 11:01:55 +0000
>From [EMAIL PROTECTED] Thu Jul 28 04:01:55 2005
Return-path: <[EMAIL PROTECTED]>
Received: from katie by spohr.debian.org with local (Exim 3.36 1 (Debian))
        id 1Dy5gZ-0002D6-00; Thu, 28 Jul 2005 03:32:19 -0700
From: Eduard Bloch <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-Katie: $Revision: 1.56 $
Subject: Bug#312884: fixed in sl-modem 2.9.9d-1
Message-Id: <[EMAIL PROTECTED]>
Sender: Archive Administrator <[EMAIL PROTECTED]>
Date: Thu, 28 Jul 2005 03:32:19 -0700
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 4

Source: sl-modem
Source-Version: 2.9.9d-1

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

sl-modem-daemon_2.9.9d-1_i386.deb
  to pool/non-free/s/sl-modem/sl-modem-daemon_2.9.9d-1_i386.deb
sl-modem-source_2.9.9d-1_i386.deb
  to pool/non-free/s/sl-modem/sl-modem-source_2.9.9d-1_i386.deb
sl-modem_2.9.9d-1.diff.gz
  to pool/non-free/s/sl-modem/sl-modem_2.9.9d-1.diff.gz
sl-modem_2.9.9d-1.dsc
  to pool/non-free/s/sl-modem/sl-modem_2.9.9d-1.dsc
sl-modem_2.9.9d.orig.tar.gz
  to pool/non-free/s/sl-modem/sl-modem_2.9.9d.orig.tar.gz



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 PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Eduard Bloch <[EMAIL PROTECTED]> (supplier of updated sl-modem 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 PROTECTED])


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

Format: 1.7
Date: Thu, 28 Jul 2005 09:50:21 +0200
Source: sl-modem
Binary: sl-modem-daemon sl-modem-source
Architecture: source i386
Version: 2.9.9d-1
Distribution: unstable
Urgency: low
Maintainer: Eduard Bloch <[EMAIL PROTECTED]>
Changed-By: Eduard Bloch <[EMAIL PROTECTED]>
Description: 
 sl-modem-daemon - SmartLink software modem daemon
 sl-modem-source - SmartLink software modem driver - module building source
Closes: 264359 281074 297666 312152 312884 319604
Changes: 
 sl-modem (2.9.9d-1) unstable; urgency=low
 .
   * New upstream release
     + moves the device major numbers to the 24x range (closes: #264359)
   * replaced the mkdev hacks in init script etc. with only one in the postinst
     of modules that also fixes the major numbers of the device files. Also
     make sure they don't make the script fail on insane /dev filesystems
     (udev, closes: #297666)
   * init script patch from Stephen Gildea <[EMAIL PROTECTED]> to
     improve the start/stop behaviour and ALSA detection (closes: #312884)
   * removed the dependency on recent modules or kernel. There are too many
     ways to make the daemon work and a modern kernel (2.6.12) provides enough
     support to make it work without special cludges using the packaging
     system (closes: #319604)
   * added bzip2 to dependencies (closes: #312152)
   * Japanese translation by Hideki Yamane <[EMAIL PROTECTED]>(closes: #281074)
   * defaulting to gcc-3.3 for the daemon unless someone fixes the few errors
   * various lintian fixes, removing the init script in postrm now (arrrg)
Files: 
 2196690edcace2bf60a5d31bdcdfa05e 612 non-free/misc optional 
sl-modem_2.9.9d-1.dsc
 ed8356258cad4979956b3617d3f0f44a 709474 non-free/misc optional 
sl-modem_2.9.9d.orig.tar.gz
 ad14d74d8acdbae1d4bd097316a6d41f 15201 non-free/misc optional 
sl-modem_2.9.9d-1.diff.gz
 8d2e8e3f45df6974133d2b1ee4c1bb67 211800 non-free/misc optional 
sl-modem-source_2.9.9d-1_i386.deb
 0cdb3355d89f07d4c9dc0393b1c2d094 414656 non-free/misc optional 
sl-modem-daemon_2.9.9d-1_i386.deb

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

iD8DBQFC6LBb4QZIHu3wCMURAvz6AJ0ceNh89yLX28nepcb4pC+fkramaQCfd1gi
ra1TPk/AomROnJLeoXdFiKE=
=+NmF
-----END PGP SIGNATURE-----


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

Reply via email to