#!/bin/sh
-# $Id$
+# Copyright (C) 2006 OpenWrt.org
rom=$(awk '/squashfs/ {print $2}' /proc/mounts)
jffs=$(awk '/jffs2/ {print $2}' /proc/mounts)
# Network configuration file
+# Copyright (C) 2006 OpenWrt.org
+
## LAN configuration
lan_ifname="eth0"
# Network configuration file
+# Copyright (C) 2006 OpenWrt.org
## LAN configuration
lan_ifname="br0"
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
mount none /proc -t proc
size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo)
mount none /tmp -t tmpfs -o size=$size
#!/bin/sh
-# $Id$
+# Copyright (C) 2006 OpenWrt.org
rom=$(awk '/squashfs/ {print $2}' /proc/mounts)
jffs=$(awk '/jffs2/ {print $2}' /proc/mounts)
+# Copyright (C) 2006 OpenWrt.org
+
config wifi-device wl0
option type broadcom
option channel 5
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
setup_wl()
{
[ -f /proc/net/wl0 ] && {
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
[ -e /etc/config/network ] && exit 0
mkdir -p /etc/config
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
mount none /proc -t proc
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
is_dirty() {
grep Broadcom /proc/cpuinfo >&- || return 1
OFFSET="$(($(hexdump -v /dev/mtdblock/1 -s 20 -n 2 -e '"%d"')-1))"
#!/bin/sh
-# $Id$
+# Copyright (C) 2006 OpenWrt.org
rom=$(awk '/squashfs/ {print $2}' /proc/mounts)
jffs=$(awk '/jffs2/ {print $2}' /proc/mounts)
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
setup_eth()
{
[ -d /proc/switch ] || {
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
[ -e /etc/config/network ] && exit 0
mkdir -p /etc/config
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
mount none /proc -t proc
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
is_dirty() {
grep Broadcom /proc/cpuinfo >&- || return 1
OFFSET="$(($(hexdump -v /dev/mtdblock/1 -s 20 -n 2 -e '"%d"')-1))"
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
awk -f /usr/lib/common.awk -f - $* <<EOF
BEGIN {
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
grep '^root:[^!]' /etc/passwd >&- 2>&-
[ "$?" = "0" -a -z "$FAILSAFE" ] &&
{
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
alias debug=${DEBUG:-:}
# newline
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
find_name()
{
for ifname in lan wan wifi ${ifnames}; do
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
mount_storage() {
cd /dev/discs
for dev in disc*; do
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
. /etc/functions.sh
[ -f /proc/mounts ] || /sbin/mount_root
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
[ -d /www ] && httpd -p 80 -h /www -r OpenWrt
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
if awk -F: '/^root:/ && $2 !~ /\!/ {exit 1}' /etc/passwd 2>/dev/null; then telnetd -l /bin/login; fi
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
mkdir -p /var/spool/cron
ln -s /etc/crontabs /var/spool/cron/crontabs
crond -c /etc/crontabs
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
sysctl -p >&-
# automagically run firstboot
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
${FAILSAFE:+exit}
[ -f /etc/config/network ] && . /etc/config/network
#!/bin/ash
+# Copyright (C) 2006 OpenWrt.org
+
# allow env to override nvram
nvram () {
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
# bypass the normal hotplug path for firmware loading
# would otherwise cause problems with drivers like bcm43xx
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
[ $# = 0 ] && { echo " $0 <group>"; exit; }
. /etc/functions.sh
. /etc/config/network
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
[ $# = 0 ] && { echo " $0 <group>"; exit; }
. /etc/functions.sh
. /etc/config/network
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
mount none /proc -t proc
size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo)
mount none /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777
#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
. /etc/functions.sh
config_get_bool() {
+# Copyright (C) 2006 OpenWrt.org
+
function portstr(type, str) {
gsub(/-/, ":", str)
if (insmod_mport != 1) {
+# Copyright (C) 2006 OpenWrt.org
+
{
line=$0
gsub(/^[ \t]*/, "")
# Network configuration file
+# Copyright (C) 2006 OpenWrt.org
## LAN configuration
lan_ifname="eth0"
# Network configuration file
+# Copyright (C) 2006 OpenWrt.org
## LAN configuration
lan_ifname="br0"
+# Copyright (C) 2006 OpenWrt.org
+
::sysinit:/etc/init.d/rcS
duart/0::askfirst:/bin/ash --login
#tts/1::askfirst:/bin/ash --login
# Network configuration file
+# Copyright (C) 2006 OpenWrt.org
## LAN configuration
lan_ifname="br0"
# Network configuration file
+# Copyright (C) 2006 OpenWrt.org
## LAN configuration
lan_ifname="br0"
# Network configuration file
+# Copyright (C) 2006 OpenWrt.org
## LAN configuration
lan_ifname="eth0"