File: vtpm-delete

package info (click to toggle)
xen-common 4.0.0-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 876 kB
  • ctags: 362
  • sloc: sh: 3,061; makefile: 403; perl: 186; python: 174; xml: 2
file content (18 lines) | stat: -rw-r--r-- 346 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

# This scripts must be called the following way:
# vtpm-delete <vtpm uuid>
# or
# vtpm-delete --vmname <vm name>

dir=$(dirname "$0")
. "$dir/vtpm-common.sh"

if [ "$1" == "--vmname" ]; then
	vtpm_uuid=$(vtpm_uuid_from_vmname $2)
	if [ "$vtpm_uuid" != "" ];then
		vtpm_delete_instance $vtpm_uuid
	fi
else
	vtpm_delete_instance $1
fi