So far, board.d files were having execute bit set and contained a shebang. However, they are just sourced in board_detect, with an apparantly unnecessary check for execute permission beforehand. Replace this check by one for existance and make the board.d files "normal" files, as would be expected in /etc anyway. Note: This removes an apparantly unused '#!/bin/sh /etc/rc.common' in target/linux/bcm47xx/base-files/etc/board.d/01_network Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
49 lines
1 KiB
Text
49 lines
1 KiB
Text
#
|
|
# Copyright (C) 2012-2015 OpenWrt.org
|
|
#
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
. /lib/functions/system.sh
|
|
|
|
board_config_update
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
"checkpoint,l-50")
|
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 dmz" "eth0"
|
|
;;
|
|
"cisco,on100")
|
|
ucidef_set_interface_lan "eth0 eth1"
|
|
;;
|
|
"cloudengines,pogoe02"|\
|
|
"cloudengines,pogoplugv4"|\
|
|
"iom,iconnect-1.1"|\
|
|
"iom,ix2-200"|\
|
|
"raidsonic,ib-nas62x0"|\
|
|
"seagate,blackarmor-nas220"|\
|
|
"seagate,dockstar"|\
|
|
"seagate,goflexhome"|\
|
|
"seagate,goflexnet"|\
|
|
"zyxel,nsa310s")
|
|
ucidef_set_interface_lan "eth0" "dhcp"
|
|
;;
|
|
"linksys,e4200-v2"|\
|
|
"linksys,ea3500"|\
|
|
"linksys,ea4500")
|
|
ucidef_set_interfaces_lan_wan "ethernet1 ethernet2 ethernet3 ethernet4" "internet"
|
|
ucidef_set_interface_macaddr "wan" $( mtd_get_mac_ascii u_env eth1addr )
|
|
;;
|
|
"zyxel,nsa310b"|\
|
|
"zyxel,nsa325")
|
|
ucidef_set_interface_lan "eth0" "dhcp"
|
|
ucidef_set_interface_macaddr "lan" $( mtd_get_mac_ascii uboot_env ethaddr )
|
|
;;
|
|
*)
|
|
ucidef_set_interface_lan "eth0"
|
|
;;
|
|
esac
|
|
|
|
board_config_flush
|
|
|
|
exit 0
|