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 2507 by niro, Fri Sep 11 09:56:34 2015 UTC revision 2768 by niro, Wed Feb 10 15:29:02 2016 UTC
# Line 9  validate_client() Line 9  validate_client()
9   local serial_id   local serial_id
10   local os   local os
11   local tools   local tools
12     local netboot
13     local location
14    
15   if [[ -z ${mac_address} ]]   if [[ -z ${mac_address} ]]
16   then   then
# Line 57  validate_client() Line 59  validate_client()
59   mysqldo "insert into state_connected(serial,ip,mac,mtime) values('${serial}','${ip_address}','${mac_address}','${mtime}');"   mysqldo "insert into state_connected(serial,ip,mac,mtime) values('${serial}','${ip_address}','${mac_address}','${mtime}');"
60   fi   fi
61    
62     # get netboot state
63     nsslsay_queue_init
64     nsslsay_queue_add "nocolors"
65     nsslsay_queue_add "get version.netboot"
66     netboot=$(control_client "${serial}" run-queue)
67     # update netboot state
68     serial_id=$(mysqldo "select serial from state_connected where serial=${serial};")
69     if [[ -n ${serial_id} ]]
70     then
71     mysqldo "update state_connected set netboot='${netboot}' where serial=${serial};"
72     fi
73    
74     # get location from cmdline and update the client_serials.location entry
75     nsslsay_queue_init
76     nsslsay_queue_add "nocolors"
77     nsslsay_queue_add "get system.cmdline MCORE_LOCATION="
78     location=$(control_client "${serial}" run-queue)
79     # update location
80     if [[ -n ${location} ]]
81     then
82     mysqldo "update client_serials set location='${location}' where serial=${serial};"
83     fi
84    
85   # update tools and os version info   # update tools and os version info
86   nsslsay_queue_init   nsslsay_queue_init
87   nsslsay_queue_add "nocolors"   nsslsay_queue_add "nocolors"
# Line 96  register_client() Line 121  register_client()
121   decho "iface='${iface}'"   decho "iface='${iface}'"
122   decho "mac_address='${mac_address}'"   decho "mac_address='${mac_address}'"
123    
124   decho "register '${mac_address}'"   decho "register '${mac_address}' '${iface_ip}'"
125   nsslsay_fingerprint "register '${mac_address}' '${iface_ip}'"   nsslsay_fingerprint "register '${mac_address}' '${iface_ip}'"
126  }  }
127    

Legend:
Removed from v.2507  
changed lines
  Added in v.2768