Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/hwinfo/hardware.control.class.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2754 by niro, Fri Sep 25 07:35:56 2015 UTC revision 2755 by niro, Tue Feb 2 14:11:44 2016 UTC
# Line 37  run_hardware_detect() Line 37  run_hardware_detect()
37   decho "running hardware detection"   decho "running hardware detection"
38   fi   fi
39    
40   nsslsay_queue_init   # run all pushed firstboot configuration snippets
41   nsslsay_queue_add "nocolors"   run_push_firstboot "${serial}"
  #nsslsay_queue_add "get hardware.detect driver netcard"  
  nsslsay_queue_add "get hardware.detect driver connected-iface"  
  netcard_driver=$(control_client "${serial}" run-queue)  
  if [[ -n ${netcard_driver} ]]  
  then  
  decho "netcard_driver='${netcard_driver}'"  
  import_resource cfg_network "${serial}" module "${netcard_driver}"  
  else  
  decho "no netcard_driver found"  
  fi  
  networking=$(mysqldo "select networking from cfg_network where serial=${serial};")  
  if [[ -z ${networking} ]] || [[ ${networking} = NULL ]]  
  then  
  # set network to dhcp  
  decho "networking='dhcp'"  
  import_resource cfg_network "${serial}" networking "dhcp"  
  fi  
  hostname=$(mysqldo "select hostname from cfg_network where serial=${serial};")  
  if [[ -z ${hostname} ]] || [[ ${hostname} = NULL ]]  
  then  
  # set hostname to MCORE_DEFAULT_HOSTNAME  
  decho "hostname='${MCORE_DEFAULT_HOSTNAME}'"  
  import_resource cfg_network "${serial}" hostname "${MCORE_DEFAULT_HOSTNAME}"  
  fi  
  domain=$(mysqldo "select domain from cfg_network where serial=${serial};")  
  if [[ -z ${domain} ]] || [[ ${domain} = NULL ]]  
  then  
  # set domain to MCORE_DEFAULT_DOMAIN  
  decho "hostname='${MCORE_DEFAULT_DOMAIN}'"  
  import_resource cfg_network "${serial}" domain "${MCORE_DEFAULT_DOMAIN}"  
  fi  
   
  nsslsay_queue_init  
  nsslsay_queue_add "nocolors"  
  nsslsay_queue_add "get hardware.detect driver graphic"  
  graphic_driver=$(control_client "${serial}" run-queue)  
  if [[ -n ${graphic_driver} ]]  
  then  
  decho "graphic_driver='${graphic_driver}'"  
  import_resource cfg_graphic "${serial}" module "${graphic_driver}"  
  else  
  decho "no graphic_driver found"  
  fi  
   
  nsslsay_queue_init  
  nsslsay_queue_add "nocolors"  
  nsslsay_queue_add "get hardware.detect info monitor"  
  monitor_info=$(control_client "${serial}" run-queue)  
  monitor_resolution="${monitor_info##*;}"  
  if [[ -n ${monitor_resolution} ]]  
  then  
  decho "monitor_resolution='${monitor_resolution}'"  
  import_resource cfg_graphic "${serial}" resolution "${monitor_resolution}"  
  else  
  decho "no monitor_resolution found"  
  fi  
   
  keymap=$(mysqldo "select keymap from cfg_input where serial=${serial};")  
  if [[ -z ${keymap} ]] || [[ ${keymap} = NULL ]]  
  then  
  # set keymap to MCORE_DEFAULT_KEYMAP  
  decho "keymap='${MCORE_DEFAULT_KEYMAP}'"  
  import_resource cfg_input "${serial}" keymap "${MCORE_DEFAULT_KEYMAP}"  
  fi  
   
  # now setup some empty database entries if the does not exist  
  for i in user root vnc  
  do  
  auth=$(mysqldo "select ${i} from client_auth where serial=${serial};")  
  if [[ -z ${auth} ]] || [[ ${auth} = NULL ]]  
  then  
  decho "set empty ${i} pass"  
  import_resource client_auth "${serial}" "${i}" ""  
  fi  
  done  
   
  # create an empty screensaver entry  
  decho "set empty screensaver"  
  import_resource cfg_screensaver "${serial}" "screensaver" ""  
   
  # enable vnc service  
  decho "enable vnc service"  
  import_resource cfg_vnc "${serial}" "service" "1"  
42    
43   # update the hwdetected flags   # update the hwdetected flags
44   import_resource client_serials "${serial}" hwdetected 1   import_resource client_serials "${serial}" hwdetected 1

Legend:
Removed from v.2754  
changed lines
  Added in v.2755