Changeset 2993


Ignore:
Timestamp:
2006-01-16T04:14:59+01:00 (11 years ago)
Author:
nbd
Message:

port wan_device changes from whiterussian to kamikaze

Location:
trunk/openwrt
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/openwrt/package/base-files/default/etc/hotplug.d/net/10-net

    r2973 r2993  
    2727                        ;; 
    2828                        *) 
    29                                 [ "$(nvram get ${IFPROTO}_ifname)" = "$INTERFACE" \ 
     29                                [ "$(nvram get ${IFTYPE}_device)" = "$INTERFACE" \ 
    3030                                  -a -x /sbin/ifup.${IFPROTO} ] && return 0 
    3131                        ;; 
  • trunk/openwrt/package/base-files/default/sbin/ifdown

    r2537 r2993  
    1616esac 
    1717 
    18 [ "${if%%[0-9]*}" = "ppp" ] && if="$(nvram get ${if_proto}_ifname)" 
     18[ "${if%%[0-9]*}" = "ppp" ] && if="$(nvram get ${type}_device)" 
    1919 
    2020if [ "${if%%[0-9]}" = "br" ]; then 
  • trunk/openwrt/package/base-files/default/sbin/ifup

    r2537 r2993  
    2424esac 
    2525 
    26 [ "${if%%[0-9]*}" = "ppp" ] && if="$(nvram get ${if_proto}_ifname)" 
     26[ "${if%%[0-9]*}" = "ppp" ] && if="$(nvram get ${type}_device)" 
    2727 
    2828if [ "${if%%[0-9]}" = "br" ]; then 
  • trunk/openwrt/package/ppp/files/ifup.pppoe

    r2534 r2993  
    1515done 
    1616 
    17 IFNAME=$(nvram get pppoe_ifname) 
     17IFNAME=$(nvram get ${type}_device) 
    1818USERNAME=$(nvram get ppp_username) 
    1919PASSWORD=$(nvram get ppp_passwd) 
  • trunk/openwrt/package/pptp/files/ifup.pptp

    r2534 r2993  
    3434# hack for some buggy ISPs 
    3535NETMASK=$(nvram get ${type}_netmask) 
    36 IFNAME=$(nvram get pptp_ifname) 
     36IFNAME=$(nvram get ${type}_device) 
    3737[ -z "$NETMASK" -o -z "$IFNAME" ] || ifconfig $IFNAME netmask $NETMASK 
    3838 
  • trunk/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig

    r2902 r2993  
    8989        print "#   pptp: Point-to-Point tunneling Protocol" 
    9090        print "#     for pppoe and pptp you need to use wan_ifname=\"ppp0\"" 
    91         print "#     and {pppoe,pptp}ifname=\"" c["wan_ifname"] "\")" 
    9291        print "" 
    9392        print "wan_proto=dhcp" 
    9493        p("wan_ifname") 
     94        print "wan_device=\"" c["wan_ifname"] "\"" 
    9595        print "# wan_ipaddr=\"192.168.0.2\"" 
    9696        print "# wan_netmask=\"255.255.255.0\"" 
     
    100100        print "## PPP over Ethernet and PPTP" 
    101101        print "# wan_ifname=\"ppp0\"" 
    102         print "# pppoe_ifname=\"" c["wan_ifname"] "\"" 
    103         print "# pptp_ifname=\"" c["wan_ifname"] "\"" 
    104102        print "# pptp_server_ip=\"192.168.0.1\"" 
    105103} 
  • trunk/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram

    r2902 r2993  
    108108                nvram set wan_ifname="none" 
    109109        ;; 
     110        *) 
     111                # wl-500g defaults. these are placed here, because WL-HDD and WL-300g 
     112                # might have the same nvram settings. 
     113                [ "$(nvram get boardnum)" = "asusX" \ 
     114                -a "$(nvram get boardtype)" = "bcm94710dev" ] && { 
     115                        nvram_default wan_device "eth1" 
     116                } 
     117        ;; 
    110118esac 
    111119 
     
    131139} 
    132140 
    133 WAN_PROTO="$(nvram get wan_proto)" 
    134 [  "$WAN_PROTO" = "pptp" \ 
    135 -o "$WAN_PROTO" = "pppoe" ] && { 
    136         WAN_IFNAME="$(nvram get wan_ifname)" 
    137         [ "${WAN_IFNAME%%[0-9]*}" = "ppp" ] || { 
    138                 nvram set wan_ifname=ppp0 
    139                 nvram set ${WAN_PROTO}_ifname="$WAN_IFNAME" 
    140         } 
    141 } 
    142  
    143141# defaults 
    144142nvram_default lan_ifname "br0" 
     
    146144 
    147145nvram_default wan_ifname "vlan1" 
     146nvram_default wan_device "vlan1" 
    148147nvram_default wan_proto "dhcp" 
    149148 
     
    153152nvram_default wl0_radio 1 
    154153 
     154WAN_PROTO="$(nvram get wan_proto)" 
     155WAN_IFNAME="$(nvram get wan_ifname)" 
     156case "$WAN_PROTO" in 
     157        pp*) [ "${WAN_IFNAME%%[0-9]*}" = "ppp" ] || nvram set wan_ifname=ppp0;; 
     158        *) [ "${WAN_IFNAME%%[0-9]*}" = "ppp" ] && nvram set wan_ifname="$(nvram get wan_device)";; 
     159esac 
     160 
    155161[ "$(nvram get il0macaddr)" = "00:90:4c:5f:00:2a" ] && { 
    156162        # if default wifi mac, set two higher than the lan mac 
  • trunk/openwrt/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig

    r2930 r2993  
    5858        if ((nvram["boardnum"] == "2") || \ 
    5959                (nvram["boardnum"] == "1024")) { 
    60                 c["lan_ifnames"]="eth1 eth2" 
     60                c["lan_ifnames"]="eth0 eth1" 
    6161                c["wan_ifname"]="" 
    62                 c["unused_ifnames"]="eth0" 
    6362        } 
    6463 
     
    8079 
    8180        print "" 
    82         p("unused_ifnames") 
    8381        print "" 
    8482 
     
    9189        print "#   pptp: Point-to-Point tunneling Protocol" 
    9290        print "#     for pppoe and pptp you need to use wan_ifname=\"ppp0\"" 
    93         print "#     and {pppoe,pptp}ifname=\"" c["wan_ifname"] "\")" 
    9491        print "" 
    9592        print "wan_proto=dhcp" 
    9693        p("wan_ifname") 
     94        print "wan_device=\"" c["wan_ifname"] "\"" 
    9795        print "# wan_ipaddr=\"192.168.0.2\"" 
    9896        print "# wan_netmask=\"255.255.255.0\"" 
     
    102100        print "## PPP over Ethernet and PPTP" 
    103101        print "# wan_ifname=\"ppp0\"" 
    104         print "# pppoe_ifname=\"" c["wan_ifname"] "\"" 
    105         print "# pptp_ifname=\"" c["wan_ifname"] "\"" 
    106102        print "# pptp_server_ip=\"192.168.0.1\"" 
    107103} 
Note: See TracChangeset for help on using the changeset viewer.