840bd0178d14101f8a36932b438d8c38ed09f1fa
[openwrt/staging/rmilecki.git] / package / base-files / files / bin / board_detect
1 #!/bin/sh
2
3 CFG=$1
4
5 [ -n "$CFG" ] || CFG=/etc/board.json
6
7 [ -d "/etc/board.d/" -a ! -s "$CFG" ] && {
8 for a in $(ls /etc/board.d/*); do
9 [ -x $a ] || continue;
10 $(. $a)
11 done
12 }
13
14 [ -s "$CFG" ] || return 1