Changeset 6576


Ignore:
Timestamp:
2007-03-16T14:56:36+01:00 (10 years ago)
Author:
mbm
Message:

add a new 'option disabled' to wifi-device

Location:
trunk/package
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/files/sbin/wifi

    r6501 r6576  
    3636 
    3737 
    38 wifi_up() { 
     38wifi_updown() { 
    3939        for device in ${2:-$DEVICES}; do ( 
     40                config_get disabled "$device" disabled 
     41                [ "$disabled" == "1" ] && { 
     42                        echo "'$device' is disabled" 
     43                        set disable 
     44                } 
    4045                config_get iftype "$device" type 
    41                 if eval "type enable_$iftype" 2>/dev/null >/dev/null; then 
     46                if eval "type ${1}_$iftype" 2>/dev/null >/dev/null; then 
    4247                        eval "scan_$iftype '$device'" 
    43                         eval "enable_$iftype '$device'" || echo "$device($iftype): Setup failed" 
    44                 else 
    45                         echo "$device($iftype): Interface type not supported" 
    46                 fi 
    47         ); done 
    48 } 
    49  
    50 wifi_down() { 
    51         for device in ${2:-$DEVICES}; do ( 
    52                 config_get iftype "$device" type 
    53                 if eval "type disable_$iftype" 2>/dev/null >/dev/null; then 
    54                         eval "scan_$iftype '$device'" 
    55                         eval "disable_$iftype '$device'" || echo "$device($iftype): Disable failed" 
     48                        eval "${1}_$iftype '$device'" || echo "$device($iftype): ${1} failed" 
    5649                else 
    5750                        echo "$device($iftype): Interface type not supported" 
     
    10093 
    10194case "$1" in 
    102         down) wifi_down "$2";; 
     95        down) wifi_updown "disable" "$2";; 
    10396        detect) wifi_detect "$2";; 
    104         *) wifi_up "$2";; 
     97        *) wifi_updown "enable" "$2";; 
    10598esac 
  • trunk/package/broadcom-wl/files/lib/wifi/broadcom.sh

    r6570 r6576  
    245245        option channel  5 
    246246# disable radio to prevent an open ap after reflashing: 
    247         option radio    0 
     247        option disabled 1 
    248248 
    249249config wifi-iface 
  • trunk/package/madwifi/files/lib/wifi/madwifi.sh

    r6570 r6576  
    242242#       option distance  2000 
    243243# disable radio to prevent an open ap after reflashing: 
    244         option radio    0 
     244        option disabled 1 
    245245 
    246246 
Note: See TracChangeset for help on using the changeset viewer.