Files
xen/tools/examples/vtpm
T
emellor@leeni.uk.xensource.com d8a4248e02 The attached patch does the following:
- introduces two basic tests for the virtual TPM (skipped on hardware
where a TPM is not available or vtpm manager has not been started
manually before)
- adapts the Makefiles to make the test cases available
- splits up the hotplug files into two files where the vtpm-common.sh
can be sourced by 'other' scripts as well
- uses echo "$var" to return variables from functions
- gets rid of the 'set +e" work-around
- introduces a script (vtpm-delete) to delete entries from the virtual
TPM directory in /etc/xen/vtpm.db

The xm-tests will skip over the 2nd test on most systems and the patch
has otherwise no effect on existing tests.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-02-27 16:13:05 +01:00

28 lines
368 B
Bash

#!/bin/sh
dir=$(dirname "$0")
. "$dir/vtpm-hotplug-common.sh"
vtpm_fatal_error=0
case "$command" in
add)
vtpm_create_instance
;;
online)
vtpm_create_instance
;;
remove)
vtpm_remove_instance
;;
offline)
vtpm_remove_instance
;;
esac
if [ $vtpm_fatal_error -eq 0 ]; then
log debug "Successful vTPM operation '$command'."
success
fi