drtyhlpr / rpi23-gen-image

Advanced Debian "stretch" and "buster" bootstrap script for RPi 0/1/2/3 and QEMU
GNU General Public License v2.0
307 stars 123 forks source link

20-networking.sh #223

Open XIIIVI opened 4 years ago

XIIIVI commented 4 years ago

Hi all,

I think there is an issue in the bootstrap script 20-networking.sh.

Line 109, the WiFi is configured with NET_SSIDand NET_WPAPSKand should be replaced with NET_WIFI_SSID and NET_WIFI_PSK.

Moreover, the condition line 97 is wrong if [ -z "$NET_WIFI_SSID" ] && [ -z "$NET_WIFI_PSK" ] ; then must be replaced by if [ ! -z "$NET_WIFI_SSID" ] && [ ! -z "$NET_WIFI_PSK" ] ; then

The section

printf "
  ctrl_interface=/run/wpa_supplicant
  ctrl_interface_group=wheel
  update_config=1
  eapol_version=1
  ap_scan=1
  fast_reauth=1
  " > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

should be replaced either by printf " ctrl_interface=/run/wpa_supplicant ctrl_interface_group=wheel update_config=1 eapol_version=1 ap_scan=1 fast_reauth=1 " > ${ETC_DIR}/wpa_supplicant/wpa_supplicant-wlan0.conf

or by chroot_exec printf " ctrl_interface=/run/wpa_supplicant ctrl_interface_group=wheel update_config=1 eapol_version=1 ap_scan=1 fast_reauth=1 " > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

Best regards