mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
Hotplug scripts include certain bash-isms that are not supported under some distros' default shell (eg. Ubuntu 6.10's use of dash) Signed-off-by: Alastair Tse <atse@xensource.com>
23 lines
351 B
Bash
23 lines
351 B
Bash
#!/bin/bash
|
|
|
|
dir=$(dirname "$0")
|
|
. "$dir/vtpm-hotplug-common.sh"
|
|
|
|
vtpm_fatal_error=0
|
|
|
|
case "$command" in
|
|
add)
|
|
vtpm_create_instance
|
|
;;
|
|
remove)
|
|
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
|