update cpu checks

This commit is contained in:
2026-07-25 23:38:23 -05:00
parent 70f5c09cec
commit baa7846a15
4 changed files with 83 additions and 10 deletions
+25
View File
@@ -202,6 +202,31 @@ raise SystemExit(1)
' 2>/dev/null
}
TAPM_PULSE_RESOURCE_INSTALLED_FROM_CONFIGS() {
local nodes_directory="${1:-/etc/pve/nodes}"
local config hostname tags
local -a configs
[[ -d "$nodes_directory" ]] || return 2
configs=("$nodes_directory"/*/lxc/*.conf)
for config in "${configs[@]}"; do
[[ -f "$config" ]] || continue
hostname="$(
awk -F':[[:space:]]*' '$1 == "hostname" { print $2; exit }' "$config"
)"
tags="$(
awk -F':[[:space:]]*' '$1 == "tags" { print $2; exit }' "$config"
)"
case "$hostname" in
[Pp][Uu][Ll][Ss][Ee]|[Pp][Uu][Ll][Ss][Ee]-[Mm][Oo][Nn][Ii][Tt][Oo][Rr])
return 0
;;
esac
[[ ";${tags};" == *";pulse;"* ]] && return 0
done
return 1
}
TAPM_PULSE_PROMPT() {
local variable="$1"
local label="$2"