summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2017-09-14 00:41:27 +0000
committeremaste <emaste@FreeBSD.org>2017-09-14 00:41:27 +0000
commit88c9897e1da3b42a2b052c3d7527cd034c294126 (patch)
tree80f33d4ac7c235ff5eaa6cb2622d79a268fcbbd2 /usr.sbin
parent345d61c9f4b7a8ba68c046aa498fb159614573cf (diff)
downloadFreeBSD-src-88c9897e1da3b42a2b052c3d7527cd034c294126.zip
FreeBSD-src-88c9897e1da3b42a2b052c3d7527cd034c294126.tar.gz
MFC r321226: bsdinstall: improve checksum mismatch error for snapshots
The usual case of a mismatched checksum for installer snapshots (e.g., -CURRENT, -ALPHA*) is that a newer snapshot has been built and the old install sets have been replaced. Provide a specific error message for checksum mismatches there that suggests looking for a newer snapshot. Submitted by: Guangyuan Yang <yzgyyang@outlook.com> Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'usr.sbin')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/checksum12
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/bsdinstall/scripts/checksum b/usr.sbin/bsdinstall/scripts/checksum
index 1c537f3..316c9fe 100755
--- a/usr.sbin/bsdinstall/scripts/checksum
+++ b/usr.sbin/bsdinstall/scripts/checksum
@@ -62,8 +62,16 @@ for dist in $DISTRIBUTIONS; do
percentage=$(echo $percentage + 100/`echo $DISTRIBUTIONS | wc -w` | bc)
else
eval "status_$distname=1"
- dialog --backtitle "FreeBSD Installer" --title "Error" \
- --msgbox "The checksum for $dist does not match. It may have become corrupted, and should be redownloaded." 0 0
+ case $(/bin/freebsd-version -u) in
+ *-ALPHA*|*-CURRENT|*-STABLE|*-PRERELEASE)
+ dialog --backtitle "FreeBSD Installer" --title "Error" \
+ --msgbox "The checksum for $dist does not match. It may have become corrupted, or it may be from a newer version of FreeBSD. Please check for a newer snapshot." 0 0
+ ;;
+ *)
+ dialog --backtitle "FreeBSD Installer" --title "Error" \
+ --msgbox "The checksum for $dist does not match. It may have become corrupted, and should be redownloaded." 0 0
+ ;;
+ esac
exit 1
fi
done
OpenPOWER on IntegriCloud