summaryrefslogtreecommitdiff
path: root/scripts/image_signing/common.sh
diff options
context:
space:
mode:
authorAmey Deshpande <ameyd@google.com>2015-04-24 13:56:17 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-04-29 19:43:14 +0000
commit7dd3bd0fcf565901aacc512cd29cefe19291c2e7 (patch)
tree4fb4a73d67dc10a570842ea8479d3d108f26ef7a /scripts/image_signing/common.sh
parent4ce1cc01c08ad58abca12577c5d18e9071a26383 (diff)
downloadvboot-7dd3bd0fcf565901aacc512cd29cefe19291c2e7.tar.gz
image_signing: use per-board release file blackliststabilize-7039.B
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 <vapier@chromium.org> Commit-Queue: Amey Deshpande <ameyd@google.com> Tested-by: Amey Deshpande <ameyd@google.com>
Diffstat (limited to 'scripts/image_signing/common.sh')
-rw-r--r--scripts/image_signing/common.sh10
1 files changed, 10 insertions, 0 deletions
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