Re: [virt-what] review of allow to use sysctl

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

 



On Sat, Aug 25, 2018 at 12:36:54PM +0300, Anatoly Pugachev wrote:
> 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

I cannot reproduce this warning.  What does uname print on your machine?

$ uname
Linux

Does '[' (ie. test) exist on your path?

$ which [
/usr/bin/[

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v

_______________________________________________
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