diff options
Diffstat (limited to 'root/etc')
-rw-r--r-- | root/etc/dnsmasq.conf | 22 | ||||
-rwxr-xr-x | root/etc/functions.sh | 26 | ||||
-rwxr-xr-x | root/etc/init.d/S10boot | 27 | ||||
-rwxr-xr-x | root/etc/init.d/S40network | 15 | ||||
-rwxr-xr-x | root/etc/init.d/S45firewall | 23 | ||||
-rwxr-xr-x | root/etc/init.d/S50services | 4 | ||||
-rwxr-xr-x | root/etc/init.d/S99done | 6 | ||||
-rwxr-xr-x | root/etc/init.d/rcS | 25 | ||||
-rw-r--r-- | root/etc/inittab | 3 | ||||
-rw-r--r-- | root/etc/ipkg.conf | 3 | ||||
-rw-r--r-- | root/etc/motd | 6 | ||||
-rw-r--r-- | root/etc/nvram.overrides | 52 | ||||
-rwxr-xr-x | root/etc/preinit | 17 | ||||
-rw-r--r-- | root/etc/profile | 8 | ||||
-rw-r--r-- | root/etc/sysctl.conf | 7 |
15 files changed, 0 insertions, 244 deletions
diff --git a/root/etc/dnsmasq.conf b/root/etc/dnsmasq.conf deleted file mode 100644 index c62f7f991c..0000000000 --- a/root/etc/dnsmasq.conf +++ /dev/null @@ -1,22 +0,0 @@ -# filter what we send upstream -domain-needed -bogus-priv -filterwin2k - -# allow /etc/hosts and dhcp lookups via *.lan -local=/lan/ -domain=lan - -# no dns queries from the wan -except-interface=vlan1 - -# enable dhcp (start,end,netmask,leasetime) -dhcp-range=192.168.1.100,192.168.1.250,255.255.255.0,12h -dhcp-leasefile=/tmp/dhcp.leases - -# allow a /etc/ethers for static hosts -read-ethers - -# other useful options: -# default route(s): dhcp-option=3,192.168.1.1,192.168.1.2 -# dns server(s): dhcp-option=6,192.168.1.1,192.168.1.2 diff --git a/root/etc/functions.sh b/root/etc/functions.sh deleted file mode 100755 index 79db1dad3a..0000000000 --- a/root/etc/functions.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/ash - -alias debug=${DEBUG:-:} - -# allow env to override nvram -nvram_get () { - eval "echo \${$1:-\$(nvram get $1)}" -} -. /etc/nvram.overrides - -# valid interface? -if_valid () ( - [ "${1%%[0-9]}" = "vlan" ] && { - i=${1#vlan} - hwname=$(nvram_get vlan${i}hwname) - hwaddr=$(nvram_get ${hwname}macaddr) - [ -z "$hwaddr" ] && return 1 - - vif=$(ifconfig -a | awk '/^eth.*'$hwaddr'/ {print $1; exit}' IGNORECASE=1) - debug "# vlan$i: $hwname $hwaddr => $vif" - - $DEBUG ifconfig $vif up - $DEBUG vconfig add $vif $i 2>/dev/null - } - ifconfig "$1" >/dev/null 2>&1 || [ "${1%%[0-9]}" = "br" ] -) diff --git a/root/etc/init.d/S10boot b/root/etc/init.d/S10boot deleted file mode 100755 index 11bc31b1bc..0000000000 --- a/root/etc/init.d/S10boot +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -sysctl -p -echo "S" > /proc/jffs2_bbc - -mkdir -p /var/run - -# networking stub -[ "$(nvram get il0macaddr)" = "00:90:4c:5f:00:2a" ] && { - # force unique wireless mac - nvram set il0macaddr=$(nvram get et0macaddr| - awk '{OFS=FS=":";for(x=6,y=2;x;x--){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}') -} - -insmod et -insmod wl - -ifconfig lo 127.0.0.1 up -ifconfig eth0 promisc - -HOSTNAME=$(nvram get wan_hostname) -DOMAINNAME=${HOSTNAME##*.} -HOSTNAME=${HOSTNAME%%.*} - -echo ${HOSTNAME:=OpenWrt} > /proc/sys/kernel/hostname -echo ${DOMAINNAME:=lan} > /proc/sys/kernel/domainname - -vconfig set_name_type VLAN_PLUS_VID_NO_PAD diff --git a/root/etc/init.d/S40network b/root/etc/init.d/S40network deleted file mode 100755 index 5a6ca725b5..0000000000 --- a/root/etc/init.d/S40network +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -. /etc/functions.sh -case "$1" in - start|restart) - ifup lan - ifup wan - ifup wifi - wifi up - - for route in $(nvram_get static_route); do { - eval "set $(echo $route | sed 's/:/ /g')" - route add -net $1 netmask $2 gw $3 metric $4 dev $5 - } done - ;; -esac diff --git a/root/etc/init.d/S45firewall b/root/etc/init.d/S45firewall deleted file mode 100755 index 4885c7c088..0000000000 --- a/root/etc/init.d/S45firewall +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -. /etc/functions.sh - -WAN=$(nvram_get wan_ifname) - -IPT=/usr/sbin/iptables - -for T in filter nat mangle ; do - $IPT -t $T -F - $IPT -t $T -X -done - -$IPT -t filter -A INPUT -m state --state INVALID -j DROP -$IPT -t filter -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -$IPT -t filter -A INPUT -p icmp -j ACCEPT -$IPT -t filter -A INPUT -i $WAN -p tcp -j REJECT --reject-with tcp-reset -$IPT -t filter -A INPUT -i $WAN -j REJECT --reject-with icmp-port-unreachable -$IPT -t filter -A FORWARD -m state --state INVALID -j DROP -$IPT -t filter -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT -$IPT -t filter -A FORWARD -i $WAN -m state --state NEW,INVALID -j DROP -$IPT -t filter -A FORWARD -o $WAN -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu - -$IPT -t nat -A POSTROUTING -o $WAN -j MASQUERADE diff --git a/root/etc/init.d/S50services b/root/etc/init.d/S50services deleted file mode 100755 index bdd1102f9b..0000000000 --- a/root/etc/init.d/S50services +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -/usr/sbin/telnetd -l /bin/login -/usr/sbin/httpd -p 80 -h /www -r WRT54G Router -/usr/sbin/dnsmasq diff --git a/root/etc/init.d/S99done b/root/etc/init.d/S99done deleted file mode 100755 index 73a4da4684..0000000000 --- a/root/etc/init.d/S99done +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -[ -z "$FAILSAFE" ] && { - { mount | grep jffs2 1>&-; } || firstboot -} -# turn off DMZ led -echo "0x00" > /proc/sys/diag diff --git a/root/etc/init.d/rcS b/root/etc/init.d/rcS deleted file mode 100755 index 9510e941a5..0000000000 --- a/root/etc/init.d/rcS +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -# Start all init scripts in /etc/init.d -# executing them in numerical order. -# -for i in /etc/init.d/S??* ;do - - # Ignore dangling symlinks (if any). - [ ! -f "$i" ] && continue - - case "$i" in - *.sh) - # Source shell script for speed. - ( - trap - INT QUIT TSTP - set start - . $i - ) - ;; - *) - # No sh extension, so fork subprocess. - $i start - ;; - esac -done diff --git a/root/etc/inittab b/root/etc/inittab deleted file mode 100644 index 9943a9002f..0000000000 --- a/root/etc/inittab +++ /dev/null @@ -1,3 +0,0 @@ -::sysinit:/etc/init.d/rcS -::shutdown:/sbin/halt -::respawn:/bin/login diff --git a/root/etc/ipkg.conf b/root/etc/ipkg.conf deleted file mode 100644 index c3581d790b..0000000000 --- a/root/etc/ipkg.conf +++ /dev/null @@ -1,3 +0,0 @@ -src openwrt http://openwrt.ksilebo.net/ipkg -dest root / -dest ram /tmp diff --git a/root/etc/motd b/root/etc/motd deleted file mode 100644 index 2b2b2c015b..0000000000 --- a/root/etc/motd +++ /dev/null @@ -1,6 +0,0 @@ - _______ ________ __ - | |.-----.-----.-----.| | | |.----.| |_ - | - || _ | -__| || | | || _|| _| - |_______|| __|_____|__|__||________||__| |____| - |__| W I R E L E S S F R E E D O M - diff --git a/root/etc/nvram.overrides b/root/etc/nvram.overrides deleted file mode 100644 index e334d75198..0000000000 --- a/root/etc/nvram.overrides +++ /dev/null @@ -1,52 +0,0 @@ -# NVRAM overrides -# This file handles the NVRAM quirks of various hardware -# this is not a replacement for nvram. - -# linksys bug has lan doing dhcp; force static -lan_proto="static" - -# failsafe if reset is held -[ "$FAILSAFE" = "true" ] && { - echo "### FAILSAFE MODE ####" - lan_ifname="br0" - lan_ifnames="vlan0 vlan2 eth1 eth2 eth3" - lan_ipaddr="192.168.1.1" - lan_netmask="255.255.255.0" - lan_hwaddr="00:0B:AD:0A:DD:00" - wan_ifname="none" - wifi_ifname="none" -} - -# hacks for 1.x hardware -[ "$(nvram get boardnum)" = "42" ] && \ -[ "$(nvram get boardtype)" = "bcm94710dev" ] && { - debug "### 1.x hardware hack ###" - vlan1hwname="et0" - vlan2hwname="et0" - - # we remap old device names to new - # it's recommended that you continue to - # use the old names to preserve backwards - # compatibility - remap () { - eval $1=\"$(nvram_get $1 | awk 'gsub("eth0","vlan2") gsub("eth1","vlan1")')\" - } - - remap lan_ifname - remap lan_ifnames - remap wifi_ifname - remap wifi_ifnames - remap wan_ifname - remap wan_ifnames - remap pppoe_ifname -} - -[ -z "$(nvram_get lan_ifname)" ] && { - lan_ifname="br0" - lan_ifnames="vlan0 vlan2 eth1 eth2 eth3" -} - -[ -z "$(nvram_get wan_ifname)" ] && { - wan_ifname="vlan1" - wan_proto="dhcp" -} diff --git a/root/etc/preinit b/root/etc/preinit deleted file mode 100755 index 1054282e8f..0000000000 --- a/root/etc/preinit +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -mount none /proc -t proc -insmod diag -echo 0x01 > /proc/sys/diag -sleep 1 -if /sbin/resetmon ; then - mtd unlock mtd4 - mount -t jffs2 /dev/mtdblock/4 /jffs - pivot_root /jffs /jffs/rom - mount none /dev -t devfs - mount none /proc -t proc - umount rom/proc rom/dev -else - export FAILSAFE=true -fi -mount none /tmp -t ramfs -exec /sbin/init diff --git a/root/etc/profile b/root/etc/profile deleted file mode 100644 index 833ce898ee..0000000000 --- a/root/etc/profile +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -[ -f /etc/motd ] && cat /etc/motd - -export PATH=/bin:/sbin:/usr/bin:/usr/sbin -export PS1='\u@\h:\w\$ ' - -alias less='more' -alias vim='vi' diff --git a/root/etc/sysctl.conf b/root/etc/sysctl.conf deleted file mode 100644 index 8552a4ba32..0000000000 --- a/root/etc/sysctl.conf +++ /dev/null @@ -1,7 +0,0 @@ -kernel.panic = 3 -net.ipv4.ip_forward = 1 -net.ipv4.icmp_echo_ignore_broadcasts = 1 -net.ipv4.icmp_ignore_bogus_error_responses = 1 -net.ipv4.tcp_fin_timeout = 30 -net.ipv4.tcp_keepalive_time = 120 -net.ipv4.tcp_timestamps = 0 |