From 57050bdf0a479b19182ec9ede4e25b2c49fcdbbe Mon Sep 17 00:00:00 2001 From: Matteo Iervasi Date: Wed, 27 Mar 2024 12:44:28 +0100 Subject: [PATCH] Fix board_detect script to pass shellcheck Before this change, the board_detect script was parsing the output of ls to get files in /etc/board.d. The correct method is to use globs. Signed-off-by: Matteo Iervasi --- package/base-files/files/bin/board_detect | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/base-files/files/bin/board_detect b/package/base-files/files/bin/board_detect index 94f45bec53a70a..be4242802a7f0f 100755 --- a/package/base-files/files/bin/board_detect +++ b/package/base-files/files/bin/board_detect @@ -5,8 +5,8 @@ CFG=$1 [ -n "$CFG" ] || CFG=/etc/board.json [ -d "/etc/board.d/" -a ! -s "$CFG" ] && { - for a in $(ls /etc/board.d/*); do - [ -s $a ] || continue; + for a in /etc/board.d/*; do + [ -s "$a" ] || continue; $(. $a) done }