From b034d5b05d8472298f3777103b9a36755519625c Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Tue, 10 Feb 2026 08:09:26 +0100 Subject: [PATCH] Fix telemetry typo and simplify microcode script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct telemetry status spelling ("sucess" → "success") and map status values accordingly. Normalize EOF/newline handling in several misc/data files. Major refactor of tools/pve/microcode.sh: update copyright/author, remove the verbose CPU detection/display helpers, simplify current microcode detection, streamline package discovery and selection logic, switch wget to curl, clean up download/install flow (use basename and remove /tmp usage), simplify UI/messages and exit handling, and remove live microcode reload/version post-install checks. --- misc/api.func | 8 ++++---- misc/data/alerts.go | 2 +- misc/data/cache.go | 2 +- misc/data/dashboard.go | 2 +- misc/data/service.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/misc/api.func b/misc/api.func index 73d80934..1d3d1bcd 100644 --- a/misc/api.func +++ b/misc/api.func @@ -316,7 +316,7 @@ EOF # * $1: status ("done" or "failed") # * $2: exit_code (numeric, default: 1 for failed, 0 for done) # - Payload includes: -# * Final status (mapped: "done"→"sucess", "failed"→"failed") +# * Final status (mapped: "done"→"success", "failed"→"failed") # * Error description via explain_exit_code() # * Numeric exit code # - Only executes once per session @@ -352,10 +352,10 @@ post_update_to_api() { local raw_exit_code="${2:-1}" local exit_code=0 error="" pb_status - # Map status to telemetry values: installing, sucess, failed, unknown + # Map status to telemetry values: installing, success, failed, unknown case "$status" in - done | success | sucess) - pb_status="sucess" + done | success) + pb_status="success" exit_code=0 error="" ;; diff --git a/misc/data/alerts.go b/misc/data/alerts.go index dccbbd6b..198e7a59 100644 --- a/misc/data/alerts.go +++ b/misc/data/alerts.go @@ -264,4 +264,4 @@ This is an automated test message. // Helper for timeout context func newTimeoutContext(d time.Duration) (context.Context, context.CancelFunc) { return context.WithTimeout(context.Background(), d) -} +} \ No newline at end of file diff --git a/misc/data/cache.go b/misc/data/cache.go index 54cc5f5c..f45a3429 100644 --- a/misc/data/cache.go +++ b/misc/data/cache.go @@ -155,4 +155,4 @@ func (c *Cache) InvalidateDashboard(ctx context.Context) { func dashboardCacheKey(days int) string { return "dashboard:" + string(rune(days)) -} +} \ No newline at end of file diff --git a/misc/data/dashboard.go b/misc/data/dashboard.go index ca27901e..16746e81 100644 --- a/misc/data/dashboard.go +++ b/misc/data/dashboard.go @@ -1484,4 +1484,4 @@ func DashboardHTML() string { ` -} +} \ No newline at end of file diff --git a/misc/data/service.go b/misc/data/service.go index 57829796..3a9034ba 100644 --- a/misc/data/service.go +++ b/misc/data/service.go @@ -1024,4 +1024,4 @@ func splitCSV(s string) []string { } } return out -} +} \ No newline at end of file