diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-03-23 13:43:56 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-03-23 13:43:56 +0000 |
commit | 4b2699ef5aa48b52c1052a4a316b37b5a5498724 (patch) | |
tree | 7f20f2e0deef9a6a32a365bf1a56be33be34d31b /usr.sbin | |
parent | 00c3c01f4fbb02387e132c417f8a035d0366ee0d (diff) | |
download | FreeBSD-src-4b2699ef5aa48b52c1052a4a316b37b5a5498724.zip FreeBSD-src-4b2699ef5aa48b52c1052a4a316b37b5a5498724.tar.gz |
Mark any distfiles with no checksum entries in the manifest "Skipped"
instead of "Passed".
Diffstat (limited to 'usr.sbin')
-rwxr-xr-x | usr.sbin/bsdinstall/scripts/checksum | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/usr.sbin/bsdinstall/scripts/checksum b/usr.sbin/bsdinstall/scripts/checksum index 7538da1..1c537f3 100755 --- a/usr.sbin/bsdinstall/scripts/checksum +++ b/usr.sbin/bsdinstall/scripts/checksum @@ -42,17 +42,23 @@ for dist in $DISTRIBUTIONS; do 0 0 $percentage $items CK=`sha256 -q $BSDINSTALL_DISTDIR/$dist` - awk -v checksum=$CK -v dist=$dist '{ + awk -v checksum=$CK -v dist=$dist -v found=0 '{ if (dist == $1) { + found = 1 if (checksum == $2) exit(0) else - exit(1) + exit(2) } - }' $BSDINSTALL_DISTDIR/MANIFEST + } END {if (!found) exit(1);}' $BSDINSTALL_DISTDIR/MANIFEST - if [ $? -eq 0 ]; then - eval "status_$distname=2" + CK_VALID=$? + if [ $CK_VALID -le 1 ]; then + if [ $CK_VALID -eq 0 ]; then + eval "status_$distname=2" + else + eval "status_$distname=6" + fi percentage=$(echo $percentage + 100/`echo $DISTRIBUTIONS | wc -w` | bc) else eval "status_$distname=1" |