mirror of
https://github.com/riptidewave93/UNVR-NAS.git
synced 2025-03-09 15:40:13 +00:00
feat: add hdds/temps/version to display
* Write a mock ustorage tool to parse disk info for ulcmd * Pass system temp info from unvr-fan-daemon to mock-ubnt-api via tmp file * add mock ubnt-tools to make ulcmd happy and report our SN * code cleanup and documentation update
This commit is contained in:
parent
a4f7f862c2
commit
9c08f287fc
7 changed files with 268 additions and 58 deletions
13
overlay/filesystem/usr/bin/ubnt-tools
Executable file
13
overlay/filesystem/usr/bin/ubnt-tools
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "id" ]; then
|
||||
BOARD_SYSID=$(grep systemid /proc/ubnthal/system.info | sed 's|systemid=||g')
|
||||
BOARD_SERIALNO=$(grep serialno /proc/ubnthal/system.info | sed 's|serialno=||g')
|
||||
# BOM is in SPI on EEPROM part, offset D000 is start of TlvInfo. BOM starts with 113-
|
||||
BOARD_BOM=$(dd if=/dev/mtd4 bs=64 skip=832 count=1 status=none | strings | grep 113-)
|
||||
echo "board.sysid=0x${BOARD_SYSID}"
|
||||
echo "board.serialno=${BOARD_SERIALNO}"
|
||||
echo "board.bom=${BOARD_BOM}"
|
||||
else
|
||||
echo "Unknown ubnt-tools cmd: $@" >> /tmp/ubnt-tools-unknown.log
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue