Remove unnecessary quotes from variable expansions in VM scripts (#10649)

This commit is contained in:
CanbiZ (MickLesk)
2026-01-08 15:10:57 +01:00
committed by GitHub
parent 741560b457
commit 1681033e39
15 changed files with 119 additions and 119 deletions

View File

@@ -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