From 615ee19f4d6d2d42b3d94198af8787419ed4ddad Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 27 Dec 2020 18:09:42 -0500 Subject: [PATCH] Improvements to wifi. --- arcroft/build-arcroft.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arcroft/build-arcroft.sh b/arcroft/build-arcroft.sh index 4ebd41f..f9b54cf 100755 --- a/arcroft/build-arcroft.sh +++ b/arcroft/build-arcroft.sh @@ -93,8 +93,7 @@ done # make sure variables are set, or use defaults. if [[ -n "${imageWifi}" ]]; then - export imageWifiESSID="$(grep 'ESSID=' "${imageWifi}" | cut -d = -f2)" - export imageWifiKey="$(grep 'Key=' "${imageWifi}" | cut -d = -f2)" + export imageWifi fi export imageVersion="${imageVersion:-4}" export imageSize="${imageSize:-8G}" @@ -147,7 +146,9 @@ mounted=0 wget "${url[$imageVersion]}" -O- | bsdtar -xpf - -C /mnt # Set up wifi if [[ -n "${imageWifi}" ]]; then - mkdir -v "/mnt/etc/netctl" + mkdir -p "/mnt/etc/netctl" + cp -v "${imageWifi}" "/mnt/etc/netctl/mycroft" + sed -i "s/Interface=.*/Interface=wlan0/" "${imageWifi}" "/mnt/etc/netctl/mycroft" fi # Create Mycroft service file cat << 'EOF' > /mnt/etc/systemd/system/mycroft.service