From 2b8ccd768866ed918f024cb6616338a250bfd95d Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 5 Jan 2024 03:05:06 +0300 Subject: [PATCH] tweaking... Signed-off-by: Alex A. Naanou --- .pct-helpers | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.pct-helpers b/.pct-helpers index 15e1afe..4ad6e65 100644 --- a/.pct-helpers +++ b/.pct-helpers @@ -147,21 +147,20 @@ normpath(){ # see: # https://pve.proxmox.com/wiki/Linux_Container getLatestTemplate(){ - IFS=$'\n' + #IFS=$'\n' local pattern=$1 local templates=($(pveam available | grep -o ''${1}'.*$')) local latest=${templates[-1]} @ pveam download local ${latest} - #latest=$(pveam list local | grep -o "^.*$latest") - latest=/var/lib/vz/template/cache/$latest + latest=$(pveam list local | grep -o "^.*$latest") + #latest=($(ls /var/lib/vz/template/cache/${1}*)) [ -z $2 ] \ || eval "$2=${latest}" } - # # xread [-n] MSG VAR # @@ -328,7 +327,7 @@ pctCreateAlpine(){ local TEMPLATE getLatestTemplate alpine TEMPLATE - pctCreate $1 "${TEMPLATE}" "$2" "$3" + pctCreate $1 "$TEMPLATE" "$2" "$3" @ lxc-attach $1 apk update @ lxc-attach $1 apk upgrade