Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/include/register.global.class.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2786 by niro, Wed Feb 17 10:11:31 2016 UTC revision 2787 by niro, Wed Feb 17 10:49:12 2016 UTC
# Line 106  validate_client() Line 106  validate_client()
106    
107  register_client()  register_client()
108  {  {
109     local control_server
110   local control_server_ip   local control_server_ip
111   local iface_ip   local iface_ip
112   local iface   local iface
113   local mac_address   local mac_address
114    
115   control_server_ip=$(dns_to_ip ${MCORE_CONTROL_SERVER})   control_server=$(mcore-controlserver)
116     if [[ $? != 0 ]]
117     then
118     decho "Could not communicate with the controlserver"
119     return 1
120     fi
121    
122     control_server_ip=$(dns_to_ip ${control_server})
123   if [[ -z ${control_server_ip} ]]   if [[ -z ${control_server_ip} ]]
124   then   then
125   decho "Could not resolve control server ip, dns_to_ip(${MCORE_CONTROL_SERVER}) failed"   decho "Could not resolve control server ip, dns_to_ip(${control_server}) failed"
126   return 1   return 1
127   fi   fi
128   iface_ip=$(iface_for_remote_addr ${control_server_ip})   iface_ip=$(iface_for_remote_addr ${control_server_ip})
# Line 136  register_client() Line 144  register_client()
144   return 1   return 1
145   fi   fi
146    
147   decho "MCORE_CONTROL_SERVER='${MCORE_CONTROL_SERVER}'"   decho "control_server='${control_server}'"
148   decho "iface_ip='${iface_ip}'"   decho "iface_ip='${iface_ip}'"
149   decho "iface='${iface}'"   decho "iface='${iface}'"
150   decho "mac_address='${mac_address}'"   decho "mac_address='${mac_address}'"

Legend:
Removed from v.2786  
changed lines
  Added in v.2787