Changeset 28820


Ignore:
Timestamp:
2011-11-07T22:43:56+01:00 (6 years ago)
Author:
juhosg
Message:

ar71xx: create even more network configs from the uci-defaults script

Create the default network configuration dynamically for the
AR724x/AR9331 boards. Some other boards are using the same
configuration, so convert those as well.

Location:
trunk/target/linux/ar71xx/base-files/etc
Files:
16 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/base-files/etc/uci-defaults/network

    r28819 r28820  
    4545} 
    4646 
     47add_switch() { 
     48        local name=$1 
     49        local reset=$2 
     50        local enable=$3 
     51        uci batch <<EOF 
     52add network switch 
     53set network.@switch[-1].name='$name' 
     54set network.@switch[-1].reset='$reset' 
     55set network.@switch[-1].enable_vlan='$enable' 
     56EOF 
     57} 
     58 
     59add_switch_vlan() { 
     60        local device=$1 
     61        local vlan=$2 
     62        local ports=$3 
     63        uci batch <<EOF 
     64add network switch_vlan 
     65set network.@switch_vlan[-1].device='$device' 
     66set network.@switch_vlan[-1].vlan='$vlan' 
     67set network.@switch_vlan[-1].ports='$ports' 
     68EOF 
     69} 
     70 
    4771[ -e /etc/config/network ] && exit 0 
    4872 
     
    7498        ;; 
    7599 
     100ap121 |\ 
     101ap121-mini |\ 
     102ap96 |\ 
     103dir-600-a1 |\ 
     104dir-615-c1 |\ 
     105ja76pf |\ 
     106rb750 |\ 
     107tew-632brp |\ 
     108tl-mr3220 |\ 
     109tl-mr3420 |\ 
     110tl-wr741nd |\ 
     111tl-wr741nd-v4 |\ 
     112whr-g301n |\ 
     113whr-hp-g300n |\ 
     114whr-hp-gn |\ 
     115wzr-hp-ag300h) 
     116        set_interfaces_lan_wan "eth0" "eth1" 
     117        add_switch "eth0" "1" "1" 
     118        add_switch_vlan "eth0" "1" "0 1 2 3 4" 
     119        ;; 
     120 
    76121*) 
    77122        set_interfaces_lan_wan "eth0" "eth1" 
Note: See TracChangeset for help on using the changeset viewer.