On Tue, Oct 13, 2020 at 08:09:18PM +0800, Wu Fengguang wrote:
+get_ipmi_ip() +{
- echo "ipmi_ip: $(ipmitool lan print |grep -E "IP Address\s*:" | awk '{print $4}')"
I suppose some few machines won't have ipmi_ip. So let's check if ipmitool returns error or empty, and only add the field otherwise?
if some machines won't have ipmi_ip, the return of "$(ipmitool lan print |grep -E "IP Address\s*:" | awk '{print $4}')" is null, and only add the field.
Thanks, Zhangyu