[why] The ipmi command just run in physical machine, the vm not support use ipmi command
[how] Add a judgment only physical machine run ipmi operation
Signed-off-by: Zhang Yu 2134782174@qq.com --- tests/host-info | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/host-info b/tests/host-info index 84f796dcb..0ab8e6c97 100755 --- a/tests/host-info +++ b/tests/host-info @@ -1,4 +1,5 @@ #!/bin/bash +. $LKP_SRC/lib/env.sh
get_memory() { @@ -101,8 +102,10 @@ get_ipmi_ip() # 802.1q VLAN ID : Disabled # RMCP+ Cipher Suites : 0,1,2,3,17 # Cipher Suite Priv Max : XuuaXXXXXXXXXXX + is_virt && return + is_docker && return local ip=$(ipmitool lan print | awk 'NR==3{print $4}') - [ -n "$ip" ] && echo "ipmi_ip:" $ip + [ -n "$ip" ] && echo "ipmi_ip: $ip"
}