New upstream SVN snapshot.
[debian/madwifi.git] / debian / madwifi-tools.z50madwifi.if-post-down
1 #!/bin/sh
2 #
3 # Debian ifupdown hook script for madwifi-ng
4 #
5 # Author: Matt Brown <matt@mattb.net.nz>
6 # Modified by: Kel Modderman <kelrin@tpg.com.au>
7 #
8 # Copyright (C) 2005 - 2006   Matt Brown
9 #
10 # This is free software; you can redistribute it and/or modify it under the
11 # terms of the GNU General Public License as published by the Free Software
12 # Foundation; either version 2 of the License, or (at your option) any later
13 # version.
14 #
15 # This is distributed in the hope that it will be useful, but WITHOUT ANY
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18 # details.
19 #
20 # On Debian GNU/Linux systems, the text of the GPL license can be found in
21 # /usr/share/common-licenses/GPL
22
23 WLANCONFIG=/sbin/wlanconfig
24
25 if [ ! -x "$WLANCONFIG" ]; then
26         exit 0
27 fi
28
29 if [ ! -n "$IF_MADWIFI_BASE" ]; then
30         exit 0
31 fi
32
33 if [ -n "$IF_MADWIFI_VAP" ]; then
34         VAP="$IF_MADWIFI_VAP"
35 else
36         VAP="$IFACE"
37 fi
38
39 # Destroy 
40 $WLANCONFIG $VAP destroy
41
42 exit $?