ramips: remove default network configuration, and generate that from uci-defaults
SVN-Revision: 29387
This commit is contained in:
parent
4f6c58adac
commit
80221fcd2a
2 changed files with 13 additions and 1 deletions
5
target/linux/ramips/base-files.mk
Normal file
5
target/linux/ramips/base-files.mk
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
define Package/base-files/install-target
|
||||||
|
rm -f $(1)/etc/config/network
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
|
@ -58,8 +58,11 @@ ramips_setup_interfaces()
|
||||||
|
|
||||||
*)
|
*)
|
||||||
RT3X5X=`cat /proc/cpuinfo | grep RT3.5`
|
RT3X5X=`cat /proc/cpuinfo | grep RT3.5`
|
||||||
[ -z "${RT3X5X}" ] || \
|
if [ -n "${RT3X5X}" ]; then
|
||||||
ucidef_set_interfaces_lan_wan "eth0.1 eth0.2"
|
ucidef_set_interfaces_lan_wan "eth0.1 eth0.2"
|
||||||
|
else
|
||||||
|
ucidef_set_interfaces_lan_wan "eth0 eth1"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -88,6 +91,10 @@ ramips_setup_macs()
|
||||||
[ -n $wan_mac ] && ucidef_set_interface_macaddr wan $wan_mac
|
[ -n $wan_mac ] && ucidef_set_interface_macaddr wan $wan_mac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ -e /etc/config/network ] && exit 0
|
||||||
|
|
||||||
|
touch /etc/config/network
|
||||||
|
|
||||||
board=$(ramips_board_name)
|
board=$(ramips_board_name)
|
||||||
|
|
||||||
ramips_setup_interfaces $board
|
ramips_setup_interfaces $board
|
||||||
|
|
Loading…
Reference in a new issue