mirror of
https://github.com/masonr/yet-another-bench-script.git
synced 2025-11-10 17:00:07 +05:30
Suppress Error messages on VM check
This commit is contained in:
parent
dc86201120
commit
bb64ea8c2b
1 changed files with 4 additions and 4 deletions
8
yabs.sh
8
yabs.sh
|
|
@ -82,11 +82,11 @@ check_virt() {
|
|||
sys_product=""
|
||||
sys_ver=""
|
||||
fi
|
||||
if grep -qa docker /proc/1/cgroup; then
|
||||
if grep -qa docker /proc/1/cgroup 2>/dev/null; then
|
||||
VIRT="Docker"
|
||||
elif grep -qa lxc /proc/1/cgroup; then
|
||||
elif grep -qa lxc /proc/1/cgroup 2>/dev/null; then
|
||||
VIRT="LXC"
|
||||
elif grep -qa container=lxc /proc/1/environ; then
|
||||
elif grep -qa container=lxc /proc/1/environ 2>/dev/null; then
|
||||
VIRT="LXC"
|
||||
elif [[ -f /proc/user_beancounters ]]; then
|
||||
VIRT="OpenVZ"
|
||||
|
|
@ -123,7 +123,7 @@ check_virt() {
|
|||
fi
|
||||
fi
|
||||
else
|
||||
VIRT="Dedicated"
|
||||
VIRT="Dedicated/Unknown"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue