Fix azure compute node image build.
authorWard Vandewege <ward@curii.com>
Tue, 15 Mar 2022 15:48:57 +0000 (11:48 -0400)
committerWard Vandewege <ward@curii.com>
Tue, 15 Mar 2022 17:47:40 +0000 (13:47 -0400)
refs #18772

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>

tools/compute-images/scripts/base.sh

index 90b845f1ac8a30c0a0b30edb6d5361557085a374..5ee52174ae1398b70dfceb7dbb6e435e89720457 100644 (file)
@@ -145,7 +145,10 @@ if [ "x$RESOLVER" != "x" ]; then
   $SUDO sed -i "s/#prepend domain-name-servers 127.0.0.1;/prepend domain-name-servers ${RESOLVER};/" /etc/dhcp/dhclient.conf
 fi
 
-if [ "$AWS_EBS_AUTOSCALE" != "1" ]; then
+# AWS_EBS_AUTOSCALE is not always set, work around unset variable check
+EBS_AUTOSCALE=${AWS_EBS_AUTOSCALE:-}
+
+if [ "$EBS_AUTOSCALE" != "1" ]; then
   # Set up the cloud-init script that will ensure encrypted disks
   $SUDO mv /tmp/usr-local-bin-ensure-encrypted-partitions.sh /usr/local/bin/ensure-encrypted-partitions.sh
 else