diskimage-builder/diskimage_builder/elements/keylime-agent/cleanup.d/98-copy-allowlist
Danni Shi 18df5a59b5 Update keylime-agent and tpm-emulator elements
Story: #2002713
Task: #41304

Change-Id: I735db46a62edecc85457d4163963f558c9fe461d
2021-10-06 15:05:28 -04:00

17 lines
365 B
Bash
Executable File

#!/bin/bash
# dib-lint: disable=safe_sudo
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
[ -n "$TARGET_ROOT" ]
IMAGE_PATH=$(readlink -f $IMAGE_NAME)
# copy allowlist and checksum to image path
sudo cp $TARGET_ROOT/root/allowlist.txt ${IMAGE_PATH}-allowlist.txt
sudo cp $TARGET_ROOT/root/checksum.txt ${IMAGE_PATH}-checksum.txt