[virt-tools-list] [virt-what] review of allow to use sysctl

Anatoly Pugachev matorola at gmail.com
Sat Aug 25 09:36:54 UTC 2018


Hello!

virt-what$ git desc
v1.18-6-gd7fd8a7

Latest commit in git "Allow using sysctl, for example when /proc isn't
available"
doesn't look good for me. Can someone please review/revert this commit
or explain me what does this code do (git show -1):

+use_sysctl() {
+    # Lacking /proc, on some systems sysctl can be used instead.
+    OS=$(uname) || fail "failed to get operating system name"
+
+    [ "$OS" == "OpenBSD" ]
+}

Running on a linux:

virt-what# PATH=$PATH:. ./virt-what
./virt-what: 45: [: Linux: unexpected operator
ibm_power-lpar_dedicated


Thanks.




More information about the virt-tools-list mailing list