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)
committerJohn Crispin <john@phrozen.org>
Thu, 6 Dec 2018 07:42:40 +0000 (08:42 +0100)
commit60dd181a7600325cffee024de526ac6818c7e772
tree2927988f7b9f9aeed058c0cbbea691ca1ec74ae2
parent68e59b61c64ff7adaa808e9c127a43c65bdcf3ab
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>
package/base-files/files/etc/diag.sh