summaryrefslogtreecommitdiff
path: root/package/base-files/files/bin/board_detect
blob: ddd17a16337d1159cc05fda4d6ce1c7a0dd34e75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

[ -d "/etc/board.d/" -a ! -f "/etc/board.json" ] || {
	for a in `ls /etc/board.d/*`; do
		[ -x $a ] || continue;
		$(. $a)
	done
}

[ -f "/etc/board.json" ] || return 1
[ -f "/etc/config/network" ] || {
	touch /etc/config/network
	/bin/config_generate
}