Magellan Linux

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

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

mcore-src/trunk/mcore-tools/daemon/client/include/hardware.client.class revision 2031 by niro, Mon Aug 13 11:47:16 2012 UTC mcore-src/trunk/mcore-tools/src/modules/hwinfo/hardware.client.class.in revision 2805 by niro, Thu Oct 13 13:34:08 2016 UTC
# Line 29  helper_hardware_netcard_driver() Line 29  helper_hardware_netcard_driver()
29   rvecho "${driver}"   rvecho "${driver}"
30  }  }
31    
32  #wlan.device  helper_hardware_wlan_device()
33  #wlan.driver  {
34     local device
35     local CONFIG
36    
37     device="$(get_hwinfo wlan)"
38    
39     CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/hardware/wlan.device"
40     clearconfig
41     addconfig "${device}"
42    
43     rvecho "${device}"
44    }
45    
46    helper_hardware_wlan_driver()
47    {
48     local driver
49     local CONFIG
50    
51     driver="$(get_driver_modules wlan)"
52    
53     CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/hardware/wlan.driver"
54     clearconfig
55     addconfig "${driver}"
56    
57     rvecho "${driver}"
58    }
59    
60  # hardware_graphic_device()  # hardware_graphic_device()
61  # {  # {
# Line 251  helper_hardware_memory_info() Line 276  helper_hardware_memory_info()
276   rvecho "${info}"   rvecho "${info}"
277  }  }
278    
279    helper_hardware_connected-iface_info()
280    {
281     local CONFIG
282    
283     local control_server_ip=$(dns_to_ip $(mcore-controlserver))
284     local iface_ip=$(iface_for_remote_addr ${control_server_ip})
285     local iface=$(iface_for_ip ${iface_ip})
286    
287     CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/hardware/connected-iface.info"
288     clearconfig
289     addconfig "${iface}"
290    
291     rvecho "${iface}"
292    }
293    
294    helper_hardware_connected-iface_driver()
295    {
296     local driver
297     local CONFIG
298    
299     local control_server_ip=$(dns_to_ip $(mcore-controlserver))
300     local iface_ip=$(iface_for_remote_addr ${control_server_ip})
301     local iface=$(iface_for_ip ${iface_ip})
302    
303     driver=$(get_driver_modules "netcard --only ${iface}")
304    
305     CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/hardware/connected-iface.driver"
306     clearconfig
307     addconfig "${driver}"
308    
309     rvecho "${driver}"
310    }
311    
312  # helper_hardware_framebuffer_info()  # helper_hardware_framebuffer_info()
313  # {  # {
314  # framebuffer.info  # framebuffer.info
# Line 294  help_hardware_detect() Line 352  help_hardware_detect()
352   mecho "get hardware.detect [action] [class]"   mecho "get hardware.detect [action] [class]"
353   mecho " Prints information about the systems hardware"   mecho " Prints information about the systems hardware"
354   mecho "  Available classes:"   mecho "  Available classes:"
355   mecho "   memory, cpu, arch, monitor, netcard, graphic, sound,"   mecho "   memory, cpu, arch, monitor, netcard, wlan, graphic, sound,"
356   mecho "   printer, disk, cdrom, keyboard, mouse"   mecho "   printer, disk, cdrom, keyboard, mouse, connected-iface"
357   mecho "  Available actions:"   mecho "  Available actions:"
358   mecho "   info   - general information about a hwclass"   mecho "   info   - general information about a hwclass"
359   mecho "   driver - needed drivers of selected class if available"   mecho "   driver - needed drivers of selected class if available"
# Line 304  help_hardware_detect() Line 362  help_hardware_detect()
362    
363  get_hardware_detect()  get_hardware_detect()
364  {  {
365   local action="$1"   local action="${CLASS_ARGV[0]}"
366   local class="$2"   local class="${CLASS_ARGV[1]}"
367    
368   # sanity check   # sanity check
369   case "${action}" in   case "${action}" in
# Line 319  get_hardware_detect() Line 377  get_hardware_detect()
377   arch) helper_hardware_"${class}"_"${action}" ;;   arch) helper_hardware_"${class}"_"${action}" ;;
378   monitor) helper_hardware_"${class}"_"${action}" ;;   monitor) helper_hardware_"${class}"_"${action}" ;;
379   netcard) helper_hardware_"${class}"_"${action}" ;;   netcard) helper_hardware_"${class}"_"${action}" ;;
380     wlan) helper_hardware_"${class}"_"${action}" ;;
381   graphic) helper_hardware_"${class}"_"${action}" ;;   graphic) helper_hardware_"${class}"_"${action}" ;;
382   sound) helper_hardware_"${class}"_"${action}" ;;   sound) helper_hardware_"${class}"_"${action}" ;;
383   printer) helper_hardware_"${class}"_"${action}" ;;   printer) helper_hardware_"${class}"_"${action}" ;;
# Line 326  get_hardware_detect() Line 385  get_hardware_detect()
385   cdrom) helper_hardware_"${class}"_"${action}" ;;   cdrom) helper_hardware_"${class}"_"${action}" ;;
386   keyboard) helper_hardware_"${class}"_"${action}" ;;   keyboard) helper_hardware_"${class}"_"${action}" ;;
387   mouse) helper_hardware_"${class}"_"${action}" ;;   mouse) helper_hardware_"${class}"_"${action}" ;;
388     connected-iface) helper_hardware_"${class}"_"${action}" ;;
389   *) help_hardware_detect && return 1 ;;   *) help_hardware_detect && return 1 ;;
390   esac   esac
391  }  }

Legend:
Removed from v.2031  
changed lines
  Added in v.2805