--- alx-src/trunk/alxconfig-ng/init.d/alxsettings 2005/03/09 00:04:18 226 +++ alx-src/trunk/alxconfig-ng/init.d/alxsettings 2005/03/09 00:04:23 227 @@ -11,6 +11,8 @@ #%before: #%after: +# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsettings,v 1.3 2005-03-09 00:04:23 niro Exp $ + # checks first if the client was already configured and if it has an valid serial # if not it runs the autoconfiguration script # these settings will be used for client setup @@ -25,7 +27,7 @@ #mysql settings source /etc/alxconfig-ng/config.rc source /usr/lib/alxconfig-ng/functions/mysqlfunctions -source /usr/lib/alxconfig-ng/functions/mysqlfunctions +source /usr/lib/alxconfig-ng/functions/serial_functions source /usr/lib/alxconfig-ng/functions/config_network source /usr/lib/alxconfig-ng/functions/config_printers source /usr/lib/alxconfig-ng/functions/config_x11 @@ -126,32 +128,6 @@ config_printing } -# 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=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select serial from client_serials where mtime='${mtime}' and mac='${mac}'" ) - - if [[ ${db_serial} = ${serial} ]] - then - return 0 - else - return 1 - fi -} - get_system_serial(){ local CUR_IP CUR_MAC CUR_MTIME