From 7138c6e72a6052828be8f5365db5365577cee12f Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 30 Sep 2015 00:33:23 +0200 Subject: [PATCH] aesthetic considerations :-) --- hashboot.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hashboot.sh b/hashboot.sh index 8ca4ab9..2c4b879 100755 --- a/hashboot.sh +++ b/hashboot.sh @@ -98,17 +98,13 @@ then HASHER=$(head -n1 ${DIGEST_FILE} | awk '{print $5}') 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 - echo "MBR ok" - else echo " !! TIME TO PANIK: MBR WAS MODIFIED !!" COUNTER=$((COUNTER + 1)) 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 - echo "/boot ok" - else echo " !! TIME TO PANIK: AT LEAST 1 FILE WAS MODIFIED !!" COUNTER=$((COUNTER + 2)) die $COUNTER