fix: additional fixups for UNVR/UNVRPro

* Fixup fan control so it works on UNVR
* Add LED integration work for UNVR
* Rename our mtd-ro kernel module dir
* Fixup shortnames in ubnteeprom
This commit is contained in:
Chris Blake 2024-06-18 19:13:31 -05:00
parent 5962f1ea30
commit 58ce1fb99f
10 changed files with 35 additions and 32 deletions

View file

@ -3,7 +3,7 @@ import os
import re
import time
from ubnthelpers import get_ubnt_shortname
from functools import lru_cache
SMARTCTL_PATH = "/usr/sbin/smartctl"
@ -36,6 +36,12 @@ THERMAL_SYS_PATHS = {
},
}
@lru_cache(None)
def get_ubnt_shortname() -> str:
return os.popen("ubnteeprom -systeminfo -key shortname").read().rstrip("\n")
def __get_board_temps():
# Are we supported?
if get_ubnt_shortname() not in THERMAL_SYS_PATHS: