commit 9ba9c825d858567ac888bc2ec523d7788e19ddfd Author: Runa A. Sandvik runa.sandvik@gmail.com Date: Wed Nov 9 07:46:44 2011 +0000
Make sure we mount the correct image, and not something that does not exist --- build.sh | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/build.sh b/build.sh index d09580a..760f867 100755 --- a/build.sh +++ b/build.sh @@ -84,10 +84,11 @@ ec2-attach-volume --instance ${iid} --region ${region} --device /dev/sdh ${vol} echo "After attaching the volume, sleep for 20 seconds..." sleep 20
-ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${sshkey} ubuntu@${host} -q -t "sudo chown ubuntu:ubuntu /mnt && cd /mnt && wget https://uec-images.ubuntu.com/releases/10.04/release/ubuntu-10.04-server-clo... -O ubuntu-10.04-server-cloudimg-i386.tar.gz && tar -Sxvzf /mnt/ubuntu-10.04-server-cloudimg-i386.tar.gz && sudo mkdir src target && sudo mount -o loop,rw /mnt/lucid-server-uec-i386.img /mnt/src && sudo mkfs.ext4 -F -L uec-rootfs /dev/sdh && sudo mount /dev/sdh /mnt/target" +ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${sshkey} ubuntu@${host} -q -t "sudo chown ubuntu:ubuntu /mnt && cd /mnt && wget https://uec-images.ubuntu.com/releases/10.04/release/SHA256SUMS && wget https://uec-images.ubuntu.com/releases/10.04/release/SHA256SUMS.gpg && wget https://uec-images.ubuntu.com/releases/10.04/release/ubuntu-10.04-server-clo... -O ubuntu-10.04-server-cloudimg-i386.tar.gz && tar -Sxvzf /mnt/ubuntu-10.04-server-cloudimg-i386.tar.gz && sudo mkdir src target && sudo mount -o loop,rw /mnt/lucid-server-cloudimg-i386.img /mnt/src && sudo mkfs.ext4 -F -L uec-rootfs /dev/sdh && sudo mount /dev/sdh /mnt/target"
# TODO: fix GPG verification, exit on failed verification -#ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ~/keys/tor-cloud.pem ubuntu@${host} -q -t "gpg --verify /mnt/SHA256SUMS.gpg /mnt/SHA256SUMS &> /mnt/verify.txt && cat /mnt/verify.txt | grep Good | awk {'print $2'})" +ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ~/keys/tor-cloud.pem ubuntu@${host} -q -t "gpg --verify /mnt/SHA256SUMS.gpg /mnt/SHA256SUMS &> /mnt/verify.txt" +ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ~/keys/tor-cloud.pem ubuntu@${host} -q -t "grep 'BAD signature' verify.txt &> /dev/null && if [ `echo $?` = "0" ]; then echo 'Cannot verify the signature, stopping here...'; fi"
# this is our startup file that loads tor-prep.sh on first boot ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${sshkey} ubuntu@${host} -q -v -t "sudo wget https://gitweb.torproject.org/tor-cloud.git/blob_plain/HEAD:/rc.local -O /mnt/src/etc/rc.local"
tor-commits@lists.torproject.org