Your message dated Tue, 10 Oct 2006 03:48:52 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#390538: fixed in irda-utils 0.9.18-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)

--- Begin Message ---
Package: irda-utils
Version: 0.9.16-11
Severity: normal
Tags: patch

Hello,

when setting ENABLE="true" in /etc/default/irda-utils, I got the
following error in a running session (i.e. not at boot):
=====
[EMAIL PROTECTED]:~$ sudo invoke-rc.d irda-utils start
error: "net.irda.discovery" is an unknown key
invoke-rc.d: initscript irda-utils, action "start" failed.
[EMAIL PROTECTED]:~$
=====

From what I could investigate, the problem is caused by the fact that
the irda module isn't loaded yet and thus there's no
net.irda.discovery variable for sysctl:
=====
[EMAIL PROTECTED]:~$ sysctl -a 2>/dev/null | grep irda
[EMAIL PROTECTED]:~$ sudo modprobe irda
[EMAIL PROTECTED]:~$ sysctl -a 2>/dev/null | grep irda
net.irda.lap_keepalive_time = 2000
net.irda.warn_noreply_time = 3
net.irda.max_noreply_time = 12
net.irda.max_tx_window = 7
net.irda.max_tx_data_size = 2042
net.irda.min_tx_turn_time = 10
net.irda.max_baud_rate = 16000000
net.irda.slot_timeout = 88
net.irda.discovery_timeout = 3
net.irda.discovery_slots = 6
net.irda.fast_poll_increase = 50
net.irda.debug = 0
net.irda.devname = Linux
net.irda.discovery = 0
[EMAIL PROTECTED]:~$
=====

The first attached patch moves the sysctl call after start of the
irattach daemon, where IMHO it belongs: there's no point in enabling
the discovery if the daemon is not running.

BTW, I'd also suggest two other things related to the init script:

1) implement a disable-discovery section before stopping the daemon
   (second patch)

2) modify the restard|force-reload section to call the stop and start
   commands, in order to correctly get the discover modifications
   (third patch)

Please evaluate the patches (they should be applied in order).

Thx, bye,
Gismo / Luca

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

Versions of packages irda-utils depends on:
ii  debconf [debconf-2.0]        1.5.5       Debian configuration management sy
ii  libc6                        2.3.6.ds1-4 GNU C Library: Shared libraries
ii  libglib1.2                   1.2.10-10.1 The GLib library of C routines
ii  makedev                      3.3.8.2-0   Creates device files in /dev
ii  module-init-tools            3.2.2-3     tools for managing Linux kernel mo

Versions of packages irda-utils recommends:
pn  ircp                          <none>     (no description available)
ii  openobex-apps                 1.3-2      Applications for OpenOBEX

-- debconf information:
* irda-utils/firopt: dongle_id=0x09 irq=3 dma=3 io=0x2f8
  irda-utils/dongle: none
* irda-utils/enable: true
* irda-utils/discovery: true
  irda-utils/ttydev: /dev/ttyS1
* irda-utils/setserial: /dev/ttyS1
* irda-utils/selectdevice: native
* irda-utils/firdev: nsc-ircc

--- /etc/init.d/irda-utils	2005-12-23 20:47:26.000000000 +0100
+++ irda-utils_gismo-1	2006-10-01 19:28:29.000000000 +0200
@@ -35,10 +35,8 @@
 fi
 if [ "$DISCOVERY" = "true" ]; then
     DISCOVERY="-s"
-    $SYSCTL -q -w net.irda.discovery=1
 else
     DISCOVERY=""
-    $SYSCTL -q -w net.irda.discovery=0
 fi
 
 
@@ -67,6 +65,12 @@
         -- $DEVICE $DONGLE $DISCOVERY
     sleep 1
 
+    if [ -n "$DISCOVERY" ]; then
+	$SYSCTL -q -w net.irda.discovery=1
+    else
+	$SYSCTL -q -w net.irda.discovery=0
+    fi
+	
     echo "115200" > /proc/sys/net/irda/max_baud_rate
     echo "."
     ;;
--- irda-utils_gismo-1	2006-10-01 19:28:29.000000000 +0200
+++ irda-utils_gismo-2	2006-10-01 19:29:12.000000000 +0200
@@ -76,6 +76,11 @@
     ;;
 stop)
     echo -n "Stopping $DESC: $NAME"
+
+    if [ -n "$DISCOVERY" ]; then
+	$SYSCTL -q -w net.irda.discovery=0
+    fi
+
     start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
     echo "."
     ;;
--- irda-utils_gismo-2	2006-10-01 19:29:12.000000000 +0200
+++ irda-utils_gismo-3	2006-10-01 19:33:37.000000000 +0200
@@ -87,12 +87,9 @@
 #reload)
 #   ;;
 restart|force-reload)
-    echo -n "Restarting $DESC: $NAME"
-    start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
+    $0 stop
     sleep 1
-    start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \
-        -- $DEVICE $DARG $DISCOVERY
-    echo "."
+    $0 start
     ;;
 *)
     N=/etc/init.d/$PACKAGE

Attachment: pgpl9WO6HjbfQ.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: irda-utils
Source-Version: 0.9.18-1

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

irda-utils_0.9.18-1.diff.gz
  to pool/main/i/irda-utils/irda-utils_0.9.18-1.diff.gz
irda-utils_0.9.18-1.dsc
  to pool/main/i/irda-utils/irda-utils_0.9.18-1.dsc
irda-utils_0.9.18-1_i386.deb
  to pool/main/i/irda-utils/irda-utils_0.9.18-1_i386.deb
irda-utils_0.9.18.orig.tar.gz
  to pool/main/i/irda-utils/irda-utils_0.9.18.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.
Alberto Gonzalez Iniesta <[EMAIL PROTECTED]> (supplier of updated irda-utils 
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: Tue, 10 Oct 2006 10:49:20 +0200
Source: irda-utils
Binary: irda-utils
Architecture: source i386
Version: 0.9.18-1
Distribution: unstable
Urgency: low
Maintainer: Alberto Gonzalez Iniesta <[EMAIL PROTECTED]>
Changed-By: Alberto Gonzalez Iniesta <[EMAIL PROTECTED]>
Description: 
 irda-utils - IrDA management and handling utilities
Closes: 374308 376918 390538
Changes: 
 irda-utils (0.9.18-1) unstable; urgency=low
 .
   * New upstream release.
   * debian/control: Removed Recommends: ircp
     Thanks Luk & Luca. (Closes: #376918)
   * debian/irda-utils.init: Lots of cleaning.
     Thanks Luca Capello for the patches, they were
     really needed. (Closes: #390538)
   * debian/rules. Removed installation of devfs stuff
     (Closes: 374308)
Files: 
 eb806715b0b7bb77fe42687a96f39d27 619 utils optional irda-utils_0.9.18-1.dsc
 84dc12aa4c3f61fccb8d8919bf4079bb 168390 utils optional 
irda-utils_0.9.18.orig.tar.gz
 4f33e433b321af16384b5f0a5fec48c3 24811 utils optional 
irda-utils_0.9.18-1.diff.gz
 96772281e9c51e47abfd687c27bdc00e 94432 utils optional 
irda-utils_0.9.18-1_i386.deb

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

iD8DBQFFK3BPxRSvjkukAcMRAv5mAKDqyKTMlgW3LSLjQ43Ki0xF67ypqACfVlGn
KrR8eVwH7SGenc5cwH/8czw=
=ypOy
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to