diff --git a/scripts/install b/scripts/install index 3724d6b..8ba64d6 100644 --- a/scripts/install +++ b/scripts/install @@ -80,6 +80,12 @@ if [ "${firmware_nonfree}" == yes ]; then packages="$packages firmware-atheros atmel-firmware firmware-linux-free firmware-linux-nonfree firmware-realtek firmware-ralink firmware-libertas zd1211-firmware" else packages="$packages firmware-linux-free" + + # Extract from http://packages.trisquel.info/toutatis-updates/open-ath9k-htc-firmware + # https://www.fsf.org/news/ryf-certification-thinkpenguin-usb-with-atheros-chip + # https://wiki.debian.org/ath9k_htc/open_firmware + sudo install -b -o root -g root -m 0644 ../conf/firmware_htc-7010.fw /lib/firmware/htc_7010.fw + sudo install -b -o root -g root -m 0644 ../conf/firmware_htc-9271.fw /lib/firmware/htc_9271.fw fi sudo apt-get --assume-yes --force-yes install ${packages} @@ -89,12 +95,6 @@ if [ $? -ne 0 ]; then sudo apt-get --assume-yes --force-yes install ${packages} fi -# Copy (free) firmwares -# Extract from http://packages.trisquel.info/toutatis-updates/open-ath9k-htc-firmware -# https://www.fsf.org/news/ryf-certification-thinkpenguin-usb-with-atheros-chip -sudo install -b -o root -g root -m 0644 ../conf/firmware_htc-7010.fw /lib/firmware/htc-7010.fw -sudo install -b -o root -g root -m 0644 ../conf/firmware_htc-9271.fw /lib/firmware/htc-9271.fw - # Compute extra arguments if [ -z "${ip6_net}" ]; then ip6_net=none diff --git a/scripts/remove b/scripts/remove index fa90214..baac59b 100644 --- a/scripts/remove +++ b/scripts/remove @@ -36,9 +36,11 @@ sudo rm -f /etc/hostapd/hostapd.conf{.tpl?,} sudo rm -f /etc/nginx/conf.d/${domain}.d/wifiadmin.conf sudo rm -f /etc/php5/fpm/pool.d/wifiadmin.conf -# Remove firmwares -sudo rm -f /lib/firmware/htc-7010.fw -sudo rm -f /lib/firmware/htc-9271.fw +# Remove free firmwares +if ! dpkg -l firmware-atheros &> /dev/null; then + sudo rm -f /lib/firmware/htc_7010.fw + sudo rm -f /lib/firmware/htc_9271.fw +fi # Restart services sudo systemctl restart php5-fpm