UNVR-NAS/overlay/filesystem/usr/lib/python3/dist-packages/ubnthelpers.py
Chris Blake 3f90bd2357
feat: Add UNVR support (#11)
* Move partition mounts to PARTLABEL instead of paths
* Add dual firmware building support, specify the build type using the BOARD env var when using make
* Update to Unifi 4.0.5 pre-release firmware
* Move ulcmd init to be our "user interface" setup script, will handle LEDs on the UNVR4 in the future
* Update README with updated instructions
* Add udev rules to support /dev/boot which is what Unifi uses for some stupid reason for their emmc. This is required for systemd to mount correctly after chroot.
* Fixup small bugs found along the way
2024-06-15 18:53:44 -05:00

11 lines
256 B
Python

#!/usr/bin/python3
import os
from functools import lru_cache
"""
A handful of Ubiquiti Unifi device specific functions
"""
@lru_cache(None)
def get_ubnt_shortname() -> str:
return os.popen("ubnteeprom -systeminfo -key shortname").read().rstrip("\n")