1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
openmptcprouter-feeds/luci-app-ouad/root/etc/uci-defaults/oled
2023-07-12 01:23:54 +08:00

25 lines
401 B
Bash

#!/bin/sh
uci_write_config() {
uci -q set oled.@oled[0].path="$1"
uci -q set oled.@oled[0].rotate="$2"
uci -q commit oled
}
. /lib/functions/system.sh
case "$(board_name)" in
hinlink,opc-h69k)
uci_write_config '/dev/i2c-5' 1
;;
esac
uci -q batch <<-EOF >/dev/null
delete ucitrack.@oled[-1]
add ucitrack oled
set ucitrack.@oled[-1].init=oled
commit ucitrack
EOF
rm -rf /tmp/luci-*
exit 0