--- alx-src/trunk/alxconfig-ng/functions/config_network.sh 2005/04/19 17:19:14 266 +++ alx-src/trunk/alxconfig-ng/functions/config_network.sh 2005/08/03 17:56:00 276 @@ -1,4 +1,4 @@ -# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_network.sh,v 1.7 2005-04-19 17:19:14 niro Exp $ +# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_network.sh,v 1.8 2005-08-03 17:56:00 niro Exp $ # configures networkin on the host via mysql db settings get_network_settings() @@ -28,7 +28,7 @@ ((i++)) done - # and now put them in usable var names and export them systemwide + # and now put in usable var names and export them systemwide export ALX_HOSTNAME="${DB_NETWORK[0]:=NULL}" export ALX_MODULE="${DB_NETWORK[1]:=NULL}" export ALX_DOMAIN="${DB_NETWORK[2]:=NULL}" @@ -38,6 +38,10 @@ export ALX_DNS="${DB_NETWORK[6]:=NULL}" export ALX_GATEWAY="${DB_NETWORK[7]:=NULL}" export ALX_BROADCAST="${DB_NETWORK[8]:=NULL}" + + # the new mac address hack + export ALX_FORCEMACTO=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ + "select forcemacto from cfg_network where serial='${ALX_SERIAL}'") } config_networking() @@ -92,6 +96,12 @@ echo 'GATEWAY_IF="eth0"' >> /etc/conf.d/net.eth0 fi + # force mac address override + if [[ ${ALX_FORCEMACTO} != NULL ]] + then + echo "FORCE_MAC_TO=\"${ALX_FORCEMACTO}\"" >> /etc/conf.d/net.eth0 + fi + # nameserver or nameserver overrides if [[ ${ALX_DNS} != NULL ]] then