[rdc] fix the mac address setting on sitecom devices after r20294
[openwrt-10.03/.git] / target / linux / rdc / base-files / lib / preinit / 05_set_ether_mac_rdc
index 43823c48eacd36dda34f10dd5a2e3acf832b5b81..1fe1109981bf5507eeabadfbce9a0f9c8a46d7ba 100644 (file)
@@ -1,14 +1,14 @@
 #!/bin/sh
 # Copyright (C) 2009 OpenWrt.org
 
-. /etc/boot.sh
+. /lib/functions/boot.sh
 
 r6040_module() {
        insmod r6040
 }
 
 set_ether_mac() {
-       kernel=$(grep magic /proc/mtd | awk -F: '{print $1}')
+       kernel=$(grep firmware /proc/mtd | awk -F: '{print $1}')
        [ -n $kernel ] && hdr=$(dd if=/dev/$kernel count=4 bs=1 2> /dev/null)
        [ "$hdr" = "CSYS" ] && config=$(find_mtd_part config)
        if [ -n "$config" ]; then