1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-17 12:43:56 +02:00
openwrt/target/linux/ramips/base-files/etc/board.d/03_gpio_switches
Mathias Kresin f12a32630f treewide: use the generic board_name function
Use the generic function instead ot the target specific ones.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-15 23:13:34 +02:00

25 lines
563 B
Bash
Executable File

#!/bin/sh
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
ubnt-erx)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "0"
;;
ubnt-erx-sfp)
ucidef_add_gpio_switch "poe_power_port0" "PoE Power Port0" "496"
ucidef_add_gpio_switch "poe_power_port1" "PoE Power Port1" "497"
ucidef_add_gpio_switch "poe_power_port2" "PoE Power Port2" "498"
ucidef_add_gpio_switch "poe_power_port3" "PoE Power Port3" "499"
ucidef_add_gpio_switch "poe_power_port4" "PoE Power Port4" "500"
;;
esac
board_config_flush
exit 0