From b94a237c8f736109d4d17f5ec67af0ffcf31eca1 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 26 Nov 2018 15:06:15 +0100 Subject: [PATCH 223/325] image-checksum.sh: Adjust to deal with slices instead of GPT partitions Obtained from: ElectroBSD --- release/scripts/image-checksum.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release/scripts/image-checksum.sh b/release/scripts/image-checksum.sh index b8c1c94d0aaa..25cc7f58585a 100755 --- a/release/scripts/image-checksum.sh +++ b/release/scripts/image-checksum.sh @@ -45,7 +45,7 @@ # ########################################################################## -UFS_PARTITION=p2 +UFS_PARTITION=s2a EXPECTED_PARTITIONS=2 MOUNTPOINT=/mnt VERBOSE=0 @@ -96,7 +96,7 @@ partition_count_acceptable() { local md_unit="${1}" # Verify that there are exactly two partitions present - partitions=$(gpart show -r -p "md${md_unit}" | grep -c "md${md_unit}"p) + partitions=$(gpart show -r -p "md${md_unit}" | grep -c "md${md_unit}"s) if [ "${partitions}" != "${EXPECTED_PARTITIONS}" ]; then echo "Invalid number of partitions: ${partitions}" return 1; @@ -148,7 +148,7 @@ generate_partial_image_checksum() { mdconfig -d -u "${md_unit}" || return 1 - bootcode_checksum=$(dd if=/dev/md${md_unit}p1 2>/dev/null | sha256) + bootcode_checksum=$(dd if=/dev/md${md_unit}s1 2>/dev/null | sha256) verbose_log "Boot code checksum: ${bootcode_checksum}" mtree_checksum=$(sha256 -q "${spec_file}") verbose_log "mtree checksum: ${mtree_checksum}" -- 2.32.0