mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-30 19:50:09 +00:00
tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
03ac4bdbbb
commit
2b8ccd7688
@ -147,21 +147,20 @@ normpath(){
|
|||||||
# see:
|
# see:
|
||||||
# https://pve.proxmox.com/wiki/Linux_Container
|
# https://pve.proxmox.com/wiki/Linux_Container
|
||||||
getLatestTemplate(){
|
getLatestTemplate(){
|
||||||
IFS=$'\n'
|
#IFS=$'\n'
|
||||||
local pattern=$1
|
local pattern=$1
|
||||||
local templates=($(pveam available | grep -o ''${1}'.*$'))
|
local templates=($(pveam available | grep -o ''${1}'.*$'))
|
||||||
local latest=${templates[-1]}
|
local latest=${templates[-1]}
|
||||||
|
|
||||||
@ pveam download local ${latest}
|
@ pveam download local ${latest}
|
||||||
|
|
||||||
#latest=$(pveam list local | grep -o "^.*$latest")
|
latest=$(pveam list local | grep -o "^.*$latest")
|
||||||
latest=/var/lib/vz/template/cache/$latest
|
#latest=($(ls /var/lib/vz/template/cache/${1}*))
|
||||||
|
|
||||||
[ -z $2 ] \
|
[ -z $2 ] \
|
||||||
|| eval "$2=${latest}"
|
|| eval "$2=${latest}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# xread [-n] MSG VAR
|
# xread [-n] MSG VAR
|
||||||
#
|
#
|
||||||
@ -328,7 +327,7 @@ pctCreateAlpine(){
|
|||||||
local TEMPLATE
|
local TEMPLATE
|
||||||
getLatestTemplate alpine TEMPLATE
|
getLatestTemplate alpine TEMPLATE
|
||||||
|
|
||||||
pctCreate $1 "${TEMPLATE}" "$2" "$3"
|
pctCreate $1 "$TEMPLATE" "$2" "$3"
|
||||||
|
|
||||||
@ lxc-attach $1 apk update
|
@ lxc-attach $1 apk update
|
||||||
@ lxc-attach $1 apk upgrade
|
@ lxc-attach $1 apk upgrade
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user