mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-09 20:58:10 +01:00
fix for copilot detected bugs
This commit is contained in:
+5
-1
@@ -5934,7 +5934,11 @@ create_lxc_container() {
|
|||||||
TEMPLATE_PATH="$(pvesm path "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" 2>/dev/null || true)"
|
TEMPLATE_PATH="$(pvesm path "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" 2>/dev/null || true)"
|
||||||
if [[ -z "$TEMPLATE_PATH" ]]; then
|
if [[ -z "$TEMPLATE_PATH" ]]; then
|
||||||
local _tpl_base
|
local _tpl_base
|
||||||
_tpl_base=$(awk -v s="$TEMPLATE_STORAGE" '$1==s {f=1} f && /path/ {print $2; exit}' /etc/pve/storage.cfg)
|
_tpl_base=$(awk -v s="$TEMPLATE_STORAGE" '
|
||||||
|
$0 ~ "^[^:]+:[[:space:]]*" s "$" {f=1; next}
|
||||||
|
f && /^[^[:space:]]/ {f=0}
|
||||||
|
f && $1 == "path" {print $2; exit}
|
||||||
|
' /etc/pve/storage.cfg)
|
||||||
TEMPLATE_PATH="${_tpl_base:-/var/lib/vz}/template/cache/$TEMPLATE"
|
TEMPLATE_PATH="${_tpl_base:-/var/lib/vz}/template/cache/$TEMPLATE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1732,7 +1732,7 @@ ensure_whiptail() {
|
|||||||
apt_update_safe
|
apt_update_safe
|
||||||
$STD apt-get install -y whiptail || {
|
$STD apt-get install -y whiptail || {
|
||||||
msg_error "Failed to install whiptail"
|
msg_error "Failed to install whiptail"
|
||||||
exit 115
|
exit 100
|
||||||
}
|
}
|
||||||
msg_ok "Installed whiptail"
|
msg_ok "Installed whiptail"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3060,6 +3060,7 @@ function fetch_and_deploy_codeberg_release() {
|
|||||||
# Fall back to architecture heuristic
|
# Fall back to architecture heuristic
|
||||||
if [[ -z "$url_match" ]]; then
|
if [[ -z "$url_match" ]]; then
|
||||||
for u in $assets; do
|
for u in $assets; do
|
||||||
|
[[ "$u" =~ \.deb$ ]] || continue
|
||||||
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||||
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
||||||
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||||
@@ -3573,6 +3574,7 @@ function fetch_and_deploy_gh_release() {
|
|||||||
# If no match via explicit pattern, fall back to architecture heuristic
|
# If no match via explicit pattern, fall back to architecture heuristic
|
||||||
if [[ -z "$url_match" ]]; then
|
if [[ -z "$url_match" ]]; then
|
||||||
for u in $assets; do
|
for u in $assets; do
|
||||||
|
[[ "$u" =~ \.deb$ ]] || continue
|
||||||
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||||
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
||||||
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||||
@@ -3610,6 +3612,7 @@ function fetch_and_deploy_gh_release() {
|
|||||||
fi
|
fi
|
||||||
if [[ -z "$url_match" ]]; then
|
if [[ -z "$url_match" ]]; then
|
||||||
for u in $assets; do
|
for u in $assets; do
|
||||||
|
[[ "$u" =~ \.deb$ ]] || continue
|
||||||
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||||
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
||||||
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user