openwrt/package/base-files/files/bin/board_detect

15 lines
204 B
Plaintext
Raw Normal View History

#!/bin/sh
CFG=$1
[ -n "$CFG" ] || CFG=/etc/board.json
[ -d "/etc/board.d/" -a ! -s "$CFG" ] && {
for a in `ls /etc/board.d/*`; do
[ -x $a ] || continue;
$(. $a)
done
}
[ -s "$CFG" ] || return 1