Index: branches/locker-dev/locker/deploy/bin/onathena
===================================================================
--- branches/locker-dev/locker/deploy/bin/onathena	(revision 1343)
+++ branches/locker-dev/locker/deploy/bin/onathena	(revision 1344)
@@ -158,29 +158,4 @@
 fi
 
-if [ "$prompt_username" = "" ]; then
-  admin_username="admin"
-  prompt_username=0
-fi
-if [ "$prompt_password" = "" ]; then
-  prompt_password=1
-fi
-
-if [ "$prompt_username" -eq 1 ]; then
-    echo
-    echo "You will be able to log in to $sname using a username of your choice."
-    echo "Please decide upon a username and enter it below."
-    echo "Your username must contain only alphanumeric characters (a-z, 0-9)."
-    printf "Desired username: "
-    read admin_username
-    admin_username=`perl -0e 'print $ARGV[0] =~ /^([[:alnum:]]+)$/' -- "$admin_username"`
-    if [ "$admin_username" = "" ]; then
-        echo
-        echo ERROR:
-        echo "Your username must contain only alphanumeric characters (a-z, 0-9)."
-        echo "You will need to run the installer again and choose a different username."
-        exit 1
-    fi
-fi
-
 origdir=`pwd`
 mkdir -p "$lroot/web_scripts_tmp"
@@ -198,13 +173,4 @@
 fs sa . system:scripts-security-upd write
 
-if [ "$prompt_password" -eq 1 ]; then
-    stty -echo
-    sshrun "deploy$scriptsdev/bin/prompt-password" "$sname" "$deploy" "$addrend" "$admin_username"
-    stty echo
-fi
-
-echo
-echo "Unpacking $sname... (this step might take several minutes)"
-
 # This version is deprecated, use create_scripts_dir instead
 
@@ -235,5 +201,44 @@
 fi
 
+if [ "$wizard" != "" ]; then
+  vsshrun "wizard/bin/wizard" "install" "$wizard" "$lroot/web_scripts/$addrend"
+  exit 0
+fi
+
+if [ "$prompt_username" = "" ]; then
+  admin_username="admin"
+  prompt_username=0
+fi
+if [ "$prompt_password" = "" ]; then
+  prompt_password=1
+fi
+
+if [ "$prompt_username" -eq 1 ]; then
+    echo
+    echo "You will be able to log in to $sname using a username of your choice."
+    echo "Please decide upon a username and enter it below."
+    echo "Your username must contain only alphanumeric characters (a-z, 0-9)."
+    printf "Desired username: "
+    read admin_username
+    admin_username=`perl -0e 'print $ARGV[0] =~ /^([[:alnum:]]+)$/' -- "$admin_username"`
+    if [ "$admin_username" = "" ]; then
+        echo
+        echo ERROR:
+        echo "Your username must contain only alphanumeric characters (a-z, 0-9)."
+        echo "You will need to run the installer again and choose a different username."
+        exit 1
+    fi
+fi
+
+if [ "$prompt_password" -eq 1 ]; then
+    stty -echo
+    sshrun "deploy$scriptsdev/bin/prompt-password" "$sname" "$deploy" "$addrend" "$admin_username"
+    stty echo
+fi
+
 cd "$origdir"
+
+echo
+echo "Unpacking $sname... (this step might take several minutes)"
 
 vsshrun "deploy$scriptsdev/bin/$deploy" "$lname" "$sname" "$deploy" "$addrend" "$admin_username" "$requires_sql" "$scriptsdev" "$USER" || die "Unknown failure during configuration"
