diff options
author | James <> | 2013-03-17 12:16:37 +0000 |
---|---|---|
committer | James <> | 2013-03-17 12:16:37 +0000 |
commit | 27b76ab0671089c47506615a796a261e993896a7 (patch) | |
tree | 61213d67e7fa87b20356b23798558e2c4212c42f /package/admswconfig/files/.svn | |
download | trunk-36060-27b76ab0671089c47506615a796a261e993896a7.tar.gz trunk-36060-27b76ab0671089c47506615a796a261e993896a7.tar.bz2 trunk-36060-27b76ab0671089c47506615a796a261e993896a7.zip |
Diffstat (limited to 'package/admswconfig/files/.svn')
3 files changed, 192 insertions, 0 deletions
diff --git a/package/admswconfig/files/.svn/entries b/package/admswconfig/files/.svn/entries new file mode 100644 index 0000000..3b8fe7d --- /dev/null +++ b/package/admswconfig/files/.svn/entries @@ -0,0 +1,96 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/admswconfig/files +svn://svn.openwrt.org/openwrt + + + +2011-01-27T21:49:50.030327Z +25173 +florian + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +admswconfig +file + + + + +2013-03-17T12:13:10.000000Z +8d17c96209c6c9f3e9334e393040d629 +2008-03-20T20:11:21.745522Z +10635 +thepeople + + + + + + + + + + + + + + + + + + + + + +1460 + +admswswitch.sh +file + + + + +2013-03-17T12:13:10.000000Z +c9dc70f83d4bd6e997a5828bad6d4578 +2011-01-27T21:49:50.030327Z +25173 +florian + + + + + + + + + + + + + + + + + + + + + +456 + diff --git a/package/admswconfig/files/.svn/text-base/admswconfig.svn-base b/package/admswconfig/files/.svn/text-base/admswconfig.svn-base new file mode 100644 index 0000000..7231030 --- /dev/null +++ b/package/admswconfig/files/.svn/text-base/admswconfig.svn-base @@ -0,0 +1,68 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=05 + +start() { + [ -e /etc/config/network ] && exit 0 + + mkdir -p /etc/config + + board_name=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /system type/ {print $2}' /proc/cpuinfo) + + case "$board_name" in + "Compex WP54"*) + board="Compex WP54";; + esac + + echo "$board" |awk ' + function p(cfgname, name) { + if (c[name] != "") print " option " cfgname " \"" c[name] "\"" + } + + BEGIN { + FS="=" + c["lan_ifname"]="eth0" + c["wan_ifname"]="eth1" + c["eth0ports"]="1 2 3 4" + c["eth1ports"]="0" + } + END { + board=$1 + if (board == "Compex WP54") { + c["eth0ports"]="0" + c["eth1ports"]="1" + } + + print "#### VLAN configuration " + print "config switch" + p("eth0", "eth0ports") + p("eth1", "eth1ports") + print "" + print "" + print "#### Loopback configuration" + print "config interface loopback" + print " option ifname \"lo\"" + print " option proto static" + print " option ipaddr 127.0.0.1" + print " option netmask 255.0.0.0" + print "" + print "" + print "#### LAN configuration" + print "config interface lan" + print " option type bridge" + p("ifname", "lan_ifname") + p("macaddr", "lan_macaddr") + print " option proto static" + print " option ipaddr 192.168.1.1" + print " option netmask 255.255.255.0" + print "" + print "" + print "#### WAN configuration" + print "config interface wan" + p("ifname", "wan_ifname") + p("macaddr", "wan_macaddr") + print " option proto dhcp" + }' > /etc/config/network +} + diff --git a/package/admswconfig/files/.svn/text-base/admswswitch.sh.svn-base b/package/admswconfig/files/.svn/text-base/admswswitch.sh.svn-base new file mode 100644 index 0000000..984d7ee --- /dev/null +++ b/package/admswconfig/files/.svn/text-base/admswswitch.sh.svn-base @@ -0,0 +1,28 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org + +setup_switch_vlan() { + config_get ports "$CONFIG_SECTION" "eth$1" + ports=`echo "$ports"| sed s/" "/""/g` + ifconfig eth$1 down + admswconfig eth$1 ${ports}c + ifconfig eth$1 up +} + +setup_switch() { + config_cb() { + case "$1" in + switch) + option_cb() { + case "$1" in + eth*) setup_switch_vlan "${1##eth}";; + esac + } + ;; + *) + option_cb() { return 0; } + ;; + esac + } + config_load network +} |