Files
xen/tools/examples/vtpm
T
kaf24@firebug.cl.cam.ac.uk 3f37f70c65 Clean up and refactor some parts of the vTPM and migration-related scripts.
In the external device migration script I am introducing a subtype
(-subtype <subtype>) from which the script's name is formed. Also all
unparsed parameters are passed to the called script.

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

29 lines
430 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
else
fatal "Error while executing vTPM operation '$command'."
fi