]> xenbits.xensource.com Git - xenclient/build.git/commitdiff
[host installer] Add error message for d'load fail
authorChristopher Clark <christopher.clark@citrix.com>
Wed, 9 Sep 2009 17:34:54 +0000 (10:34 -0700)
committerChristopher Clark <christopher.clark@citrix.com>
Wed, 9 Sep 2009 17:34:54 +0000 (10:34 -0700)
target/generic/target_xenclient_installer_skeleton/install/stages/Download-install-files

index 07999bd2c8b038254da78caded444aab6c88ddc4..919c0fdc92d7aaf3f9454f300f57514501140323 100755 (executable)
@@ -152,18 +152,34 @@ link_install_to_downloads()
     done
 }
 
+#-----------------------------------------------------------
+exit_bad_transfer()
+{
+    if interactive ; then
+        hide_cursor
+        dialog --colors --ok-label "Continue" --msgbox \
+"   \ZbERROR: Download from repository failed\ZB
+
+   Please correct the repository address." 0 0
+
+    fi
+    exit ${BadTransfer}
+}
+
 #-----------------------------------------------------------
 if ! empty_download_dir ; then
     echo "Could not empty download directory ${INSTALL_DOWNLOAD_DIR} : aborting.">&2
     exit ${Abort}
 fi
 
+#-----------------------------------------------------------
+
 case ${NETWORK_PROTOCOL} in
 http|ftp)
-    do_wget_transfer "${NETWORK_REPO}" || exit ${BadTransfer}
+    do_wget_transfer "${NETWORK_REPO}" || exit_bad_transfer
     ;;
 nfs)
-    do_nfs_transfer "${NETWORK_REPO}" || exit ${BadTransfer}
+    do_nfs_transfer "${NETWORK_REPO}" || exit_bad_transfer
     ;;
 *)
     echo "Unknown network protocol: ${NETWORK_PROTOCOL} : aborting.">&2
@@ -173,9 +189,6 @@ esac
 
 mixedgauge "Download complete." "100"
 
-# FIXME: when checking to see if download was successful:
-#        if not: if interactive, return ${Previous}, else return ${Abort}
-
 link_install_to_downloads
 
 exit ${Continue}