On Tue, Oct 20, 2020 at 11:10:09AM +0800, Zhang Yu wrote:
output: ipmi_ip: 9.3.4.1
以上output太过平凡,去掉吧。
Signed-off-by: Zhang Yu 2134782174@qq.com
tests/host-info | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/tests/host-info b/tests/host-info index a57855dc..5a4f590c 100755 --- a/tests/host-info +++ b/tests/host-info @@ -80,6 +80,24 @@ get_partitions() fi }
+get_ipmi_ip() +{
- # ipmitool lan print
哪个是命令,哪个是output? 让人怎么区分?
- # Set in Progress : Set Complete
- # IP Address Source : Static Address
- # IP Address : 9.3.4.1
- # Subnet Mask : 255.255.0.0
- # MAC Address : e0:00:84:2b:51:7b
- # SNMP Community String : TrapAdmin12#$
- # IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
- # Default Gateway IP : 9.3.0.1
- # 802.1q VLAN ID : Disabled
- # RMCP+ Cipher Suites : 0,1,2,3,17
- # Cipher Suite Priv Max : XuuaXXXXXXXXXXX
- imp_ip=$(ipmitool lan print |awk 'NR==3{print $4}')
- [ $? -eq 0 ] && echo "ipmi_ip:" $imp_ip
+}
main() { get_node @@ -87,6 +105,7 @@ main() get_partitions get_mac get_model_name
- get_ipmi_ip
}
main
2.23.0