<div dir="ltr">I stupidly omitted the Subject from my last email.<div><br><div class="gmail_quote"><div dir="ltr">1. Why is dmidecode not setuid?  If it were, running virt-what as non-root would be a non-issue.<div><br></div><div>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:</div><div><br></div><div>   report() { echo "$*" ; exit 0; }</div><div><br></div><div>3. Proposed patches to acknowledge RedHat Virtualization.</div><div><br></div><div><div>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:<br></div><div><br></div><div><div>diff --git a/<a href="http://virt-what.in" target="_blank">virt-what.in</a> b/<a href="http://virt-what.in" target="_blank">virt-what.in</a></div><div>index 776bfde..67bbc67 100644</div><div>--- a/<a href="http://virt-what.in" target="_blank">virt-what.in</a></div><div>+++ b/<a href="http://virt-what.in" target="_blank">virt-what.in</a></div><div>@@ -114,6 +114,13 @@ elif echo "$dmi" | grep -q 'Manufacturer: VMware'; then</div><div>     echo vmware</div><div> fi</div><div><br></div><div>+# Check for RedHat Virtualization</div><div>+if grep -q 'RHEV Hypervisor' "${root}/sys/devices/virtual/dmi/id/product_name"; then</div><div>+    echo rhev; exit;</div><div>+elif echo "$dmi" | grep -q '[[:space:]]Product Name: RHEV Hypervisor'; then</div><div>+    echo rhev; exit;</div><div>+fi 2>/dev/null</div><div>+</div><div> # Check for Hyper-V.</div><div> # <a href="http://blogs.msdn.com/b/sqlosteam/archive/2010/10/30/is-this-real-the-metaphysics-of-hardware-virtuali" target="_blank">http://blogs.msdn.com/b/sqlosteam/archive/2010/10/30/is-this-real-the-metaphysics-of-hardware-virtuali</a></div><div> if [ "$cpuid" = "Microsoft Hv" ]; then</div></div><div><br></div><div><br></div><div>I also wrote the test cases. That's in the next mail.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div></font></span></div></div></div>-- <br><div class="gmail_signature"><div dir="ltr">Otheus<div><a href="mailto:otheus.uibk@gmail.com" target="_blank">otheus.uibk@gmail.com</a></div><div><a href="mailto:otheus.shelling@uibk.ac.at" target="_blank">otheus.shelling@uibk.ac.at</a></div><div><br></div></div></div>
</div></div>