blob: 13c7e4b8dbbcbb2db96e1e8848f65c84a8816da5 [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001#!/bin/sh
2#
3# script file to start network
4#
5# Usage: kill_wps.sh {pbc | pin} {PINNUM}
6#
7
8##if [ $# -lt 2 ]; then echo "Usage: $0 {gw | ap} {all | bridge | wan}"; exit 1 ; fi
9ROOT=`nv get wifi_root_dir`
10
11LOG=$ROOT/wifi/realtek/slog
12CONFIG_ROOT_DIR="$ROOT/wifi/realtek/rtl8192c"
13CONFIG_DIR=$CONFIG_ROOT_DIR/wlan0
14
15ID=`nv get wifi_wps_index`
16echo "enter kill_wps.sh wifi_wps_index=$ID >>>>>>>>" >> $LOG
17ID=`expr $ID - 1`
18echo "enter kill_wps.sh ID=$ID >>>>>>>>" >> $LOG
19
20if [ "$ID" = "0" ];then
21#CONFIG_DIR=$CONFIG_ROOT_DIR/wlan0
22#WLAN_INTERFACE="wlan0"
23CONFIG_DIR=$CONFIG_ROOT_DIR/wlan0-va$ID
24WLAN_INTERFACE="wlan0-va$ID"
25else
26CONFIG_DIR=$CONFIG_ROOT_DIR/wlan0-va$ID
27WLAN_INTERFACE="wlan0-va$ID"
28fi
29
30
31if [ -z "$SCRIPT_DIR" ]; then
32 SCRIPT_DIR=`cat $CONFIG_ROOT_DIR/wifi_script_dir`
33fi
34START_WLAN_APP=$SCRIPT_DIR/wlanapp_8192c.sh
35
36BR_INTERFACE="br0"
37echo "<<<${START_WLAN_APP##*/} start $WLAN_INTERFACE $VIRTUAL_WLAN_INTERFACE $BR_INTERFACE>>>" >> $LOG
38$START_WLAN_APP kill $WLAN_INTERFACE $VIRTUAL_WLAN_INTERFACE $BR_INTERFACE
39ERR=`echo $?`
40if [ $ERR != 0 ]; then
41 exit $ERR;
42fi