Changeset 3589


Ignore:
Timestamp:
2006-04-05T05:45:06+02:00 (12 years ago)
Author:
nbd
Message:

remove more nvram references

Location:
trunk/openwrt/target/linux/package/base-files/files
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net

    r3047 r3589  
    22setup_eth() 
    33{ 
    4         for part in $(nvram get unused_ifnames); do 
    5                 [ "$part" = "$INTERFACE" ] && exit 0 
    6         done 
    74        [ -f /proc/net/wl0 ] && { 
    85                lsmod | grep wlcompat >&- || insmod wlcompat 
     
    2118        echo "1" > "/proc/switch/$INTERFACE/enable_vlan" 
    2219        for vlan in $(seq 0 15); do 
    23                 [ "$(nvram get vlan${vlan}hwname)" = "$if" ] && { 
    24                         vports="$(nvram get vlan${vlan}ports)" 
     20                eval "hwname=\"\${vlan${vlan}hwname}\"" 
     21                [ "$hwname" = "$if" ] && { 
     22                        eval "vports=\"\${vlan${vlan}ports}\"" 
    2523                        [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports" 
    2624                        $DEBUG vconfig add "$INTERFACE" "$vlan" 
  • trunk/openwrt/target/linux/package/base-files/files/brcm-2.6/etc/hotplug.d/net/09-net

    r3047 r3589  
    22setup_eth() 
    33{ 
    4         for part in $(nvram get unused_ifnames); do 
    5                 [ "$part" = "$INTERFACE" ] && exit 0 
    6         done 
    74        [ -d /proc/switch ] || { 
    85                insmod switch-core 
     
    1512        echo "1" > "/proc/switch/$INTERFACE/enable_vlan" 
    1613        for vlan in $(seq 0 15); do 
    17                 [ "$(nvram get vlan${vlan}hwname)" = "$if" ] && { 
    18                         vports="$(nvram get vlan${vlan}ports)" 
     14                eval "hwname=\"\${vlan${vlan}hwname}\"" 
     15                [ "$hwname" = "$if" ] && { 
     16                        eval "vports=\"\${vlan${vlan}ports}\"" 
    1917                        [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports" 
    2018                        $DEBUG vconfig add "$INTERFACE" "$vlan" 
Note: See TracChangeset for help on using the changeset viewer.