qubes-hcl-report update

This commit is contained in:
Zrubi 2013-12-11 12:28:12 +01:00 committed by Marek Marczykowski-Górecki
parent 7733ff9ffb
commit c8f4dc70e8
2 changed files with 8 additions and 5 deletions

View File

@ -51,6 +51,7 @@ if [[ $BRAND =~ "O.E.M" ]]
PRODUCT=`sudo dmidecode |grep -A9 "Base Board Information" |grep "Product Name:" |cut -d ' ' -f3- |tr -s '[:blank:]' _`
fi
KERNEL=`uname -r`
CPU=`sudo cat /proc/cpuinfo |grep "model name" |sort -u |cut -d ' ' -f3-`
CHIPSET=`sudo lspci -nn |grep "00:00.0.*Host bridge"`
VGA=`sudo lspci -nn |grep "VGA\|Display" | sed -e "s/^/\t\t/"`
@ -76,7 +77,8 @@ fi
sudo cat /etc/qubes-release |tee ~/$FILENAME.txt
echo
echo -e "Model Name:\t$BRAND $PRODUCT\n" |tee -a ~/$FILENAME.txt
echo -e "Model Name:\t$BRAND $PRODUCT" |tee -a ~/$FILENAME.txt
echo -e "Kernel:\t\t$KERNEL\n" |tee ~/$FILENAME.txt
echo -e "CPU:\t\t$CPU" |tee -a ~/$FILENAME.txt
echo -e "Chipset:\t$CHIPSET" |tee -a ~/$FILENAME.txt
echo -e "VGA:$VGA\n" |tee -a ~/$FILENAME.txt

View File

@ -44,12 +44,13 @@ def main():
vmname = args[0]
vm = qvm_collection.get_vm_by_name(vmname)
if vm is None:
if options.verbose:
if options.verbose:
print >> sys.stdout, "A VM with the name '{0}' does not exist in the system!".format(vmname)
exit(1)
exit(1)
else:
if options.verbose:
if options.verbose:
print >> sys.stdout, "A VM with the name '{0}' is exist.".format(vmname)
exit(0)
exit(0)
main()