Initial commit
This commit is contained in:
13
target/linux/ipq806x/base-files/lib/preinit/04_reorder_eth
Normal file
13
target/linux/ipq806x/base-files/lib/preinit/04_reorder_eth
Normal file
@@ -0,0 +1,13 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
preinit_reorder_eth() {
|
||||
case $(board_name) in
|
||||
ubnt,unifi-ac-hd)
|
||||
ip link set eth0 name ethtmp
|
||||
ip link set eth1 name eth0
|
||||
ip link set ethtmp name eth1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main preinit_reorder_eth
|
||||
@@ -0,0 +1,14 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
preinit_set_mac_address() {
|
||||
case $(board_name) in
|
||||
asrock,g10)
|
||||
lan_mac=$(mtd_get_mac_ascii hwconfig HW.LAN.MAC.Address)
|
||||
wan_mac=$(mtd_get_mac_ascii hwconfig HW.WAN.MAC.Address)
|
||||
ip link set dev eth0 address "${lan_mac}"
|
||||
ip link set dev eth1 address "${wan_mac}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main preinit_set_mac_address
|
||||
Reference in New Issue
Block a user