修改:设置完网络参数后读取一下当前的网络参数
This commit is contained in:
parent
129cb6f80c
commit
8ce26eb008
1
main.go
1
main.go
|
@ -37,6 +37,7 @@ func main(){
|
|||
log.Println("set network ",v.Name)
|
||||
setNetworkParam(v.ID,v)
|
||||
}
|
||||
networkParamList = getNetworkParam()
|
||||
|
||||
/**************变量模板初始化****************/
|
||||
CommunicationManageInit()
|
||||
|
|
|
@ -202,6 +202,7 @@ func GetNetInformation(netName string) (NetInformation, error) {
|
|||
if err != nil {
|
||||
return info, err
|
||||
}
|
||||
|
||||
info.HardwareAddr = inter.HardwareAddr
|
||||
info.Mac = hex.EncodeToString(inter.HardwareAddr)
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"NetworkParam":[{"ID":"1","Name":"eth0","DHCP":"0","IP":"192.168.4.156","Netmask":"255.255.255.0","Broadcast":"192.168.4.255"}]}
|
||||
{"NetworkParam":[{"ID":"1","Name":"en0","DHCP":"0","IP":"192.168.4.156","Netmask":"255.255.255.0","Broadcast":"192.168.4.255"}]}
|
||||
|
|
Loading…
Reference in New Issue