From 1b9a6fcfc150ee5d0265b223498e1825c2e62b21 Mon Sep 17 00:00:00 2001 From: Christopher Clark Date: Wed, 9 Sep 2009 10:34:54 -0700 Subject: [PATCH] [host installer] Add error message for d'load fail --- .../install/stages/Download-install-files | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/target/generic/target_xenclient_installer_skeleton/install/stages/Download-install-files b/target/generic/target_xenclient_installer_skeleton/install/stages/Download-install-files index 07999bd..919c0fd 100755 --- a/target/generic/target_xenclient_installer_skeleton/install/stages/Download-install-files +++ b/target/generic/target_xenclient_installer_skeleton/install/stages/Download-install-files @@ -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} -- 2.39.5