1 |
# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/serial_functions.sh,v 1.3 2005-08-28 19:30:03 niro Exp $ |
# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/serial_functions.sh,v 1.4 2005-10-09 21:32:55 niro Exp $ |
2 |
# 1.serial 2.mtime 3.mac |
# 1.serial 2.mtime 3.mac |
3 |
validate_serial() |
validate_serial() |
4 |
{ |
{ |
14 |
mtime=$2 |
mtime=$2 |
15 |
mac=$3 |
mac=$3 |
16 |
|
|
17 |
db_serial=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ |
db_serial=$(mysqldo "select serial from client_serials where mtime='${mtime}'" ) # and mac='${mac}'" ) |
|
"select serial from client_serials where mtime='${mtime}' and mac='${mac}'" ) |
|
18 |
|
|
19 |
if [[ ${db_serial} = ${serial} ]] |
if [[ ${db_serial} = ${serial} ]] |
20 |
then |
then |