Compare commits

..

1 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
972c9f8860 fix(tools): correct PATH escaping in ROCm profile script
The heredoc uses a quoted delimiter (ENVEOF) which disables variable expansion, but the content had backslash-escaped dollar signs. This wrote literal backslashes into /etc/profile.d/rocm.sh, causing PATH corruption. Remove the unnecessary backslashes since the quoted heredoc already prevents expansion during write.

Closes #12755
2026-03-12 08:39:29 +01:00
2 changed files with 2 additions and 14 deletions

View File

@@ -1185,18 +1185,6 @@ load_vars_file() {
continue
fi
;;
var_container_storage | var_template_storage)
# Validate that the storage exists and is active on the current node
local _storage_status
_storage_status=$(pvesm status 2>/dev/null | awk -v s="$var_val" '$1 == s { print $3 }')
if [[ -z "$_storage_status" ]]; then
msg_warn "Storage '$var_val' from $file not found on this node, ignoring"
continue
elif [[ "$_storage_status" == "disabled" ]]; then
msg_warn "Storage '$var_val' from $file is disabled on this node, ignoring"
continue
fi
;;
esac
fi

View File

@@ -4653,8 +4653,8 @@ EOF
# Environment (PATH + LD_LIBRARY_PATH)
if [[ -d /opt/rocm ]]; then
cat <<'ENVEOF' >/etc/profile.d/rocm.sh
export PATH="\$PATH:/opt/rocm/bin"
export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH:+\$LD_LIBRARY_PATH:}/opt/rocm/lib"
export PATH="$PATH:/opt/rocm/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}/opt/rocm/lib"
ENVEOF
chmod +x /etc/profile.d/rocm.sh
# Also make available for current session / systemd services