mirror of
https://github.com/hzyitc/openwrt-redmi-ax3000.git
synced 2025-12-16 08:22:16 +00:00
33 lines
450 B
Bash
Executable File
33 lines
450 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
bits() {
|
|
local val
|
|
val=0
|
|
|
|
while [ -n "$1" ]; do
|
|
val=$(( val | (1 << $1) ))
|
|
shift 1
|
|
done
|
|
|
|
printf "0x%x" "$val"
|
|
}
|
|
|
|
board_config_update
|
|
|
|
board=$(board_name)
|
|
|
|
case $board in
|
|
redmi,ax3000)
|
|
ucidef_set_led_switch "wan" "WAN" "blue:internet" "switch1" "$( bits 4 )"
|
|
;;
|
|
xiaomi,cr881x)
|
|
ucidef_set_led_switch "wan" "WAN" "blue:internet" "switch0" "$( bits 3 )"
|
|
;;
|
|
esac
|
|
|
|
board_config_flush
|
|
|
|
exit 0
|