prplmesh: provide the device friendly name for UCI

Implement the FriendlyName accessor required by the 6.2.0 agent using
the runtime hostname, with a model-name fallback.

Signed-off-by: Andrei Ovcharenko <a@krot.name>
This commit is contained in:
Andrei Ovcharenko authored and Hannu Nyman committed 2026-10-10 10:57:44 +03:00
1 parent 65f2c84419
commit 0320ff7c12
1 file changed
+9 -1
@@ -299,10 +299,18 @@ Signed-off-by: Andrei Ovcharenko <a@krot.name>
}
bool cfg_get_guest_bridge_iface(std::string &bridge_iface)
@@ -1138,5 +1169,64 @@ bool cfg_get_traffic_separation_guest_vi
@@ -1138,5 +1169,72 @@ bool cfg_get_traffic_separation_guest_vi
bool cfg_commit_changes() { return uci_commit_changes("prplmesh"); }
+bool get_friendly_name(std::string &friendly_name)
+{
+ if (!read_device_info_file("/proc/sys/kernel/hostname", friendly_name)) {
+ return get_model_name(friendly_name);
+ }
+ return true;
+}
+
+bool get_serial_number(std::string &serial_number)
+{
+ if (!read_device_info_file("/sys/firmware/devicetree/base/serial-number", serial_number) &&