112 |
local mac_address |
local mac_address |
113 |
|
|
114 |
control_server_ip=$(dns_to_ip ${MCORE_CONTROL_SERVER}) |
control_server_ip=$(dns_to_ip ${MCORE_CONTROL_SERVER}) |
115 |
|
if [[ -z ${control_server_ip} ]] |
116 |
|
then |
117 |
|
decho "Could not resolve control server ip, dns_to_ip(${MCORE_CONTROL_SERVER}) failed" |
118 |
|
return 1 |
119 |
|
fi |
120 |
iface_ip=$(iface_for_remote_addr ${control_server_ip}) |
iface_ip=$(iface_for_remote_addr ${control_server_ip}) |
121 |
|
if [[ -z ${iface_ip} ]] |
122 |
|
then |
123 |
|
decho "Could not resolve interface ip, iface_ip(${control_server_ip}) failed" |
124 |
|
return 1 |
125 |
|
fi |
126 |
iface=$(iface_for_ip ${iface_ip}) |
iface=$(iface_for_ip ${iface_ip}) |
127 |
|
if [[ -z ${iface} ]] |
128 |
|
then |
129 |
|
decho "Could not resolve interface for referencing ip address, iface_for_ip(${iface_ip}) failed" |
130 |
|
return 1 |
131 |
|
fi |
132 |
mac_address=$(mac_for_iface ${iface}) |
mac_address=$(mac_for_iface ${iface}) |
133 |
|
if [[ -z ${mac_address} ]] |
134 |
|
then |
135 |
|
decho "Could not resolve mac address, mac_for_iface(${iface}) failed" |
136 |
|
return 1 |
137 |
|
fi |
138 |
|
|
139 |
decho "MCORE_CONTROL_SERVER='${MCORE_CONTROL_SERVER}'" |
decho "MCORE_CONTROL_SERVER='${MCORE_CONTROL_SERVER}'" |
140 |
decho "iface_ip='${iface_ip}'" |
decho "iface_ip='${iface_ip}'" |