(no subject)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



1. Why is dmidecode not setuid?  If it were, running virt-what as non-root would be a non-issue.

2. Why the possibility of outputting multiple lines. Programming laziness? Or do programs now rely on this as a feature?  I propose replacing all instances of "echo" with something like "report" where report is a function call:

   report() { echo "$*" ; exit 0; }

3. Proposed patches to acknowledge RedHat Virtualization.

The relevant code is taken from facter v2.4.6, files /usr/share/ruby/vendor_ruby/facter/virtual.rb:134 and /usr/share/ruby/vendor_ruby/facter/virtual.rb:175 except that the latter also matches for xen and must be improved here:

diff --git a/virt-what.in b/virt-what.in
index 776bfde..67bbc67 100644
--- a/virt-what.in
+++ b/virt-what.in
@@ -114,6 +114,13 @@ elif echo "$dmi" | grep -q 'Manufacturer: VMware'; then
     echo vmware
 fi

+# Check for RedHat Virtualization
+if grep -q 'RHEV Hypervisor' "${root}/sys/devices/virtual/dmi/id/product_name"; then
+    echo rhev; exit;
+elif echo "$dmi" | grep -q '[[:space:]]Product Name: RHEV Hypervisor'; then
+    echo rhev; exit;
+fi 2>/dev/null
+
 # Check for Hyper-V.
 # http://blogs.msdn.com/b/sqlosteam/archive/2010/10/30/is-this-real-the-metaphysics-of-hardware-virtuali
 if [ "$cpuid" = "Microsoft Hv" ]; then


I also wrote the test cases. That's in the next mail.



--
_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux