--- mcore-src/trunk/mcore-tools/src/modules/hwinfo/hardware.control.class.in 2015/09/10 14:11:50 2498 +++ mcore-src/trunk/mcore-tools/src/modules/hwinfo/hardware.control.class.in 2015/09/11 07:36:40 2499 @@ -4,9 +4,9 @@ require hwdetection require mysql -set_hardware_detect() +run_hardware_detect() { - local serial="${CLASS_ARGV[0]}" + local serial="$1" local cmd local netcard_driver @@ -18,6 +18,12 @@ local monitor_resolution local hwdetected + if [[ -z ${serial} ]] + then + decho "No serial given" + return 1 + fi + # first check if hardware detect was already done hwdetected=$(mysqldo "select hwdetected from client_serials where serial=${serial};") if [[ ${hwdetected} = 1 ]] @@ -87,5 +93,28 @@ fi # update the hwdetected flags - import_resource client_serial "${serial}" hwdetected 1 + import_resource client_serials "${serial}" hwdetected 1 +} + +set_hardware_detect() +{ + local serial="${CLASS_ARGV[0]}" + + local cmd + local netcard_driver + local networking + local hostname + local domain + local graphic_driver + local monitor_info + local monitor_resolution + local hwdetected + + if [[ -z ${serial} ]] + then + eecho "No serial given" + return 1 + fi + + run_hardware_detect "${serial}" }