You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fw-detect 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/bin/bash
  2. #
  3. # Script to check if firmware or other non-free drivers are required.
  4. #
  5. # Copyright (C) 2007-2008 Kel Modderman <kel@otaku42.de>
  6. # Copyright (C) 2008-2015, Stefan Lippers-Hollmann <s.l-h@gmx.de>
  7. # Copyright (C) 2008, Horst Tritremmel <peter_weber69@gmx.at>
  8. # Copyright (C) 2008-2009, Joaquim Boura <x-un-i@sapo.pt>
  9. # Copyright (C) 2009 Niall Walsh <niallwalsh@users.berlios.de>
  10. # major modifications to disconnect data from scripts
  11. #
  12. # This program is free software; you can redistribute it and/or
  13. # modify it under the terms of the GNU General Public License
  14. # as published by the Free Software Foundation; version 2 of the
  15. # License.
  16. #
  17. # This program is distributed in the hope that it will be useful,
  18. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. # GNU General Public License for more details.
  21. function selfhelp () {
  22. echo "Usage:
  23. $0 (-y|-i module) (-a) (-h) (-s) (-v) (-x)
  24. -y try to install needed firmwares
  25. -i module install firmware for given module
  26. -a show information on all known modules
  27. -h show this help message
  28. -s enable short output mode
  29. -v increase verbosity (repeat for more)
  30. -x prints executed commands and their arguments for debugging
  31. "
  32. }
  33. . /usr/share/siduction-scripts/fw
  34. #
  35. # check for get_dvb_firmware script
  36. #
  37. [[ -x $(which get_dvb_firmware) ]] && DVB=1 || DVB=0
  38. while getopts ahisvxy opt; do
  39. case "${opt}" in
  40. a)
  41. show_all_cards
  42. ;;
  43. h)
  44. selfhelp
  45. exit
  46. ;;
  47. i)
  48. install_driver $2
  49. ;;
  50. s)
  51. short="TRUE"
  52. ;;
  53. v)
  54. ((verbosity++))
  55. ;;
  56. x)
  57. set -x
  58. ;;
  59. y)
  60. #installable driver
  61. short="TRUE"
  62. install_possible="TRUE"
  63. ;;
  64. *)
  65. selfhelp
  66. exit
  67. esac
  68. done
  69. sys_detect