Changeset 1830

Show
Ignore:
Timestamp:
06/01/11 14:41:15 (2 years ago)
Author:
matthijs
Message:

fonbase: Don't setup a mgmt ip in config.sh.

This 169.254.255.x IP is setup as a second ip on the br-lan interface.
However, when the normal network config scripts are run, this bridge is
usually destroyed anyway. Then, in the /etc/hotplug.d/net/90-mgmtnetwork
script, the ip is re-added. So this code in config.sh seems pretty
useless.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/fon/fonbase/files/lib/fon/config.sh

    r1829 r1830  
    317317        uci_add "network" "interface" "hotspotwifi" 
    318318        uci_set "network" "hotspotwifi" "proto" "none" 
    319          
    320         ################################### 
    321         # Setup the mgmt ip address on the 
    322         # lan network 
    323         ################################### 
    324         local ifn="$mgmt_ifname" 
    325  
    326         ifconfig "$ifn:1" 127.1.6.8 up # use an invalid address as source for arping 
    327  
    328         local ip=169.254.255.1 
    329         while :; do 
    330                 if arping -c 1 -I "$ifn" -s 127.1.6.8 "$ip" >/dev/null 2>/dev/null; then 
    331                         # already taken 
    332                         ip="169.254.255.$((${ip##*\.} + 1))" 
    333                 else 
    334                         break; 
    335                 fi 
    336  
    337                 # this should never happen: 
    338                 [ "${ip##*\.}" = "254" ] && { 
    339                         ifconfig "$ifn:1" 0.0.0.0 down 
    340                         return 1 
    341                 } 
    342         done 
    343         ifconfig "$ifn:1" "$ip" netmask 255.255.0.0 
    344319} 
    345320