1 |
|
# $Id$ |
2 |
|
|
3 |
validate_client() |
validate_client() |
4 |
{ |
{ |
12 |
return 1 |
return 1 |
13 |
fi |
fi |
14 |
|
|
15 |
|
decho "registering mac_address='${mac_address}'" |
16 |
|
|
17 |
# first check if mac is registered |
# first check if mac is registered |
18 |
serial=$(mysqldo "select serial from client_serials where mac='${mac_address}'") |
serial=$(mysqldo "select serial from client_serials where mac='${mac_address}'") |
19 |
|
|
29 |
then |
then |
30 |
return 1 |
return 1 |
31 |
else |
else |
32 |
echo "serial='${serial}'" |
decho "serial='${serial}'" |
33 |
|
rvecho "${serial}" |
34 |
return 0 |
return 0 |
35 |
fi |
fi |
36 |
} |
} |
47 |
iface=$(iface_for_ip ${iface_ip}) |
iface=$(iface_for_ip ${iface_ip}) |
48 |
mac_address=$(mac_for_iface ${iface}) |
mac_address=$(mac_for_iface ${iface}) |
49 |
|
|
50 |
echo "DEBUG: MCORE_CONTROL_SERVER='${MCORE_CONTROL_SERVER}'" |
decho "MCORE_CONTROL_SERVER='${MCORE_CONTROL_SERVER}'" |
51 |
echo "DEBUG: iface_ip='${iface_ip}'" |
decho "iface_ip='${iface_ip}'" |
52 |
echo "DEBUG: iface='${iface}'" |
decho "iface='${iface}'" |
53 |
echo "DEBUG: mac_address='${mac_address}'" |
decho "mac_address='${mac_address}'" |
54 |
|
|
55 |
echo "register '${mac_address}'" |
decho "register '${mac_address}'" |
56 |
nsslsay_fingerprint "register '${mac_address}'" |
nsslsay_fingerprint "register '${mac_address}'" |
57 |
} |
} |