- is_virt && return
- is_docker && return
- [[ -e /dev/ipmi0 ]] || return
- [[ -e /dev/ipmi/0 ]] || return
- [[ -e /dev/ipmidev/0 ]] || return local ip=$(ipmitool lan print | awk 'NR==3{print $4}') [ -n "$ip" ] && echo "ipmi_ip: $ip"
Please keep the context consistent: All '[[ ]]' or '[ ]'.
Thanks, RenWen
-- 2.23.0