From 3f20eb42b4c86d9a9f9af72123c584c4b167e764 Mon Sep 17 00:00:00 2001 From: Kayou Date: Tue, 19 Mar 2019 21:33:16 +0100 Subject: [PATCH] Restore firmware_nonfree to a choice --- check_process | 2 +- manifest.json | 5 +++-- scripts/install | 10 ++++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/check_process b/check_process index 27e6a68..6e1fdb2 100644 --- a/check_process +++ b/check_process @@ -4,7 +4,7 @@ path="/path" (PATH) wifi_ssid="myNeutralNetwork" wifi_passphrase="VhegT8oev0jZI" (PASSWORD) - firmware_nonfree=0 + firmware_nonfree="no" ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/manifest.json b/manifest.json index 0dba5c1..7eb76f3 100644 --- a/manifest.json +++ b/manifest.json @@ -64,12 +64,13 @@ }, { "name": "firmware_nonfree", - "type": "boolean", + "type": "string", "ask": { "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 (yes/no)" }, - "default": true + "choice": [ "yes", "no" ], + "default": "no" } ] } diff --git a/scripts/install b/scripts/install index 6c96340..65b634a 100644 --- a/scripts/install +++ b/scripts/install @@ -68,13 +68,15 @@ ynh_webpath_register $app $domain $path_url # because armbian-firmware conflicts with the non-free packages ... if dpkg --list | grep -q armbian-firmware; then echo "You are running Armbian and non-free firmware are known to conflict with armbian-firwmare. " >&2 - firmware_nonfree="no" + firmware_nonfree=0 echo "Variable firmware_non_free has been forced to 'no'" >&2 fi -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= +if [ $firmware_nonfree = "no" ]; then + firmware_nonfree=0 +elif [ $firmware_nonfree = "yes" ]; then + firmware_nonfree=1 +fi # Check arguments if [[ -z $wifi_ssid || -z $wifi_passphrase ]]; then