mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-31 06:34:17 -04:00
fix(misc): use /usr/bin/install to prevent function shadowing
Bare 'install' can be shadowed when scripts define their own install() function, causing hangs. Use absolute path /usr/bin/install in alpine-tools.func and build.func to match the fix already applied to tools.func.
This commit is contained in:
@@ -304,7 +304,7 @@ setup_yq() {
|
|||||||
url="https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${arch}"
|
url="https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${arch}"
|
||||||
tmp="$(mktemp)"
|
tmp="$(mktemp)"
|
||||||
download_with_progress "$url" "$tmp" || return 1
|
download_with_progress "$url" "$tmp" || return 1
|
||||||
install -m 0755 "$tmp" /usr/local/bin/yq
|
/usr/bin/install -m 0755 "$tmp" /usr/local/bin/yq
|
||||||
rm -f "$tmp"
|
rm -f "$tmp"
|
||||||
msg_ok "Setup yq ($(yq --version 2>/dev/null))"
|
msg_ok "Setup yq ($(yq --version 2>/dev/null))"
|
||||||
}
|
}
|
||||||
@@ -376,10 +376,10 @@ setup_uv() {
|
|||||||
|
|
||||||
# tar contains ./uv
|
# tar contains ./uv
|
||||||
if [ -x "$tmpd/uv" ]; then
|
if [ -x "$tmpd/uv" ]; then
|
||||||
install -m 0755 "$tmpd/uv" "$UV_BIN"
|
/usr/bin/install -m 0755 "$tmpd/uv" "$UV_BIN"
|
||||||
else
|
else
|
||||||
# fallback: in subfolder
|
# fallback: in subfolder
|
||||||
install -m 0755 "$tmpd"/*/uv "$UV_BIN" 2>/dev/null || {
|
/usr/bin/install -m 0755 "$tmpd"/*/uv "$UV_BIN" 2>/dev/null || {
|
||||||
msg_error "uv binary not found in tar"
|
msg_error "uv binary not found in tar"
|
||||||
rm -rf "$tmpd"
|
rm -rf "$tmpd"
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -1642,7 +1642,7 @@ maybe_offer_save_app_defaults() {
|
|||||||
if whiptail --backtitle "Proxmox VE Helper Scripts" \
|
if whiptail --backtitle "Proxmox VE Helper Scripts" \
|
||||||
--yesno "Save these advanced settings as defaults for ${APP}?\n\nThis will create:\n${app_vars_path}" 12 72; then
|
--yesno "Save these advanced settings as defaults for ${APP}?\n\nThis will create:\n${app_vars_path}" 12 72; then
|
||||||
mkdir -p "$(dirname "$app_vars_path")"
|
mkdir -p "$(dirname "$app_vars_path")"
|
||||||
install -m 0644 "$new_tmp" "$app_vars_path"
|
/usr/bin/install -m 0644 "$new_tmp" "$app_vars_path"
|
||||||
msg_ok "Saved app defaults: ${app_vars_path}"
|
msg_ok "Saved app defaults: ${app_vars_path}"
|
||||||
fi
|
fi
|
||||||
rm -f "$new_tmp" "$diff_tmp"
|
rm -f "$new_tmp" "$diff_tmp"
|
||||||
@@ -1676,7 +1676,7 @@ maybe_offer_save_app_defaults() {
|
|||||||
|
|
||||||
case "$sel" in
|
case "$sel" in
|
||||||
"Update Defaults")
|
"Update Defaults")
|
||||||
install -m 0644 "$new_tmp" "$app_vars_path"
|
/usr/bin/install -m 0644 "$new_tmp" "$app_vars_path"
|
||||||
msg_ok "Updated app defaults: ${app_vars_path}"
|
msg_ok "Updated app defaults: ${app_vars_path}"
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user