Ignore:
Timestamp:
2011-07-17T16:17:47+02:00 (5 years ago)
Author:
swalker
Message:

[packages] wing: update to 20110709 (#9722)

  • Signed-off-by: Roberto Riggio <roberto.riggio at create-net.org>
  • remove unrecognized configure options
  • remove trailing whitespace
File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/wing/files/lib/network/wing.sh

    r26386 r27643  
    3030        config_load wireless 
    3131        config_foreach wing_list_interfaces wifi-iface 
    32          
     32 
    3333        # start click router 
    3434        if [ "$hwmodes" = "" -o "$freqs" = "" -o "$ifnames" = "" -o "$hwaddrs" = "" ]; then 
     
    5050        local hwaddr=$(echo $hwaddrs | sed 's/ .*//'); 
    5151        local ipaddr=$(printf "$prefix.%d.%d.%d" $(echo $hwaddr | awk -F: '{printf "0x%s 0x%s 0x%s",$4,$5,$6}')) 
     52        local bcast="$prefix.255.255.255" 
    5253        local netmask=255.0.0.0 
    5354 
     
    7879                | sed -e "s/__XR_IFNAME__/$iface/g" \ 
    7980                | sed -e "s/__XR_IP__/$ipaddr/g" \ 
     81                | sed -e "s/__XR_BCAST__/$bcast/g" \ 
    8082                | sed -e "s/__XR_NM__/$netmask/g" \ 
    8183                | sed -e "s/__XR_PERIOD__/$period/g" \ 
     
    105107        ps | grep /usr/bin/click | grep -v grep | awk '{print $1}' > /var/run/$iface.pid 
    106108 
    107         ifconfig "$iface" "$ipaddr" netmask "$netmask"  
     109        ifconfig "$iface" "$ipaddr" netmask "$netmask" 
     110        route add default dev "$iface" 
     111 
     112        uci_set_state network $config ifname "$iface" 
    108113        uci_set_state network $config ipaddr "$ipaddr" 
    109114        uci_set_state network $config netmask "$netmask" 
     115        uci_set_state network $config gateway "0.0.0.0" 
    110116 
    111117        env -i ACTION="ifup" INTERFACE="$config" DEVICE="$iface" PROTO=wing /sbin/hotplug-call "iface" & 
    112118 
    113 }  
     119} 
    114120 
    115121wing_template_available() { # prefix, template, default 
    116         local template="/etc/wing/$1.$2.click"  
     122        local template="/etc/wing/$1.$2.click" 
    117123        [ ! -f $template ] && { 
    118124                return 1 
     
    133139                logger -t "$device" "Channel not specified. Ignoring." 
    134140                return 0 
    135         }                
     141        } 
    136142        freq=$(iwlist $ifname freq | sed -n "s/^.*Channel 0*$channel : \([0-9.]*\).*/\1/p" | awk '{print $1*1000}') 
    137143        hwaddr=$(/sbin/ifconfig $ifname 2>&1 | sed -n 's/^.*HWaddr \([0-9A-Za-z\-]*\).*/\1/p' | sed -e 's/\-/:/g' | cut -c1-17) 
Note: See TracChangeset for help on using the changeset viewer.