aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2018-01-15 00:28:03 +0100
committerMathias Kresin <dev@kresin.me>2018-01-18 07:22:36 +0100
commitf476c9a7458f9a1da876df02cce065f9cdeedd87 (patch)
tree5dedff6a3be75d71467235071fa2c66076ee9eab /package/base-files
parent1ca4f8ca1c650785f7c105a9306ddac3792562c9 (diff)
downloadupstream-f476c9a7458f9a1da876df02cce065f9cdeedd87.tar.gz
upstream-f476c9a7458f9a1da876df02cce065f9cdeedd87.tar.bz2
upstream-f476c9a7458f9a1da876df02cce065f9cdeedd87.zip
base-files: gpio switch: fix inverted logic
GPIOs are exported as active high to the sysfs, hence the logic need to be inverted. Fixes: e66c47fb14f5 ("base-files: gpio switch: set output value with direction") Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/etc/init.d/gpio_switch2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/etc/init.d/gpio_switch b/package/base-files/files/etc/init.d/gpio_switch
index b67950a992..32c142f110 100755
--- a/package/base-files/files/etc/init.d/gpio_switch
+++ b/package/base-files/files/etc/init.d/gpio_switch
@@ -24,7 +24,7 @@ load_gpio_switch()
[ -d "$gpio_path" ] || sleep 1
}
# set the pin to output with high or low pin value
- { [ "$value" = "0" ] && echo "high" || echo "low"; } >"$gpio_path/direction"
+ { [ "$value" = "0" ] && echo "low" || echo "high"; } >"$gpio_path/direction"
}
service_triggers()