Magellan Linux

Diff of /alx-src/trunk/alxconfig-ng/functions/serial_functions.sh

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

revision 228 by niro, Wed Mar 9 00:05:50 2005 UTC revision 345 by niro, Sun Oct 9 21:32:55 2005 UTC
# Line 1  Line 1 
1  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/serial_functions.sh,v 1.1 2005-03-09 00:04:37 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  {  {
# Line 14  validate_serial() Line 14  validate_serial()
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
# Line 24  validate_serial() Line 23  validate_serial()
23   return 1   return 1
24   fi   fi
25  }  }
26    
27    show_invalid_serial_msg()
28    {
29     echo -e ${COLRED}
30     echo "Current Serial '${ALX_SERIAL}' is invalid."
31     echo "None of the current settings of this client will be touched."
32     echo "Please inform your system-administrator."
33     echo -e ${COLDEFAULT}
34    }

Legend:
Removed from v.228  
changed lines
  Added in v.345