Browse code

don't download images to /opt

Jesse Andrews authored on 2011/09/17 06:16:36
Showing 2 changed files
... ...
@@ -22,7 +22,8 @@ if [ ! -d proto ]; then
22 22
     git clone https://github.com/cloudbuilders/python-novaclient.git proto/opt/python-novaclient
23 23
     git clone https://github.com/cloudbuilders/keystone.git proto/opt/keystone
24 24
     git clone https://github.com/cloudbuilders/glance.git proto/opt/glance
25
-    wget -c http://images.ansolabs.com/tty.tgz -O proto/opt/tty.tgz
25
+    chroot proto mkdir -p /opt/files
26
+    wget -c http://images.ansolabs.com/tty.tgz -O proto/opt/files/tty.tgz
26 27
 fi
27 28
 
28 29
 cp -pr proto $DEST
... ...
@@ -412,13 +412,13 @@ screen_it dash "sudo /etc/init.d/apache2 restart; sudo tail -f /var/log/apache2/
412 412
 if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then
413 413
     # Downloads a tty image (ami/aki/ari style), then extracts it.  Upon extraction 
414 414
     # we upload to glance with the glance cli tool.
415
-    mkdir -p $DEST/images
416
-    cd $DEST/images
417
-    if [ ! -f $DEST/tty.tgz ]; then
418
-        wget -c http://images.ansolabs.com/tty.tgz -O $DEST/tty.tgz
415
+    if [ ! -f $FILES/tty.tgz ]; then
416
+        wget -c http://images.ansolabs.com/tty.tgz -O $FILES/tty.tgz
419 417
     fi
420 418
 
421 419
     # extract ami-tty/image, aki-tty/image & ari-tty/image
420
+    mkdir -p $FILES/images
421
+    cd $FILES/images
422 422
     tar -zxf $DEST/tty.tgz
423 423
 
424 424
     # add images to glance