1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

Some part of 6.1 RUTX support

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-08-15 16:11:13 +02:00
parent cfce9f52b2
commit 21b307a2f6
16 changed files with 3061 additions and 370 deletions

View file

@ -5,13 +5,16 @@ set_state() {
[ -e "/sys/class/gpio/${label}_power/value" ] || return
config_get disable ${label} disable
[ "${disable}" -eq 1 ] && \
/sbin/mctl -s -m "${label}" || \
/sbin/mctl -p -m "${label}"
/sbin/mctl -s -m "${label}" -c || \
/sbin/mctl -p -m "${label}" -c
}
do_power_modem() {
/sbin/mctl -p || {
[ -f /etc/board.json ] || return
[ -z "$(uci -q get system.modem.disable)" ] && /sbin/mctl -p -a -c || {
config_load system
config_foreach set_state mctl
}