adm5120.sh 738 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2007 OpenWrt.org
  4. #
  5. #
  6. board_name=""
  7. status_led=""
  8. sys_mtd_part=""
  9. adm5120_detect() {
  10. board_name=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo)
  11. case "$board_name" in
  12. "Cellvision"*)
  13. status_led="status"
  14. sys_mtd_part="firmware"
  15. ;;
  16. "Compex"*)
  17. status_led="diag"
  18. case "$board_name" in
  19. *-WRT)
  20. sys_mtd_part="trx"
  21. ;;
  22. *)
  23. sys_mtd_part="partition1"
  24. ;;
  25. esac
  26. ;;
  27. "Edimax"*)
  28. status_led="power"
  29. sys_mtd_part="firmware"
  30. ;;
  31. "Infineon"*)
  32. sys_mtd_part="firmware"
  33. ;;
  34. "Mikrotik"*)
  35. status_led="power"
  36. ;;
  37. "ZyXEL"*)
  38. status_led="power"
  39. sys_mtd_part="trx"
  40. ;;
  41. "EB-214A"*)
  42. status_led="power"
  43. sys_mtd_part="firmware"
  44. ;;
  45. *)
  46. ;;
  47. esac
  48. }
  49. adm5120_detect