From e391e0a645dfa3871c0febf6efd4116cfb6c074e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 17 Oct 2021 21:24:17 +0200 Subject: [PATCH] Fix RPi install: unblock wlan interface --- scripts/install | 7 +++++++ scripts/restore | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/scripts/install b/scripts/install index 8c63ba1..da45edf 100644 --- a/scripts/install +++ b/scripts/install @@ -74,6 +74,13 @@ ynh_script_progression --message="Configuring firewall..." ynh_exec_warn_less yunohost firewall allow --no-upnp --ipv6 UDP 547 ynh_exec_warn_less yunohost firewall allow --no-upnp UDP 67 +# Meh idk where to put this ... On RPi, by default wlan is blocked +if test -e /usr/sbin/rfkill && rfkill | grep wlan | grep -q -w 'blocked' +then + ynh_print_info "Unblocking wlan interface..." + /usr/sbin/rfkill unblock wlan +fi + #================================================= # INSTALL NONFREE FIRWARE IF REQUESTED #================================================= diff --git a/scripts/restore b/scripts/restore index 5a454ab..fb047d1 100644 --- a/scripts/restore +++ b/scripts/restore @@ -35,6 +35,12 @@ service_name=$(ynh_app_setting_get --app=$app --key=service_name) #================================================= ynh_script_progression --message="Validating restoration parameters..." +# Meh idk where to put this ... On RPi, by default wlan is blocked +if test -e /usr/sbin/rfkill && rfkill | grep wlan | grep -q -w 'blocked' +then + ynh_print_info "Unblocking wlan interface..." + /usr/sbin/rfkill unblock wlan +fi #================================================= # STANDARD RESTORATION STEPS