NoPaste

remove-wl

von retabell
SNIPPET_DESC:
switch from wl to b43/b44
SNIPPET_CREATION_TIME:
28.01.2022 05:37:30
SNIPPET_PRUNE_TIME:
Unendlich

SNIPPET_TEXT:
  1. #!/bin/sh
  2.  
  3. # install broadcom firmware and remove non-free broadcom driver
  4.  
  5. if [ "$(id -u)" != 0 ]; then
  6.     echo "Error: You must be root to run this script!"
  7.     exit 1
  8. fi
  9.  
  10. # Check if online
  11.  
  12. if ! ping -c1 debian.org >/dev/null 2>&1; then
  13.    echo "No internet connection found"
  14.    exit 2
  15. fi
  16.  
  17. echo
  18. echo "This will remove non-free broadcom wl driver"
  19. echo "and additionally install non redistributable"
  20. echo "broadcom firmware for b43/b44 driver."
  21. echo "wl backup is stored in /root"
  22. echo
  23. echo -n "Do you want to continue? (y/n)? "
  24. read answer
  25.  
  26. if [ "$answer" != "${answer#[YyJj]}" ] ;then
  27.  
  28. apt update
  29.  
  30.  
  31. #install non-redistributable broadcom-firmware
  32. apt-get update
  33. cd /root
  34. # download broadcom-sta-dkms and place in /root
  35. apt-get download broadcom-sta-dkms
  36. cd -
  37. LC_ALL=C apt-get install --reinstall --yes firmware-b43-installer firmware-b43legacy-installer
  38. apt-get purge --yes broadcom-sta-dkms broadcom-sta-source
  39.  
  40. # this works without reboot for BCM4312
  41. # it takes some time before the wlan becomes ready
  42. rmmod wl
  43.  
  44. modprobe ssb
  45. modprobe b43
  46.  
  47. # otherwise reboot
  48. echo "it takes some seconds before the wlan becomes ready, otherwise reboot your system now"
  49. echo ""
  50. echo "broadcom wl driver backup package is stored in /root ..."
  51. else
  52. echo "bye.."
  53. fi

Quellcode

Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. PASTEBIN_DOWNLOAD_SNIPPET_EXPLAIN