Bug#445356: wireless-tools: post-down script should check if interface still exists

2007-10-15 Thread Guus Sliepen
On Fri, Oct 05, 2007 at 10:37:09AM +0200, Christopher Zimmermann wrote:

 The post-down script should check if the interface still exists. For
 example the madwifi script could already have deleted the VAP.

I'm not familiar with the madwifi script. What is a VAP? And how comes
that an interface that exists during if-pre-up does not exist during
if-post-down? It seems to me that something has then happened out of
order.

-- 
Met vriendelijke groet / with kind regards,
  Guus Sliepen [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Bug#445356: wireless-tools: post-down script should check if interface still exists

2007-10-05 Thread Christopher Zimmermann
Package: wireless-tools
Version: 29~pre22-1
Severity: minor

The post-down script should check if the interface still exists. For
example the madwifi script could already have deleted the VAP.


--- /etc/network/if-post-down.d/wireless-tools.old 2007-10-05 
10:35:16.0 +0200
+++ /etc/network/if-post-down.d/wireless-tools  2007-10-05 10:34:58.0 
+0200
@@ -6,6 +6,9 @@
   exit 0
 fi
 
+# madwifi-tools could have taken down the VAP already.
+/sbin/iwconfig $IFACE 21 |grep 'No such device'  exit 0
+
 if [ -n $IF_WIRELESS_MODE ]; then
   $IWCONFIG $IFACE mode auto
 fi

 kind regards,
 Christopher Zimmermann


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (50, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.21-2-amd64 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages wireless-tools depends on:
ii  libc6 2.6.1-1GNU C Library: Shared libraries
ii  libiw29   29~pre22-1 Wireless tools - library

wireless-tools recommends no packages.

-- no debconf information



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