Update of /cvsroot/leaf/src/bering-uclibc/apps/madwifi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32561

Modified Files:
        buildtool.cfg buildtool.mk 
Added Files:
        madwifi-if-post-down madwifi-if-pre-up 
Log Message:
added pre-up and down scripts for ifupdown

Index: buildtool.cfg
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/madwifi/buildtool.cfg,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** buildtool.cfg       7 Jan 2006 14:09:36 -0000       1.3
--- buildtool.cfg       8 Jan 2006 12:47:08 -0000       1.4
***************
*** 20,23 ****
--- 20,35 ----
  </File>
  
+ <File madwifi-if-pre-up>
+       Server = cvs-sourceforge
+       Directory = madwifi
+       revision = HEAD
+ </File>
+ 
+ <File madwifi-if-post-down>
+       Server = cvs-sourceforge
+       Directory = madwifi
+       revision = HEAD
+ </File>
+ 
  <File err.c>
        Server = cvs-sourceforge
***************
*** 77,86 ****
        <madwifi>
                Version cvs20060107
!               Revision = 1
  
                Help <<EOF
                Usefull tools for MADWIFI drivers
                Homepage: http://madwifi.org
                LEAF package by __PACKAGER__, __BUILDDATE__
                EOF
  
--- 89,106 ----
        <madwifi>
                Version cvs20060107
!               Revision = 2
  
                Help <<EOF
                Usefull tools for MADWIFI drivers
                Homepage: http://madwifi.org
+               Requires: wireless.lrp
                LEAF package by __PACKAGER__, __BUILDDATE__
+               
+               You can create a madwifi interface by create a stanza in
+               /etc/network/interfaces like this:
+               iface ath0 inet static
+                   madwifi-base wifi0
+                   ...
+                   wireless-mode Managed
                EOF
  
***************
*** 116,119 ****
--- 136,149 ----
                                Type        = binary
                        </File>
+                       <File>
+                               Filename    = etc/network/if-pre-up.d/madwifi
+                               Source      = 
etc/network/if-pre-up.d/madwifi-if-pre-up
+                               Type        = binary
+                       </File>
+                       <File>
+                               Filename    = etc/network/if-post-down.d/madwifi
+                               Source      = 
etc/network/if-post-down.d/madwifi-if-post-down
+                               Type        = binary
+                       </File>
                </Contents>
        </madwifi>

Index: buildtool.mk
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/madwifi/buildtool.mk,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** buildtool.mk        7 Jan 2006 14:09:36 -0000       1.3
--- buildtool.mk        8 Jan 2006 12:47:08 -0000       1.4
***************
*** 17,20 ****
--- 17,22 ----
  $(MADWIFI_DIR)/.build: $(MADWIFI_DIR)/.source
        mkdir -p $(BT_STAGING_DIR)/usr/sbin/
+       mkdir -p $(BT_STAGING_DIR)/etc/network/if-pre-up.d/
+       mkdir -p $(BT_STAGING_DIR)/etc/network/if-post-down.d/
        mkdir -p $(BT_STAGING_DIR)/include/net80211/
        mkdir -p $(BT_STAGING_DIR)/include/include/
***************
*** 22,25 ****
--- 24,29 ----
        $(MAKE) -C $(MADWIFI_DIR) CC=$(TARGET_CC) KERNELPATH=$(BT_LINUX_DIR) 
KERNELRELEASE=$(BT_KERNEL_RELEASE)
        $(MAKE) -C $(MADWIFI_DIR) CC=$(TARGET_CC) KERNELPATH=$(BT_LINUX_DIR) 
KERNELRELEASE=$(BT_KERNEL_RELEASE) DESTDIR="$(BT_STAGING_DIR)" install
+       cp madwifi-if-pre-up $(BT_STAGING_DIR)/etc/network/if-pre-up.d/
+       cp madwifi-if-post-down $(BT_STAGING_DIR)/etc/network/if-post-down.d/
        cp $(MADWIFI_DIR)/include/compat.h $(BT_STAGING_DIR)/include/include/
        cp $(MADWIFI_DIR)/net80211/ieee80211.h 
$(BT_STAGING_DIR)/include/net80211/ 

--- NEW FILE: madwifi-if-pre-up ---
#!/bin/sh
#
# Debian ifupdown hook script for madwifi-ng
#
# Author:   Matt Brown <[EMAIL PROTECTED]>
# Version:  1.0
#
# Copyright (C) 2005    Matt Brown
#
# This is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# crcnetd; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
#
WLANCONFIG=/usr/sbin/wlanconfig

if [ ! -x $WLANCONFIG ]; then
  exit 0
fi

if [ -z "$IF_MADWIFI_BASE" ]; then
        exit 0
fi

# Check for interface
if ip link list $IFACE &>/dev/null; then
        # Destroy 
        $WLANCONFIG $IFACE destroy
fi

case "$IF_WIRELESS_MODE" in
Managed|managed|MANAGED)
        MODE="sta"
        ;;
Ad-Hoc|ad-hoc|AD-HOC)
        MODE="adhoc"
        ;;
Master|master|MASTER)
        MODE="ap"
        ;;
Monitor|monitor|MONITOR)
        MODE="monitor"
        ;;
*)
        MODE="sta"
        ;;
esac

# Create or recreate interface
$WLANCONFIG $IFACE create wlandev $IF_MADWIFI_BASE wlanmode $MODE &>/dev/null
exit $?

--- NEW FILE: madwifi-if-post-down ---
#!/bin/sh
#
# Debian ifupdown hook script for madwifi-ng
#
# Author:   Matt Brown <[EMAIL PROTECTED]>
# Version:  1.0
#
# Copyright (C) 2005    Matt Brown
#
# This is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# crcnetd; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
#

WLANCONFIG=/usr/sbin/wlanconfig

if [ ! -x $WLANCONFIG ]; then
  exit 0
fi

if [ -z "$IF_MADWIFI_BASE" ]; then
        exit 0
fi

# Destroy 
$WLANCONFIG $IFACE destroy

exit 0



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
leaf-cvs-commits mailing list
leaf-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits

Reply via email to