summaryrefslogtreecommitdiffstats
path: root/distribution/virt/import/isptyconsole
blob: 13610854fc0112527f9d98da82014d4649723193 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#/bin/bash
#

if [[ $# != 1 ]]; then
	echo "Usage: $0 [guestname]"
	exit 1
fi

if ! virsh dumpxml $1; then
	echo "problem with virsh dumpxml $1"
	exit 1
fi

if virsh dumpxml $1 | grep -q "<serial type='pty'>"; then
	exit 0
else
	exit 1
fi