mirror of https://schlomp.space/tastytea/hashboot
Small tuning on near feature.
parent
4d9a996b47
commit
d0deec57dc
9
hashboot
9
hashboot
|
@ -106,7 +106,7 @@ then
|
|||
[ -z "${HASHER}" ] && die 5 "No hash calculator found"
|
||||
|
||||
read_config
|
||||
|
||||
if [ -f ${DIGEST_FILE} ]
|
||||
write_hashes $DIGEST_FILE_TMP
|
||||
|
||||
if diff -q --ignore-matching-lines='^#' ${DIGEST_FILE} ${DIGEST_FILE_TMP} ;
|
||||
|
@ -121,12 +121,13 @@ then
|
|||
if [ "$(grep -v ${MBR_TMP} ${DIGEST_FILE})" != "$(grep -v ${MBR_TMP} ${DIGEST_FILE_TMP})" ]
|
||||
then
|
||||
echo "anything here, must be rewritten."
|
||||
cp ${DIGEST_FILE_TMP} ${DIGEST_FILE} || die 7
|
||||
rm ${DIGEST_FILE_TMP}
|
||||
fi
|
||||
mv ${DIGEST_FILE_TMP} ${DIGEST_FILE} || die 7
|
||||
echo "List of hashes written to ${DIGEST_FILE}"
|
||||
fi
|
||||
else
|
||||
write_hashes $DIGEST_FILE
|
||||
fi
|
||||
|
||||
#Backup of good files
|
||||
tar -czpPf ${BACKUP_FILE} ${MBR_TMP} /boot ${DIGEST_FILE}
|
||||
if [ $? == 0 ]
|
||||
|
|
Loading…
Reference in New Issue