6 if [ ! -x /usr
/sbin
/maccalc
]; then
7 echo "$0: maccalc not found!"
14 set network.lan.ifname=eth0.1
15 set network.wan=interface
16 set network.wan.ifname=eth0.2
17 set network.wan.proto=dhcp
28 part
=$
(find_mtd_part
"$mtdname")
29 if [ -z "$part" ]; then
30 echo "get_mac_binary: partition $mtdname not found!" >&2
34 dd bs
=1 skip
=$seek count
=6 if=$part 2>/dev
/null |
/usr
/sbin
/maccalc bin2mac
44 part
=$
(find_mtd_part
"$mtdname")
45 if [ -z "$part" ]; then
46 echo "get_mac_nvram: partition $mtdname not found!" >&2
50 mac_dirty
=$
(strings "$part" |
sed -n 's/'"$key"'=//p')
52 maccalc add
"$mac_dirty" 0
61 set network.$iface.macaddr=""$mac"
66 ramips_setup_interfaces
()
79 RT3X5X
=`cat /proc/cpuinfo | grep RT3.5`
80 [ -z "${RT3X5X}" ] || create_lan_wan
93 lan_mac
=$
(get_mac_nvram
"u-boot" 262148)
94 wan_mac
=$
(/usr
/sbin
/maccalc add
"$lan_mac" 1)
100 lan_mac
=$
(get_mac_binary factory
4)
101 wan_mac
=$
(/usr
/sbin
/maccalc add
"$lan_mac" 1)
105 [ -n $lan_mac ] && set_interface_mac lan
$lan_mac
106 [ -n $wan_mac ] && set_interface_mac wan
$wan_mac
109 board
=$
(ramips_board_name
)
111 ramips_setup_interfaces
$board
112 ramips_setup_macs
$board
This page took 0.053444 seconds and 5 git commands to generate.