Bugfix: mark actual target AMI as public instead of the source one

changes/46/546/1
Michael Prokop 11 years ago
parent 7be2a07b05
commit ee60bcc3d8

@ -88,10 +88,10 @@ copy_ami() {
fi
if $_opt_public ; then
echo "Marking AMI $ami_id as public"
ec2-modify-image-attribute --region "$target_region" "$ami_id" --launch-permission -a all
echo "Marking AMI $ami_id_copy as public"
ec2-modify-image-attribute --region "$target_region" "$ami_id_copy" --launch-permission -a all
if [ $? -ne 0 ] ; then
echo "Noticed problem when trying to mark AMI with ID $ami_id in region $target_region as public." >&2
echo "Noticed problem when trying to mark AMI with ID $ami_id_copy in region $target_region as public." >&2
return 1
fi
fi

Loading…
Cancel
Save