From 6500719d9cd1b9bb7cf1cff5051c6396886b4537 Mon Sep 17 00:00:00 2001 From: mbm Date: Tue, 7 Sep 2004 05:54:07 +0000 Subject: wap54g support separate S50services into individual files move nvram_get to 'nvram get' making nvram overrides more transparent git-svn-id: svn://svn.openwrt.org/openwrt/trunk@155 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- obsolete-buildroot/sources/openwrt/root/etc/init.d/S10boot | 11 +++-------- obsolete-buildroot/sources/openwrt/root/etc/init.d/S40network | 4 ++-- .../sources/openwrt/root/etc/init.d/S45firewall | 2 +- obsolete-buildroot/sources/openwrt/root/etc/init.d/S50dnsmasq | 2 ++ obsolete-buildroot/sources/openwrt/root/etc/init.d/S50httpd | 2 ++ .../sources/openwrt/root/etc/init.d/S50services | 4 ---- obsolete-buildroot/sources/openwrt/root/etc/init.d/S50telnet | 2 ++ obsolete-buildroot/sources/openwrt/root/etc/init.d/S99done | 3 ++- 8 files changed, 14 insertions(+), 16 deletions(-) create mode 100755 obsolete-buildroot/sources/openwrt/root/etc/init.d/S50dnsmasq create mode 100755 obsolete-buildroot/sources/openwrt/root/etc/init.d/S50httpd delete mode 100755 obsolete-buildroot/sources/openwrt/root/etc/init.d/S50services create mode 100755 obsolete-buildroot/sources/openwrt/root/etc/init.d/S50telnet (limited to 'obsolete-buildroot/sources/openwrt/root/etc/init.d') diff --git a/obsolete-buildroot/sources/openwrt/root/etc/init.d/S10boot b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S10boot index 0d8f2e2bb..b650c9464 100755 --- a/obsolete-buildroot/sources/openwrt/root/etc/init.d/S10boot +++ b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S10boot @@ -1,14 +1,14 @@ #!/bin/sh +syslogd -C 16 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 + # if default wifi mac, set two higher than the lan 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}') + awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}') } insmod et @@ -18,12 +18,7 @@ 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 - -syslogd -C 16 diff --git a/obsolete-buildroot/sources/openwrt/root/etc/init.d/S40network b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S40network index 5a6ca725b..a8144a837 100755 --- a/obsolete-buildroot/sources/openwrt/root/etc/init.d/S40network +++ b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S40network @@ -7,9 +7,9 @@ case "$1" in ifup wifi wifi up - for route in $(nvram_get static_route); do { + 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 + $DEBUG route add -net $1 netmask $2 gw $3 metric $4 dev $5 } done ;; esac diff --git a/obsolete-buildroot/sources/openwrt/root/etc/init.d/S45firewall b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S45firewall index 4885c7c08..49b9df000 100755 --- a/obsolete-buildroot/sources/openwrt/root/etc/init.d/S45firewall +++ b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S45firewall @@ -1,7 +1,7 @@ #!/bin/sh . /etc/functions.sh -WAN=$(nvram_get wan_ifname) +WAN=$(nvram get wan_ifname) IPT=/usr/sbin/iptables diff --git a/obsolete-buildroot/sources/openwrt/root/etc/init.d/S50dnsmasq b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S50dnsmasq new file mode 100755 index 000000000..995c1b6e7 --- /dev/null +++ b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S50dnsmasq @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/sbin/dnsmasq diff --git a/obsolete-buildroot/sources/openwrt/root/etc/init.d/S50httpd b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S50httpd new file mode 100755 index 000000000..fd66f8032 --- /dev/null +++ b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S50httpd @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/sbin/httpd -p 80 -h /www -r WRT54G Router diff --git a/obsolete-buildroot/sources/openwrt/root/etc/init.d/S50services b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S50services deleted file mode 100755 index bdd1102f9..000000000 --- a/obsolete-buildroot/sources/openwrt/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/obsolete-buildroot/sources/openwrt/root/etc/init.d/S50telnet b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S50telnet new file mode 100755 index 000000000..29af5040a --- /dev/null +++ b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S50telnet @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/sbin/telnetd -l /bin/login diff --git a/obsolete-buildroot/sources/openwrt/root/etc/init.d/S99done b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S99done index 73a4da468..8811e99bf 100755 --- a/obsolete-buildroot/sources/openwrt/root/etc/init.d/S99done +++ b/obsolete-buildroot/sources/openwrt/root/etc/init.d/S99done @@ -1,6 +1,7 @@ #!/bin/sh +# automagically run firstboot [ -z "$FAILSAFE" ] && { { mount | grep jffs2 1>&-; } || firstboot } -# turn off DMZ led +# set leds to normal state echo "0x00" > /proc/sys/diag -- cgit v1.2.3