# $Id$ # 1.serial 2.mtime 3.mac validate_serial() { local serial local db_serial local mtime local mac # abort if params are missing [ $# -ne 3 ] && return 1 serial=$1 mtime=$2 mac=$3 db_serial=$(mysqldo "select serial from client_serials where mtime='${mtime}'" ) # and mac='${mac}'" ) if [[ ${db_serial} = ${serial} ]] then return 0 else return 1 fi } show_invalid_serial_msg() { echo -e ${COLRED} echo "Current Serial '${ALX_SERIAL}' is invalid." echo "None of the current settings of this client will be touched." echo "Please inform your system-administrator." echo -e ${COLDEFAULT} }