1
1
mirror of https://schlomp.space/tastytea/hashboot synced 2024-11-16 14:37:06 +01:00

aesthetic considerations :-)

This commit is contained in:
tastytea 2015-09-30 00:33:23 +02:00
parent 356d3b40ff
commit 7138c6e72a

@ -98,17 +98,13 @@ then
HASHER=$(head -n1 ${DIGEST_FILE} | awk '{print $5}') HASHER=$(head -n1 ${DIGEST_FILE} | awk '{print $5}')
dd if=${MBR_DEVICE} of=${MBR_TMP} bs=1M count=1 status=none || die 8 dd if=${MBR_DEVICE} of=${MBR_TMP} bs=1M count=1 status=none || die 8
if $(grep ${MBR_TMP} ${DIGEST_FILE} | ${HASHER} --check --warn --quiet --strict > ${LOG_FILE}) if ! $(grep ${MBR_TMP} ${DIGEST_FILE} | ${HASHER} --check --warn --quiet --strict > ${LOG_FILE})
then then
echo "MBR ok"
else
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 >> ${LOG_FILE}) if ! $(grep -v ${MBR_TMP} ${DIGEST_FILE} | ${HASHER} --check --warn --quiet --strict >> ${LOG_FILE})
then then
echo "/boot ok"
else
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))
die $COUNTER die $COUNTER