base-files: LED/gpio: Ensure inverted is read as a boolean
authorOlliver Schinagl <oliver@schinagl.nl>
Sun, 31 Jul 2022 08:19:09 +0000 (10:19 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 6 Aug 2022 17:58:46 +0000 (19:58 +0200)
The sysfs interface for the GPIO takes a boolean value. Ensure we get
one from uci.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
package/base-files/files/etc/init.d/led

index 51cb8b51784a675405e77da1fbbfb14adf69606d..732ac59a84f0648f966f81373a9b9ce31e1b5842 100755 (executable)
@@ -29,7 +29,7 @@ load_led() {
        config_get delay $1 delay "150"
        config_get message $1 message ""
        config_get gpio $1 gpio "0"
-       config_get inverted $1 inverted "0"
+       config_get_bool inverted $1 inverted "0"
 
        # execute application led trigger
        [ -f "/usr/libexec/led-trigger/${trigger}" ] && {