Commit cbf718cd authored by Stephan's avatar Stephan
Browse files

xiaomi: fix led status

parent 5d2a65ed
Pipeline #2265 passed with stages
in 102 minutes and 38 seconds
......@@ -45,6 +45,8 @@ do
test -n "$tmp" && break
done
_led_status="$(echo $tmp | sed -n '1s#/sys/class/leds/##p')"
# default "done" = on
_led_flag_status_done="on"
#---- wwan
_led_wwan=""
......@@ -74,6 +76,17 @@ case "$platform" in
;;
esac
;;
ramips)
case "$boardname" in
"xiaomi,mi-router-4a-gigabit")
_led_wifi2g="blue:status"
_led_wifi5g=""
_led_status="yellow:status"
_led_flag_status_done="off"
;;
esac
;;
esac
echo "LED status: $_led_status"
......@@ -154,7 +167,12 @@ case "$ARG_LED" in
;;
off) led_off $_led_status
;;
done|on) led_on $_led_status
done|on)
if [ "${_led_flag_status_done}" = "on" ]; then
led_on $_led_status
else
led_off $_led_status
fi
;;
esac
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment