system: fix description value from os-release
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 25 Oct 2024 09:04:10 +0000 (11:04 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 6 Nov 2024 09:34:47 +0000 (10:34 +0100)
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'.

Fixes: 0f88a52dc8a5 ("system: replace openwrt_release with os-release")
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
[ add fixes tag ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
system.c

index 680ead97618ff432beaa2b406b69f420546c1bf6..9c8d3dcbf03f51b56c090edb3b5e8069b181d450 100644 (file)
--- 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";