diff --git a/alpine/cloud/Dockerfile.ami b/alpine/cloud/Dockerfile.ami index 943fd98e0..81276c8be 100644 --- a/alpine/cloud/Dockerfile.ami +++ b/alpine/cloud/Dockerfile.ami @@ -3,7 +3,6 @@ FROM alpine RUN apk add --update \ python \ py-pip \ - bash \ curl \ e2fsprogs \ jq \ diff --git a/alpine/cloud/Dockerfile.azure b/alpine/cloud/Dockerfile.azure index 110682bee..a4496f44c 100644 --- a/alpine/cloud/Dockerfile.azure +++ b/alpine/cloud/Dockerfile.azure @@ -1,7 +1,6 @@ FROM golang:alpine RUN apk add --update \ - bash \ curl \ e2fsprogs \ syslinux \ diff --git a/alpine/cloud/aws/approve-account.sh b/alpine/cloud/aws/approve-account.sh index 027da2434..24cfcf22d 100755 --- a/alpine/cloud/aws/approve-account.sh +++ b/alpine/cloud/aws/approve-account.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Usage: ./aws/approve-account.sh [ACCOUNT_ID] [AMI_FILE] # diff --git a/alpine/cloud/aws/bake-ami.sh b/alpine/cloud/aws/bake-ami.sh index 434a5f4a6..020544874 100755 --- a/alpine/cloud/aws/bake-ami.sh +++ b/alpine/cloud/aws/bake-ami.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Script to automate creation and snapshotting of a Moby AMI. Currently, it's # intended to be invoked from an instance running in the same region as the @@ -7,7 +7,7 @@ set -e -declare -xr PROVIDER="aws" +PROVIDER="aws" source "./build-common.sh" source "${MOBY_SRC_ROOT}/cloud/aws/common.sh" @@ -84,7 +84,7 @@ clean_tagged_resources() fi VOLUME_ID=$(aws ec2 describe-volumes --filters "Name=tag-key,Values=$1" | jq -r .Volumes[0].VolumeId) - if [ ${VOLUME_ID} == "null" ] + if [ ${VOLUME_ID} = "null" ] then arrowecho "No volume found, skipping" else @@ -96,7 +96,7 @@ clean_tagged_resources() fi IMAGE_ID=$(aws ec2 describe-images --filters "Name=tag-key,Values=$1" | jq -r .Images[0].ImageId) - if [ ${IMAGE_ID} == "null" ] + if [ ${IMAGE_ID} = "null" ] then arrowecho "No image found, skipping" else @@ -110,7 +110,7 @@ clean_tagged_resources() fi SNAPSHOT_ID=$(aws ec2 describe-snapshots --filters "Name=tag-key,Values=$1" | jq -r .Snapshots[0].SnapshotId) - if [ ${SNAPSHOT_ID} == "null" ] + if [ ${SNAPSHOT_ID} = "null" ] then arrowecho "No snapshot found, skipping" else diff --git a/alpine/cloud/aws/common.sh b/alpine/cloud/aws/common.sh index 1618a992e..2c6b7f3e3 100644 --- a/alpine/cloud/aws/common.sh +++ b/alpine/cloud/aws/common.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -e diff --git a/alpine/cloud/aws/copy-amis.sh b/alpine/cloud/aws/copy-amis.sh index bf3c2e901..e0d7ef64b 100755 --- a/alpine/cloud/aws/copy-amis.sh +++ b/alpine/cloud/aws/copy-amis.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Usage: ./cloud/aws/copy-amis.sh # Assumptions: diff --git a/alpine/cloud/aws/run-instance.sh b/alpine/cloud/aws/run-instance.sh index d5826172a..5f6541417 100755 --- a/alpine/cloud/aws/run-instance.sh +++ b/alpine/cloud/aws/run-instance.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Quick script to boot an instance from generated AMI. Intended to be invoked # from "alpine" directory. @@ -18,7 +18,7 @@ manager_sg_id() attach_security_group() { MANAGER_SG_ID=$(manager_sg_id) - if [ ${MANAGER_SG_ID} == "null" ] + if [ ${MANAGER_SG_ID} = "null" ] then CUR_INSTANCE_MAC=$(wget -qO- ${METADATA}/network/interfaces/macs) CUR_INSTANCE_VPC_CIDR=$(wget -qO- ${METADATA}/network/interfaces/macs/${CUR_INSTANCE_MAC}vpc-ipv4-cidr-block) @@ -56,7 +56,7 @@ poll_instance_log() echo "Waiting for instance boot log to become available" INSTANCE_BOOT_LOG="null" - while [ ${INSTANCE_BOOT_LOG} == "null" ] + while [ ${INSTANCE_BOOT_LOG} = "null" ] do INSTANCE_BOOT_LOG=$(aws ec2 get-console-output --instance-id "$1" | jq -r .Output) sleep 5 diff --git a/alpine/cloud/azure/bake-azure.sh b/alpine/cloud/azure/bake-azure.sh index 3c272e580..5793d6e6d 100755 --- a/alpine/cloud/azure/bake-azure.sh +++ b/alpine/cloud/azure/bake-azure.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Script to automate the creation of a VHD for Moby in Azure, and upload it to # an Azure storage account (needed in order to launch it on Azure, or upload it @@ -22,7 +22,7 @@ set -e -declare -xr PROVIDER="azure" +PROVIDER="azure" source "build-common.sh" diff --git a/alpine/cloud/build-common.sh b/alpine/cloud/build-common.sh index 4fa84e3f2..952bcd060 100755 --- a/alpine/cloud/build-common.sh +++ b/alpine/cloud/build-common.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -e @@ -26,7 +26,7 @@ format_on_device() # TODO (nathanleclaire): Any more readable or more elegant solution to # account for this minor (specify 1st partition as bootable) difference # between cloud builds? - if [ "${PROVIDER}" == "aws" ] + if [ "${PROVIDER}" = "aws" ] then # This heredoc might be confusing at first glance, so here is a detailed # summary of what each line does: @@ -49,7 +49,7 @@ a 1 w EOF - elif [ ${PROVIDER} == "azure" ] + elif [ ${PROVIDER} = "azure" ] then fdisk "$1" << EOF n