projects
/
openwrt-github
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[package] /etc/functions.sh => /lib/functions.sh
[openwrt-github/.git]
/
package
/
base-files
/
files
/
sbin
/
led.sh
diff --git
a/package/base-files/files/sbin/led.sh
b/package/base-files/files/sbin/led.sh
index e4e92af7eafaf7b79b74de094ff2ff804e013795..d67a0f51ccdfee75f52aa2e48ec05248eed056e1 100755
(executable)
--- a/
package/base-files/files/sbin/led.sh
+++ b/
package/base-files/files/sbin/led.sh
@@
-1,7
+1,7
@@
#!/bin/sh
# (C) 2008 openwrt.org
#!/bin/sh
# (C) 2008 openwrt.org
-. /
etc
/functions.sh
+. /
lib
/functions.sh
ACTION=$1
NAME=$2
do_led() {
ACTION=$1
NAME=$2
do_led() {
@@
-9,7
+9,7
@@
do_led() {
local sysfs
config_get name $1 name
config_get sysfs $1 sysfs
local sysfs
config_get name $1 name
config_get sysfs $1 sysfs
- [ "$name" == "$NAME" -a -e "/sys/class/leds/${sysfs}" ] && {
+ [ "$name" == "$NAME" -
o "$sysfs" = "$NAME" -
a -e "/sys/class/leds/${sysfs}" ] && {
[ "$ACTION" == "set" ] &&
echo 1 >/sys/class/leds/${sysfs}/brightness \
|| echo 0 >/sys/class/leds/${sysfs}/brightness
[ "$ACTION" == "set" ] &&
echo 1 >/sys/class/leds/${sysfs}/brightness \
|| echo 0 >/sys/class/leds/${sysfs}/brightness