[PATCH] system: fix description value from os-release
Florian Eckert
fe at dev.tdt.de
Fri Oct 25 02:04:10 PDT 2024
When changing the read file from '/etc/openwrt_release' to
'/usr/lib/os-release', the correct variable for reading the description
was not selected. The correct variable from the file ‘/usr/lib/os-release’
is 'OPENWRT_RELEASE'.
Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
system.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/system.c b/system.c
index 680ead9..9c8d3dc 100644
--- a/system.c
+++ b/system.c
@@ -277,7 +277,7 @@ static int system_board(struct ubus_context *ctx, struct ubus_object *obj,
key = "codename";
else if (!strcasecmp(key, "OPENWRT_BOARD"))
key = "target";
- else if (!strcasecmp(key, "PRETTY_NAME"))
+ else if (!strcasecmp(key, "OPENWRT_RELEASE"))
key = "description";
else if (!strcasecmp(key, "OPENWRT_BUILD_DATE"))
key = "builddate";
--
2.39.5
More information about the openwrt-devel
mailing list