You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
edk2/SOURCES/certs_add.sh

15 lines
405 B

#!/bin/bash
IMAGE="$1"
[ -f "$IMAGE" ] || { echo "File $IMAGE is not found!"; exit 1; }
GUID=$(virt-fw-vars -i $IMAGE -p -v 2>/dev/null | awk '{if($1 ~ /name=db$/){sub(/guid=guid:/,"",$2);print $2}}')
[ -n "$GUID" ] || { echo "GUID is not set!"; exit 1; }
for F in `ls ./*.pem`; do
echo "virt-fw-vars --add-db $GUID $F -i $IMAGE -o $IMAGE";
virt-fw-vars --add-db $GUID $F -i $IMAGE -o $IMAGE;
done