aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/x86/base-files
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-06-23 15:18:43 +0200
committerPetr Štetiar <ynezz@true.cz>2019-06-25 14:12:22 +0000
commit5816caad26ae294f0adb4ed07ed53dcba7277c33 (patch)
treeeac33b95251eb8f6797af0eb0e6b56a5c988e8c3 /target/linux/x86/base-files
parentd00e66f26f8700b6e336fee74c151262f8f95b2d (diff)
downloadupstream-5816caad26ae294f0adb4ed07ed53dcba7277c33.tar.gz
upstream-5816caad26ae294f0adb4ed07ed53dcba7277c33.tar.bz2
upstream-5816caad26ae294f0adb4ed07ed53dcba7277c33.zip
x86: fix missing led variable warning during boot
Fixes following warning during the boot: WARNING: Variable 'led' does not exist or is not an array/object Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'target/linux/x86/base-files')
-rw-r--r--target/linux/x86/base-files/etc/diag.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/linux/x86/base-files/etc/diag.sh b/target/linux/x86/base-files/etc/diag.sh
index 3af4b23583..d043e4f035 100644
--- a/target/linux/x86/base-files/etc/diag.sh
+++ b/target/linux/x86/base-files/etc/diag.sh
@@ -20,6 +20,8 @@ preinit_match_diag_led() {
json_init
json_load "$(cat $CFG)"
json_get_keys keys led
+ json_is_a led object || return
+
json_select led
for key in $keys; do
json_select "$key"