Commit 36c6ca58 authored by Vitaly Lipatov's avatar Vitaly Lipatov

distr_info: skip extra reqs

parent 1bc5a0a3
...@@ -652,16 +652,16 @@ get_core_count() ...@@ -652,16 +652,16 @@ get_core_count()
local DIST_OS="$(get_base_os_name)" local DIST_OS="$(get_base_os_name)"
case "$DIST_OS" in case "$DIST_OS" in
macos|freebsd) macos|freebsd)
detected=$(sysctl hw.ncpu | awk '{print $2}') detected=$(a= sysctl hw.ncpu | awk '{print $2}')
;; ;;
linux) linux)
detected=$(grep -c "^processor" /proc/cpuinfo) detected=$(grep -c "^processor" /proc/cpuinfo)
;; ;;
solaris) solaris)
detected=$(prtconf | grep -c 'cpu[^s]') detected=$(a= prtconf | grep -c 'cpu[^s]')
;; ;;
aix) aix)
detected=$(lsdev -Cc processor -S A | wc -l) detected=$(a= lsdev -Cc processor -S A | wc -l)
;; ;;
# *) # *)
# fatal "Unsupported OS $DIST_OS" # fatal "Unsupported OS $DIST_OS"
...@@ -700,7 +700,8 @@ get_virt() ...@@ -700,7 +700,8 @@ get_virt()
echo "xen" && return echo "xen" && return
fi fi
if lscpu | grep "Hypervisor vendor:" | grep -q "KVM" ; then # use util-linux
if LANG=C a= lscpu | grep "Hypervisor vendor:" | grep -q "KVM" ; then
echo "kvm" && return echo "kvm" && return
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment