You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/target/linux/lantiq/ase/base-files/etc/board.d/02_network

44 lines
694 B
Bash

#!/bin/sh
#
# Copyright (C) 2011-2015 OpenWrt.org
#
. /lib/functions/uci-defaults.sh
. /lib/functions/system.sh
. /lib/functions/lantiq.sh
board_config_update
annex="a"
lan_mac=""
wan_mac=""
board=$(board_name)
case "$board" in
allnet,all0333cj)
annex="b"
lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" 1)
ucidef_set_interface_lan 'eth0'
;;
netgear,dgn1000b)
annex="b"
ucidef_set_interface_lan 'eth0'
;;
*)
ucidef_set_interface_lan 'eth0'
;;
esac
lantiq_setup_dsl_helper "$annex"
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac"
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac"
board_config_flush
exit 0