aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2006-12-21 00:26:45 +0000
committerRod Whitby <rod@whitby.id.au>2006-12-21 00:26:45 +0000
commit86d153f98f934bd807bc755620c2e72be1fb4ba2 (patch)
tree0caed685fcb3020f1570c737a0040dacde1ccd32 /target
parentc9b580af740c552883152e5490b909ae07652a70 (diff)
downloadmaster-187ad058-86d153f98f934bd807bc755620c2e72be1fb4ba2.tar.gz
master-187ad058-86d153f98f934bd807bc755620c2e72be1fb4ba2.tar.bz2
master-187ad058-86d153f98f934bd807bc755620c2e72be1fb4ba2.zip
Moved netconfig (for ixp4xx only) to S15, so that it can access /proc/cpuinfo to determine which type of board it is on. Added ifup commands at the end to bring up the interfaces.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5886 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/ixp4xx-2.6/base-files/etc/init.d/netconfig24
1 files changed, 7 insertions, 17 deletions
diff --git a/target/linux/ixp4xx-2.6/base-files/etc/init.d/netconfig b/target/linux/ixp4xx-2.6/base-files/etc/init.d/netconfig
index 352a2a9a2b..ded5f4b8d6 100755
--- a/target/linux/ixp4xx-2.6/base-files/etc/init.d/netconfig
+++ b/target/linux/ixp4xx-2.6/base-files/etc/init.d/netconfig
@@ -1,7 +1,7 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
-START=05
+START=15
# hardware
# the 'Hardware' string from cpuinfo
@@ -25,18 +25,6 @@ machine(){
esac
}
-# Returns the mtd device with the specified name (without leading /dev)
-# $1 = name of mtd device
-get_mtd() {
- grep "\"$1\"*$" /proc/mtd | cut -d : -f 1
-}
-
-# Returns the mtd block device with the specified name (without leading /dev)
-# $1 = name of mtd device
-get_mtdblock() {
- echo $(get_mtd "$1") | sed 's/mtd/mtdblock/'
-}
-
start() {
[ -e /etc/config/network ] && exit 0
@@ -62,7 +50,6 @@ start() {
BEGIN {
FS="="
- getline model
}
{ c[$1] = $2 }
@@ -78,8 +65,8 @@ start() {
print ""
print "#### LAN configuration"
print "config interface lan"
- print " option ifname eth0"
- if ((model == "nslu2") || (model == "nas100d")) {
+ print " option ifname \"eth0\""
+ if ((c["model"] == "nslu2") || (c["model"] == "nas100d")) {
p("proto", "bootproto")
p("ipaddr", "ip_addr")
p("netmask", "netmask")
@@ -88,7 +75,10 @@ start() {
p("hostname", "disk_server_name")
}
else {
- print " option proto dhcp"
+ print " option proto dhcp"
}
}' > /etc/config/network
+
+ ifup loopback
+ ifup lan
}