Browse code

Move DEST ahead of stack account creation

Change-Id: I25892e8a9249d3d421062d910d53b8de8134ef80

Dean Troyer authored on 2012/06/28 07:55:15
Showing 1 changed files
... ...
@@ -219,6 +219,12 @@ else
219 219
     sudo rm -f /etc/sudoers.d/stack_sh_nova
220 220
 fi
221 221
 
222
+# Create the destination directory and ensure it is writable by the user
223
+sudo mkdir -p $DEST
224
+if [ ! -w $DEST ]; then
225
+    sudo chown `whoami` $DEST
226
+fi
227
+
222 228
 # Set True to configure ``stack.sh`` to run cleanly without Internet access.
223 229
 # ``stack.sh`` must have been previously run with Internet access to install
224 230
 # prerequisites and initialize ``$DEST``.
... ...
@@ -602,12 +608,6 @@ failed() {
602 602
 # an error.  It is also useful for following along as the install occurs.
603 603
 set -o xtrace
604 604
 
605
-# create the destination directory and ensure it is writable by the user
606
-sudo mkdir -p $DEST
607
-if [ ! -w $DEST ]; then
608
-    sudo chown `whoami` $DEST
609
-fi
610
-
611 605
 
612 606
 # Install Packages
613 607
 # ================