From d8dfabfd0422de3b2af240ce2c4631af51fe1dd0 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Wed, 22 Dec 2010 02:33:29 -0800 Subject: Add more error recovery and disk space checking. --- scripts/install/install-image | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/install/install-image') diff --git a/scripts/install/install-image b/scripts/install/install-image index c201be3c..fd4fee7d 100755 --- a/scripts/install/install-image +++ b/scripts/install/install-image @@ -60,6 +60,7 @@ fetch_iso_by_url () curl -f -o $filename $NEW_ISO if [ $? -ne 0 ]; then echo "Unable to fetch ISO from $NEW_ISO" + rm -f $filename exit 1 fi @@ -78,6 +79,7 @@ fetch_iso_by_url () response=$(get_response "Yes" "Yes No Y N") if [ "$response" == "no" ] || [ "$response" == "n" ]; then + rm -f $filename fail_exit 'OK. Installation will not be performed.' fi -- cgit v1.2.3