local label
local ledpath
local basepath="/sys/firmware/devicetree/base"
- local nodepath="$basepath/chosen/leds/$1"
+ local nodepath="$basepath/aliases/led-$1"
[ -f "$nodepath" ] && ledpath=$(cat "$nodepath")
[ -n "$ledpath" ] && label=$(cat "$basepath$ledpath/label")