Changeset 754


Ignore:
Timestamp:
2005-04-29T09:18:24+02:00 (13 years ago)
Author:
mbm
Message:

* empty log message *

Location:
trunk/openwrt/target/default/target_skeleton
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/openwrt/target/default/target_skeleton/etc/init.d/S10boot

    r703 r754  
    4141        { mount | grep jffs2 1>&-; } || firstboot 
    4242} 
    43  
    44 sysctl -p 
  • trunk/openwrt/target/default/target_skeleton/etc/init.d/S45firewall

    r705 r754  
    3333  iptables -A INPUT -p icmp -j ACCEPT           # allow ICMP 
    3434  iptables -A INPUT -p 47 -j ACCEPT             # allow GRE 
     35  iptables -A INPUT -p tcp --syn --tcp-option \! 2 -j  DROP 
    3536  # 
    3637  # insert accept rule or to jump to new accept-check table here 
     
    3940 
    4041  # reject (what to do with anything not allowed earlier) 
    41   iptables -A INPUT -p tcp --syn --tcp-option \! 2 -j  DROP 
    4242  iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset 
    4343  iptables -A INPUT -j REJECT --reject-with icmp-port-unreachable 
  • trunk/openwrt/target/default/target_skeleton/etc/init.d/S99done

    r549 r754  
    22# set leds to normal state 
    33echo "0x00" > /proc/sys/diag 
     4sysctl -np 
  • trunk/openwrt/target/default/target_skeleton/etc/nvram.overrides

    r686 r754  
    1010NVRAM_lan_proto="static" 
    1111 
     12remap () { 
     13  for type in lan wifi wan pppoe 
     14  do 
     15    for s in '' s 
     16    do 
     17      eval NVRAM_${type}_ifname$s=\"$(nvram get ${type}_ifname$s|sed s/$1/$2/g)\"  
     18    done 
     19  done 
     20} 
     21 
    1222# hacks for wrt54g 1.x hardware 
    1323[ "$(nvram get boardnum)"  = "42" ] && \ 
    1424[ "$(nvram get boardtype)" = "bcm94710dev" ] && { 
    15  
    16   # remap eth0 => vlan2, eth1 => vlan1 
    17   # for all *_ifname(s) 
    18  
    1925  debug "### wrt54g 1.x hack ###" 
    2026  NVRAM_vlan1hwname="et0" 
    2127  NVRAM_vlan2hwname="et0" 
    2228  FAILSAFE_ifnames="vlan1 vlan2 eth2" 
     29  remap eth0 vlan2 
     30  remap eth1 vlan1 
     31} 
    2332 
    24   remap () { 
    25     eval NVRAM_$1=\"$(nvram get $1 | awk 'gsub("eth0","vlan2") gsub("eth1","vlan1")')\" 
    26   } 
    27  
    28   for type in lan wifi wan pppoe 
    29   do 
    30     remap ${type}_ifname 
    31     remap ${type}_ifnames 
    32   done 
     33# hacks for asus wl-500g deluxe 
     34[ "$(nvram get boardtype)" = "bcm95365r" ] && \ 
     35[ "$(nvram get boardnum)" = "45" ] && { 
     36  debug "### wl-500g deluxe hacks ###" 
     37  NVRAM_vlan0hwname="et0" 
     38  NVRAM_vlan1hwname="et0" 
     39  FAILSAFE_ifnames="vlan0 vlan1 eth2" 
     40  remap eth0. vlan 
    3341} 
    3442 
     
    4553[ "$(nvram get product_name)" = "Product_name" ] && { 
    4654  debug "### wla2-g54l hacks ###" 
     55  NVRAM_wan_ifname="none" 
    4756  NVRAM_lan_ifnames="vlan0" 
    48   NVRAM_wan_ifname="none" 
    4957} 
    5058 
     
    5260[ "$(nvram get boardnum)"  = "asusX" ] && \ 
    5361[ "$(nvram get boardtype)"  = "bcm94710dev" ] && { 
    54   FAILSAFE_lan_ifnames="eth0 eth2" 
    55 } 
    56  
    57 # hacks for asus wl-500g deluxe 
    58 [ "$(nvram get boardtype)" = "bcm95365r" ] && \ 
    59 [ "$(nvram get boardnum)" = "45" ] && { 
    60   debug "### wl-500g deluxe hacks ###" 
    61   NVRAM_vlan0hwname="et0" 
    62   NVRAM_vlan1hwname="et0" 
    63   NVRAM_lan_ifnames="vlan0 eth1" 
    64   [ "$(nvram get wan_ifname)" = "eth0.1" ] && { 
    65     NVRAM_wan_ifname="vlan1" 
    66   } 
     62  FAILSAFE_ifnames="eth0 eth2" 
    6763} 
    6864 
     
    7066[ -z "$(nvram get lan_ifname)" ] && { 
    7167  NVRAM_lan_ifname="br0" 
    72   NVRAM_lan_ifnames=${FAILSAFE_lan_ifnames:-"vlan0 vlan2 eth1 eth2 eth3"} 
     68  NVRAM_lan_ifnames=${FAILSAFE_ifnames:-"vlan0 vlan2 eth1 eth2 eth3"} 
    7369} 
    7470 
     
    7773   NVRAM_wan_ifname="vlan1" 
    7874   NVRAM_wan_proto="dhcp" 
    79    [ "$asus" ] && { 
    80      NVRAM_wan_ifname="eth1" 
    81    } 
    8275} 
    8376 
     
    8679  echo "### YOU ARE IN FAILSAFE MODE ####" 
    8780  NVRAM_lan_ifname="br0" 
    88   NVRAM_lan_ifnames=${FAILSAFE_ifnames:-"vlan0 vlan1 eth1"} 
     81  NVRAM_lan_ifnames=${FAILSAFE_ifnames:-"vlan0 vlan1 eth1 eth2 eth3"} 
    8982  NVRAM_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"} 
    9083  NVRAM_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"} 
  • trunk/openwrt/target/default/target_skeleton/sbin/ifup

    r709 r754  
    4646    ;; 
    4747    dhcp) 
     48      ip=$(nvram get ${type}_ipaddr) 
    4849      pidfile=/tmp/dhcp-${type}.pid 
    4950      if [ -f $pidfile ]; then 
    5051        $DEBUG kill $(cat $pidfile) 
    5152      fi 
    52       ${DEBUG:-eval} "udhcpc -i $if -b -p $pidfile &"  
     53      ${DEBUG:-eval} "udhcpc -i $if ${ip:+-r $ip} -b -p $pidfile &"  
    5354    ;; 
    5455    pppoe) 
Note: See TracChangeset for help on using the changeset viewer.