--- mcore-src/trunk/mcore-tools/src/modules/hwinfo/hardware.control.class.in 2015/09/10 13:53:32 2496 +++ mcore-src/trunk/mcore-tools/src/modules/hwinfo/hardware.control.class.in 2015/09/10 14:08:40 2497 @@ -1,5 +1,6 @@ # $Id$ +provide hardware require hwdetection require mysql @@ -15,6 +16,15 @@ local graphic_driver local monitor_info local monitor_resolution + local hwdetected + + # first check if hardware detect was already done + hwdetected=$(mysqldo "select hwdetected from client_serials where serial=${serial};") + if [[ ${hwdetected} = 1 ]] + then + decho "hardware detection already run, aborting" + return 0 + fi nsslsay_queue_init nsslsay_queue_add "nocolors" @@ -73,4 +83,7 @@ else decho "no monitor_resolution found" fi + + # update the hwdetected flags + import_resource client_serial "${serial}" hwdetected 1 }