From 71ecb99c62ba6da4da7c35e79036443be1ad98e0 Mon Sep 17 00:00:00 2001 From: MickLesk Date: Fri, 26 Jun 2026 22:02:49 +0200 Subject: [PATCH] Source core.func for shared messaging in iommu-setup Replace locally duplicated color variables and msg_* helpers with core.func + load_functions, matching the pattern used by update-apps and pve-privilege-converter. Telemetry remains via api.func only. --- tools/pve/iommu-setup.sh | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/tools/pve/iommu-setup.sh b/tools/pve/iommu-setup.sh index b96a1fb4a..c34b02baa 100755 --- a/tools/pve/iommu-setup.sh +++ b/tools/pve/iommu-setup.sh @@ -5,6 +5,11 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/refs/heads/main/misc/core.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true +load_functions +declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "iommu-setup" "pve" + function header_info { clear cat <<"EOF" @@ -17,25 +22,6 @@ function header_info { EOF } -# Color variables -YW="\033[33m" -GN="\033[1;92m" -RD="\033[01;31m" -BL="\033[36m" -CL="\033[m" -BFR="\\r\\033[K" -HOLD="-" -CM="${GN}✓${CL}" -CROSS="${RD}✗${CL}" - -msg_info() { echo -ne " ${HOLD} ${YW}$1..."; } -msg_ok() { echo -e "${BFR} ${CM} ${GN}$1${CL}"; } -msg_error() { echo -e "${BFR} ${CROSS} ${RD}$1${CL}"; } - -# Telemetry -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true -declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "iommu-setup" "pve" - header_info # Guards