From 7dd3bd0fcf565901aacc512cd29cefe19291c2e7 Mon Sep 17 00:00:00 2001 From: Amey Deshpande Date: Fri, 24 Apr 2015 13:56:17 -0700 Subject: image_signing: use per-board release file blacklist This patch changes ensure_no_nonrelease_files.sh to use per-board release file blacklist instead of the default one. It also uses this opportunity to make ensure_no_nonrelease_files.sh consistently formatted. BRANCH=none TEST=Ran ./security_test_image on a lakitu image and --vboot_hash pointing to this commit, and verified ensure_no_nonrelease_files.sh passes. BUG=brillo:823 Change-Id: I2cff56192a5ff0b917faba7549e7adafb4757a47 Reviewed-on: https://chromium-review.googlesource.com/267335 Reviewed-by: Mike Frysinger Commit-Queue: Amey Deshpande Tested-by: Amey Deshpande --- scripts/image_signing/common.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'scripts/image_signing/common.sh') diff --git a/scripts/image_signing/common.sh b/scripts/image_signing/common.sh index 599c9e1e..62dc362a 100644 --- a/scripts/image_signing/common.sh +++ b/scripts/image_signing/common.sh @@ -75,6 +75,16 @@ die() { exit 1 } +# Extract and return board name from /etc/lsb-release. +# Args: rootfs +get_board_from_lsb_release() { + local rootfs=$1 + # The cuts turn e.g. x86-foo as a well as x86-foo-pvtkeys into x86_foo. + local board=$(grep CHROMEOS_RELEASE_BOARD= "${rootfs}/etc/lsb-release" | \ + cut -d = -f 2 | cut -d - -f 1,2 --output-delimiter=_) + echo "${board}" +} + # This will override the trap set in common_minmal.sh trap "cleanup" INT TERM EXIT -- cgit v1.2.1