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