Fix telemetry typo and simplify microcode script

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.
This commit is contained in:
CanbiZ (MickLesk)
2026-02-10 08:09:26 +01:00
parent 35833c402a
commit b034d5b05d
5 changed files with 8 additions and 8 deletions

View File

@@ -316,7 +316,7 @@ EOF
# * $1: status ("done" or "failed") # * $1: status ("done" or "failed")
# * $2: exit_code (numeric, default: 1 for failed, 0 for done) # * $2: exit_code (numeric, default: 1 for failed, 0 for done)
# - Payload includes: # - Payload includes:
# * Final status (mapped: "done"→"sucess", "failed"→"failed") # * Final status (mapped: "done"→"success", "failed"→"failed")
# * Error description via explain_exit_code() # * Error description via explain_exit_code()
# * Numeric exit code # * Numeric exit code
# - Only executes once per session # - Only executes once per session
@@ -352,10 +352,10 @@ post_update_to_api() {
local raw_exit_code="${2:-1}" local raw_exit_code="${2:-1}"
local exit_code=0 error="" pb_status 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 case "$status" in
done | success | sucess) done | success)
pb_status="sucess" pb_status="success"
exit_code=0 exit_code=0
error="" error=""
;; ;;

View File

@@ -264,4 +264,4 @@ This is an automated test message.
// Helper for timeout context // Helper for timeout context
func newTimeoutContext(d time.Duration) (context.Context, context.CancelFunc) { func newTimeoutContext(d time.Duration) (context.Context, context.CancelFunc) {
return context.WithTimeout(context.Background(), d) return context.WithTimeout(context.Background(), d)
} }

View File

@@ -155,4 +155,4 @@ func (c *Cache) InvalidateDashboard(ctx context.Context) {
func dashboardCacheKey(days int) string { func dashboardCacheKey(days int) string {
return "dashboard:" + string(rune(days)) return "dashboard:" + string(rune(days))
} }

View File

@@ -1484,4 +1484,4 @@ func DashboardHTML() string {
</script> </script>
</body> </body>
</html>` </html>`
} }

View File

@@ -1024,4 +1024,4 @@ func splitCSV(s string) []string {
} }
} }
return out return out
} }