brcm47xx: remove target specific network preinit config
The generic preinit code is now able to setup network and switch vlan settings from the /etc/board.json file, therefor drop the target specific code. Fixes FS#790. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
52e36cf80a
commit
833c500cb2
@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
preinit_iface() {
|
||||
ifname=eth0
|
||||
|
||||
# hardware specific overrides
|
||||
case "$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo)" in
|
||||
"Asus WLHDD") ifname=eth1;;
|
||||
"Asus WL300G") ifname=eth1;;
|
||||
esac
|
||||
|
||||
local try=0;
|
||||
while [ $((try++)) -le 5 ] && [ ! -f /sys/class/net/$ifname/operstate ]; do sleep 1; done
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main preinit_iface
|
@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
preinit_ip() {
|
||||
# if the preinit interface isn't specified and ifname is set in
|
||||
# preinit.arch use that interface
|
||||
if [ -z "$pi_ifname" ]; then
|
||||
pi_ifname=$ifname
|
||||
fi
|
||||
|
||||
[ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
|
||||
ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up
|
||||
|
||||
local try=0;
|
||||
while [ $((try++)) -le 5 ] && [ ! "$(cat /sys/class/net/$pi_ifname/operstate)" = "up" ]; do sleep 1; done
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user