Improvements to wifi.
This commit is contained in:
parent
c25f27e879
commit
615ee19f4d
@ -93,8 +93,7 @@ done
|
|||||||
|
|
||||||
# make sure variables are set, or use defaults.
|
# make sure variables are set, or use defaults.
|
||||||
if [[ -n "${imageWifi}" ]]; then
|
if [[ -n "${imageWifi}" ]]; then
|
||||||
export imageWifiESSID="$(grep 'ESSID=' "${imageWifi}" | cut -d = -f2)"
|
export imageWifi
|
||||||
export imageWifiKey="$(grep 'Key=' "${imageWifi}" | cut -d = -f2)"
|
|
||||||
fi
|
fi
|
||||||
export imageVersion="${imageVersion:-4}"
|
export imageVersion="${imageVersion:-4}"
|
||||||
export imageSize="${imageSize:-8G}"
|
export imageSize="${imageSize:-8G}"
|
||||||
@ -147,7 +146,9 @@ mounted=0
|
|||||||
wget "${url[$imageVersion]}" -O- | bsdtar -xpf - -C /mnt
|
wget "${url[$imageVersion]}" -O- | bsdtar -xpf - -C /mnt
|
||||||
# Set up wifi
|
# Set up wifi
|
||||||
if [[ -n "${imageWifi}" ]]; then
|
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
|
fi
|
||||||
# Create Mycroft service file
|
# Create Mycroft service file
|
||||||
cat << 'EOF' > /mnt/etc/systemd/system/mycroft.service
|
cat << 'EOF' > /mnt/etc/systemd/system/mycroft.service
|
||||||
|
Loading…
Reference in New Issue
Block a user