base-files: diag.sh: Make it more generic towards DTS so it could be reused
authorPetr Štetiar <ynezz@true.cz>
Tue, 27 Nov 2018 17:22:47 +0000 (18:22 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 16:48:23 +0000 (17:48 +0100)
commitfcf5c1a35078ee63db2e61b132bc8d3c13d7f581
tree262f663ced3dba64dad19dd206c19d01945d9a0e
parent54581def12b437972671f5efa22b544d401f7651
base-files: diag.sh: Make it more generic towards DTS so it could be reused

I wanted to add status LEDs support to my imx6 based board and have
found out, that I could use diag.sh script found in ramips platform,
which seems to be also shared in a few other platforms:

 4801276bc2078c5bcf03003c831e3b0a target/linux/ramips/base-files/etc/diag.sh
 4801276bc2078c5bcf03003c831e3b0a target/linux/ipq40xx/base-files/etc/diag.sh
 4801276bc2078c5bcf03003c831e3b0a target/linux/ath79/base-files/etc/diag.sh

So I've extended the base diag.sh in a way, that if it detects any of
the DTS LED aliases, then it would use the generic DTS set_led_state
code.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(backported from 60dd181a7600325cffee024de526ac6818c7e772)
package/base-files/files/etc/diag.sh