mirror of https://schlomp.space/tastytea/hashboot
print corrupted files on check #2 :-/
parent
7e7e4252a3
commit
4c9bff4440
4
hashboot
4
hashboot
|
@ -154,12 +154,12 @@ then
|
||||||
[ -f ${DIGEST_FILE} ] || die 9 "No digestfile"
|
[ -f ${DIGEST_FILE} ] || die 9 "No digestfile"
|
||||||
HASHER=$(head -n1 ${DIGEST_FILE} | awk '{print $5}')
|
HASHER=$(head -n1 ${DIGEST_FILE} | awk '{print $5}')
|
||||||
dd if=${MBR_DEVICE} of=${MBR_TMP} bs=${MBR_SIZE}K count=1 status=noxfer || die 8
|
dd if=${MBR_DEVICE} of=${MBR_TMP} bs=${MBR_SIZE}K count=1 status=noxfer || die 8
|
||||||
if ! $(grep ${MBR_TMP} ${DIGEST_FILE} | ${HASHER} --check --warn --quiet --strict | tee ${LOG_FILE})
|
if ! grep ${MBR_TMP} ${DIGEST_FILE} | ${HASHER} --check --warn --quiet --strict | tee ${LOG_FILE}
|
||||||
then
|
then
|
||||||
echo " !! TIME TO PANIK: MBR WAS MODIFIED !!"
|
echo " !! TIME TO PANIK: MBR WAS MODIFIED !!"
|
||||||
COUNTER=$((COUNTER + 1))
|
COUNTER=$((COUNTER + 1))
|
||||||
fi
|
fi
|
||||||
if ! $(grep -v ${MBR_TMP} ${DIGEST_FILE} | ${HASHER} --check --warn --quiet --strict | tee -a ${LOG_FILE})
|
if ! grep -v ${MBR_TMP} ${DIGEST_FILE} | ${HASHER} --check --warn --quiet --strict | tee -a ${LOG_FILE}
|
||||||
then
|
then
|
||||||
echo " !! TIME TO PANIK: AT LEAST 1 FILE WAS MODIFIED !!"
|
echo " !! TIME TO PANIK: AT LEAST 1 FILE WAS MODIFIED !!"
|
||||||
COUNTER=$((COUNTER + 2))
|
COUNTER=$((COUNTER + 2))
|
||||||
|
|
Loading…
Reference in New Issue