finally fix the /etc/config/network bug on wgt634u (#214, #215, #219)
authorFelix Fietkau <nbd@openwrt.org>
Tue, 31 Jan 2006 22:36:07 +0000 (22:36 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 31 Jan 2006 22:36:07 +0000 (22:36 +0000)
SVN-Revision: 3105

openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig
openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram
openwrt/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig

index 719dab7..94ee18e 100755 (executable)
@@ -4,7 +4,7 @@
 mkdir -p /etc/config
 
 (
-       if [ "$(/usr/bin/head -c4 /dev/mtdblock/1 | /usr/bin/tail -c3)" = "ELF" ]; then
+       if grep 'mtd0: 00060000' /proc/mtd 2>&- >&-; then
                # WGT634u
                echo boardtype=wgt634u
        else
index dbae256..b985948 100755 (executable)
@@ -7,7 +7,7 @@
 alias debug=${DEBUG:-:}
 
 # WGT634u
-[ "$(/usr/bin/head -c4 /dev/mtdblock/1 | /usr/bin/tail -c3)" = "ELF" ] && exit
+grep 'mtd0: 00060000' /proc/mtd 2>&- >&- && exit
 
 remap () {
        for type in lan wifi wan pppoe
index 719dab7..94ee18e 100755 (executable)
@@ -4,7 +4,7 @@
 mkdir -p /etc/config
 
 (
-       if [ "$(/usr/bin/head -c4 /dev/mtdblock/1 | /usr/bin/tail -c3)" = "ELF" ]; then
+       if grep 'mtd0: 00060000' /proc/mtd 2>&- >&-; then
                # WGT634u
                echo boardtype=wgt634u
        else