Changeset 24024


Ignore:
Timestamp:
2010-11-17T20:19:02+01:00 (6 years ago)
Author:
jow
Message:

[backfire] merge r24020

Location:
branches/backfire/package/base-files
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/backfire/package/base-files/Makefile

    r24003 r24024  
    1111 
    1212PKG_NAME:=base-files 
    13 PKG_RELEASE:=43.9 
     13PKG_RELEASE:=43.10 
    1414 
    1515PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ 
  • branches/backfire/package/base-files/files/lib/network/config.sh

    r23280 r24024  
    229229        [ -z "$ipaddr" -o -z "$netmask" ] && [ -z "$ip6addr" ] && return 1 
    230230 
    231         local gateway ip6gw dns bcast 
     231        local gateway ip6gw dns bcast metric 
    232232        config_get gateway "$config" gateway 
    233233        config_get ip6gw "$config" ip6gw 
    234234        config_get dns "$config" dns 
    235235        config_get bcast "$config" broadcast 
     236        config_get metric "$config" metric 
    236237 
    237238        [ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" broadcast "${bcast:-+}" 
    238239        [ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" add "$ip6addr" 
    239         [ -z "$gateway" ] || $DEBUG route add default gw "$gateway" dev "$iface" 
    240         [ -z "$ip6gw" ] || $DEBUG route -A inet6 add default gw "$ip6gw" dev "$iface" 
     240        [ -z "$gateway" ] || $DEBUG route add default gw "$gateway" ${metric:+metric $metric} dev "$iface" 
     241        [ -z "$ip6gw" ] || $DEBUG route -A inet6 add default gw "$ip6gw" ${metric:+metric $metric} dev "$iface" 
    241242        [ -z "$dns" ] || add_dns "$config" $dns 
    242243 
  • branches/backfire/package/base-files/files/usr/share/udhcpc/default.script

    r23212 r24024  
    2020        local user_dns 
    2121        local user_router 
     22        local user_metric 
    2223 
    2324        [ -n "$ifc" ] && { 
     
    4445                old_router="$(uci_get_state network "$ifc" gateway)" 
    4546                user_router="$(uci_get network "$ifc" gateway)" 
     47                user_metric="$(uci_get network "$ifc" metric)" 
    4648                [ -n "$user_router" ] && router="$user_router" 
    4749        } 
     
    5254                local valid_gw="" 
    5355                for i in $router ; do 
    54                         route add default gw $i dev $interface 
     56                        route add default gw $i ${user_metric:+metric $user_metric} dev $interface 
    5557                        valid_gw="${valid_gw:+$valid_gw|}$i" 
    5658                done 
Note: See TracChangeset for help on using the changeset viewer.