aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/freebsd-update/freebsd-update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/freebsd-update/freebsd-update.sh')
-rw-r--r--usr.sbin/freebsd-update/freebsd-update.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
index 2a07bc1fb7bc..b6e42e94f4bf 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -1402,7 +1402,7 @@ fetch_metadata_index () {
fetch_metadata_bogus () {
echo
echo "The update metadata$1 is correctly signed, but"
- echo "failed an integrity check."
+ echo "failed an integrity check ($2)."
echo "Cowardly refusing to proceed any further."
return 1
}
@@ -1413,7 +1413,7 @@ fetch_metadata_index_merge () {
for METAFILE in $@; do
if [ `grep -E "^${METAFILE}\|" ${TINDEXHASH} | wc -l` \
-ne 1 ]; then
- fetch_metadata_bogus " index"
+ fetch_metadata_bogus " index" "${METAFILE} count not 1"
return 1
fi
@@ -1436,7 +1436,7 @@ fetch_metadata_index_merge () {
# specifically grepped out of ${TINDEXHASH}.
fetch_metadata_index_sanity () {
if grep -qvE '^[0-9A-Z.-]+\|[0-9a-f]{64}$' tINDEX.new; then
- fetch_metadata_bogus " index"
+ fetch_metadata_bogus " index" "unexpected entry in tINDEX.new"
return 1
fi
}
@@ -1453,7 +1453,7 @@ fetch_metadata_sanity () {
# Check that the first four fields make sense.
if gunzip -c < files/$1.gz |
grep -qvE "^[a-z]+\|[0-9a-z-]+\|${P}+\|[fdL-]\|"; then
- fetch_metadata_bogus ""
+ fetch_metadata_bogus "" "invalid initial fields"
return 1
fi
@@ -1464,28 +1464,28 @@ fetch_metadata_sanity () {
# Sanity check entries with type 'f'
if grep -E '^f' sanitycheck.tmp |
grep -qvE "^f\|${M}\|${H}\|${P}*\$"; then
- fetch_metadata_bogus ""
+ fetch_metadata_bogus "" "invalid type f entry"
return 1
fi
# Sanity check entries with type 'd'
if grep -E '^d' sanitycheck.tmp |
grep -qvE "^d\|${M}\|\|\$"; then
- fetch_metadata_bogus ""
+ fetch_metadata_bogus "" "invalid type d entry"
return 1
fi
# Sanity check entries with type 'L'
if grep -E '^L' sanitycheck.tmp |
grep -qvE "^L\|${M}\|${P}*\|\$"; then
- fetch_metadata_bogus ""
+ fetch_metadata_bogus "" "invalid type L entry"
return 1
fi
# Sanity check entries with type '-'
if grep -E '^-' sanitycheck.tmp |
grep -qvE "^-\|\|\|\|\|\|"; then
- fetch_metadata_bogus ""
+ fetch_metadata_bogus "" "invalid type - entry"
return 1
fi