Add dependency check

This commit is contained in:
Alexis Ben Miloud--Josselin 2018-06-08 10:31:43 +02:00
parent 2f86db5cb7
commit 42226c7817
1 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,14 @@
#!/bin/sh
for DEP in hxselect lvs tempfile
do
if [ -z "$(which $DEP)" ]
then
echo "kvmstats.sh: $DEP not found in \$PATH" 1>&2
exit 1
fi
done
TMPFILE=$(tempfile)
for VM in $(virsh list --all --name)