1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hotspot_ynh.git synced 2024-09-03 19:25:53 +02:00

Revert "firmware_nonfree is now a boolean"

This reverts commit 898604a772.
This commit is contained in:
keoma 2019-02-10 01:13:04 +01:00
parent 898604a772
commit c5c3b33025
4 changed files with 8 additions and 6 deletions

View file

@ -5,7 +5,7 @@
path="/path" (PATH) path="/path" (PATH)
wifi_ssid="myNeutralNetwork" wifi_ssid="myNeutralNetwork"
wifi_passphrase="VhegT8oev0jZI" (PASSWORD) wifi_passphrase="VhegT8oev0jZI" (PASSWORD)
firmware_nonfree=0 firmware_nonfree="no"
; Checks ; Checks
pkg_linter=1 pkg_linter=1
setup_sub_dir=1 setup_sub_dir=1

View file

@ -65,11 +65,13 @@
{ {
"name": "firmware_nonfree", "name": "firmware_nonfree",
"type": "boolean", "type": "boolean",
"choice": ["yes", "no"],
"ask": { "ask": {
"en": "Install non-free firmwares - in addition to the free ones - for the wifi dongle", "en": "Install non-free firmwares - in addition to the free ones - for the wifi dongle (yes/no)",
"fr": "Installer des firmwares non-libres (en plus des libres) pour la clé USB wifi" "fr": "Installer des firmwares non-libres (en plus des libres) pour la clé USB wifi (yes/no)"
}, },
"default": "false" "example": "yes",
"default": "yes"
} }
] ]
} }

View file

@ -116,7 +116,7 @@ export DEBIAN_FRONTEND=noninteractive
# Packaged USB Wireless Device firmwares # Packaged USB Wireless Device firmwares
# Based on https://wiki.debian.org/WiFi#USB_Devices # Based on https://wiki.debian.org/WiFi#USB_Devices
if [[ $firmware_nonfree -eq 1 ]]; then if [[ $firmware_nonfree == yes ]]; then
# check if non-free is set on sources.list # check if non-free is set on sources.list
if ! grep -q non-free /etc/apt/sources.list ; then if ! grep -q non-free /etc/apt/sources.list ; then
sed '/debian/{s/main/& non-free/}' -i /etc/apt/sources.list sed '/debian/{s/main/& non-free/}' -i /etc/apt/sources.list

View file

@ -60,7 +60,7 @@ do
done done
# Remove packages # Remove packages
if [[ $firmware_nonfree -eq 1 ]]; then if [[ $firmware_nonfree == yes ]]; then
packages=$nonfree_packages packages=$nonfree_packages
else else
packages=$free_packages packages=$free_packages