summaryrefslogtreecommitdiff
path: root/scripts/image_signing/ensure_no_nonrelease_files.sh
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2016-11-23 12:22:29 -0500
committerchrome-bot <chrome-bot@chromium.org>2016-11-29 17:41:03 -0800
commit1e9245dfff914107ec06aac84f3b70c2df1f4a41 (patch)
tree3766ce65407bd95916bd4e61763ccaa04880eff7 /scripts/image_signing/ensure_no_nonrelease_files.sh
parentc66cbc3440b03440d591274b188ea62b2de7af80 (diff)
downloadvboot-1e9245dfff914107ec06aac84f3b70c2df1f4a41.tar.gz
image_signing: unify board extraction logic from lsb-releasefirmware-servo-9040.Bfirmware-reef-9042.87.B
We had two places extracting the board value from lsb-release and parsing the output by hand. Unify them to use the same parsing logic to avoid desynchronized behavior. We also create a new get_boardvar_from_lsb_release helper to unify the board name -> variable name mangling logic. BUG=chromium:667192 TEST=`./security_test_image --board samus` still detects the correct board BRANCH=None Change-Id: If88a8ae59b9c9fd45ddd796653a0173ed0186d2d Reviewed-on: https://chromium-review.googlesource.com/414224 Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'scripts/image_signing/ensure_no_nonrelease_files.sh')
-rwxr-xr-xscripts/image_signing/ensure_no_nonrelease_files.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/image_signing/ensure_no_nonrelease_files.sh b/scripts/image_signing/ensure_no_nonrelease_files.sh
index a912c449..a3612cea 100755
--- a/scripts/image_signing/ensure_no_nonrelease_files.sh
+++ b/scripts/image_signing/ensure_no_nonrelease_files.sh
@@ -40,8 +40,8 @@ main() {
local rootfs=$(make_temp_dir)
mount_image_partition_ro "${image}" 3 "${rootfs}"
# Pick the right set of test-expectation data to use.
- local board=$(get_board_from_lsb_release "${rootfs}")
- eval "release_file_blacklist=(\"\${RELEASE_FILE_BLACKLIST_${board}[@]}\")"
+ local boardvar=$(get_boardvar_from_lsb_release "${rootfs}")
+ eval "release_file_blacklist=(\"\${RELEASE_FILE_BLACKLIST_${boardvar}[@]}\")"
for file in ${release_file_blacklist}; do
if [ -e "${rootfs}/${file}" ]; then