summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormwberry2016-11-12 15:21:42 -0800
committermwberry2016-11-12 18:33:33 -0800
commitb7ce727dbe05066dd8b56ad1b68106963d2c626c (patch)
treeeed6b73fdd0b2f200c9cb5c5a8299a922801da38
parentd3fce84a07960300a827874aa82a214f88c9f49f (diff)
downloadaur-b7ce727dbe05066dd8b56ad1b68106963d2c626c.tar.gz
uncomment time saving comments
-rwxr-xr-xnannycam.functions16
1 files changed, 8 insertions, 8 deletions
diff --git a/nannycam.functions b/nannycam.functions
index 2a6d92968f4e..9919909bf219 100755
--- a/nannycam.functions
+++ b/nannycam.functions
@@ -122,9 +122,9 @@ determine_mbr_boot_device () {
hash_mbr () {
local mbrDevice=$(determine_mbr_boot_device)
- # dd if="$mbrDevice" of=/tmp/mbr.bin bs=512 count=1
+ dd if="$mbrDevice" of=/tmp/mbr.bin bs=512 count=1
ACTUAL_MBR_HASH="$(openssl dgst -$HASH_ALG /tmp/mbr.bin | cut -f 2 -d ' ')"
- # rm /tmp/mbr.bin
+ rm /tmp/mbr.bin
}
check_mbr () {
@@ -135,13 +135,13 @@ check_mbr () {
hash_mbr_gap () {
local mbrDevice=$(determine_mbr_boot_device)
- # local part_start=$(parted -s -m "$mbrDevice" unit b print | egrep '^1:' | cut -f 2 -d ':' | tr -d 'Bb')
- # local blocks=$(( part_start / 512 ))
- # local check=$(( $blocks * 512 ))
- # [ $part_start -eq $check ] || ( echo "Partition doesn't start at 512 byte boundary! Aborting." >&2; exit 3 )
- # dd if="$mbrDevice" of=/tmp/gap.bin bs=512 skip=1 count=$blocks
+ local part_start=$(parted -s -m "$mbrDevice" unit b print | egrep '^1:' | cut -f 2 -d ':' | tr -d 'Bb')
+ local blocks=$(( part_start / 512 ))
+ local check=$(( $blocks * 512 ))
+ [ $part_start -eq $check ] || ( echo "Partition doesn't start at 512 byte boundary! Aborting." >&2; exit 3 )
+ dd if="$mbrDevice" of=/tmp/gap.bin bs=512 skip=1 count=$blocks
ACTUAL_MBR_GAP_HASH="$(openssl dgst -$HASH_ALG /tmp/gap.bin | cut -f 2 -d ' ')"
- # rm /tmp/gap.bin
+ rm /tmp/gap.bin
}
check_mbr_gap () {