mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-21 16:15:02 +00: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)"
|
||||
if [[ -z "$TEMPLATE_PATH" ]]; then
|
||||
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"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user