status file 28 (#20229)
* fix mini-pc detection * detect proxmox servers * increase version to 28 * split pveversion output at slash * add fatal statement to pluginsd_function_progress_to_plugin()
Costa Tsaousis committed
May 3, 2025 at 15:01 UTC
ea1ab16f0b3e4ed69d3830842a379e3f2e0d883b
4 files changed
+23
-1
src/daemon/status-file-product.c
+8
@@ -423,6 +423,14 @@ void product_name_vendor_type(DAEMON_STATUS_FILE *ds) {
423
dmi_normalize_vendor_field(ds->product.vendor, sizeof(ds->product.vendor));
424
}
425
426
+ if (!force_type &&
427
+ (strcasestr(ds->product.vendor, "Raspberry") != NULL ||
428
+ strcasestr(ds->product.vendor, "BananaPi") != NULL ||
429
+ strcasestr(ds->product.vendor, "OrangePi") != NULL ||
430
+ strcasestr(ds->product.vendor, "ODROID") != NULL)) {
431
+ force_type = "mini-pc";
432
+ }
433
+
434
if(ds->cloud_instance_type[0] && strcasecmp(ds->cloud_instance_type, "unknown") != 0)
435
safecpy(ds->product.name, ds->cloud_instance_type);
436
else {
src/daemon/status-file.h
+1
-1
@@ -11,7 +11,7 @@
11
#include "machine-guid.h"
12
#include "status-file-dmi.h"
13
14
-#define STATUS_FILE_VERSION 27
14
+#define STATUS_FILE_VERSION 28
15
16
typedef enum {
17
DAEMON_STATUS_NONE,
src/daemon/system-info.sh
+11
@@ -204,6 +204,17 @@ else
204
fi
205
fi
206
207
+if [ -d "/etc/pve" ] && \
208
+ echo "${KERNEL_VERSION}" | grep -q -- '-pve$' && \
209
+ command -v pveversion > /dev/null 2>&1; then
210
+ HOST_NAME="Proxmox VE"
211
+ HOST_ID="proxmox"
212
+ HOST_ID_LIKE="proxmox"
213
+ HOST_VERSION="$(pveversion | cut -f 2 -d '/')"
214
+ HOST_VERSION_ID="$(echo "${HOST_VERSION}" | cut -f 1 -d '.')"
215
+ HOST_OS_DETECTION="pveversion"
216
+fi
217
+
218
# -------------------------------------------------------------------------------------------------
219
# Detect information about the CPU
220
src/plugins.d/pluginsd_functions.c
+3
@@ -172,6 +172,9 @@ static void pluginsd_function_cancel(void *data) {
172
static void pluginsd_function_progress_to_plugin(void *data) {
173
struct inflight_function *look_for = data, *t;
174
175
+ if (unlikely(!look_for || !look_for->parser || !look_for->parser->inflight.functions))
176
+ fatal("PLUGINSD: function progress to plugin called with invalid data.");
177
+
178
bool sent = false;
179
dfe_start_read(look_for->parser->inflight.functions, t) {
180
if(look_for == t) {