Skip to content

Commit

Permalink
Update 420_autoresize_last_partitions.sh
Browse files Browse the repository at this point in the history
Fixed fallback assignments of mandatory values
to not let them evaluate to nonsense commands, see
#2926
  • Loading branch information
jsmeix committed Feb 14, 2023
1 parent 42e04f3 commit b20796b
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -66,11 +66,11 @@
# Avoid 'set -e -u' exit e.g. because of "AUTORESIZE_PARTITIONS[@]: unbound variable"
# note that assigning an empty array like AUTORESIZE_PARTITIONS=() does not help
# against array elements like AUTORESIZE_PARTITIONS[0] are unbound variables:
${AUTORESIZE_PARTITIONS:=}
${AUTORESIZE_EXCLUDE_PARTITIONS:=}
: ${AUTORESIZE_PARTITIONS:=}
: ${AUTORESIZE_EXCLUDE_PARTITIONS:=}
# Set fallbacks (same as default.conf) if mandatory numbers are not set (the user may set them empty):
${AUTOSHRINK_DISK_SIZE_LIMIT_PERCENTAGE:=2}
${AUTOINCREASE_DISK_SIZE_THRESHOLD_PERCENTAGE:=10}
: ${AUTOSHRINK_DISK_SIZE_LIMIT_PERCENTAGE:=2}
: ${AUTOINCREASE_DISK_SIZE_THRESHOLD_PERCENTAGE:=10}

# Skip if not in migration mode:
is_true "$MIGRATION_MODE" || return 0
Expand Down

0 comments on commit b20796b

Please sign in to comment.