mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-03 18:35:55 +00:00
Remove unnecessary quotes from variable expansions in VM scripts (#10649)
This commit is contained in:
committed by
GitHub
parent
741560b457
commit
1681033e39
@@ -274,11 +274,11 @@ function get_mikrotik_version() {
|
||||
if [[ "$start_line" =~ ^[0-9]+$ ]]; then
|
||||
local line
|
||||
line=$(echo "$html" | tail -n +"$start_line" | grep -m 1 -E "c-(stable|longTerm|testing|development)-v|RouterOS [0-9]+\.[0-9]+" 2>/dev/null)
|
||||
|
||||
|
||||
local version
|
||||
version=$(echo "$line" | sed -n 's/.*c-[^"]*-v\([0-9_.a-zA-Z-]\+\).*/\1/p' | tr '_' '.' 2>/dev/null)
|
||||
[ -z "$version" ] && version=$(echo "$line" | grep -oP 'RouterOS \K[0-9]+\.[0-9]+(\.[0-9]+)?' 2>/dev/null)
|
||||
|
||||
|
||||
if [[ "$version" =~ ^[0-9]+\.[0-9]+ ]]; then
|
||||
echo "$version"
|
||||
return 0
|
||||
@@ -611,7 +611,7 @@ DESCRIPTION=$(
|
||||
</div>
|
||||
EOF
|
||||
)
|
||||
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
||||
qm set $VMID -description "$DESCRIPTION" >/dev/null
|
||||
if [ -n "$DISK_SIZE" ]; then
|
||||
msg_info "Resizing disk to $DISK_SIZE GB"
|
||||
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
||||
|
||||
Reference in New Issue
Block a user