Updated the wifi copying code.

This commit is contained in:
Storm Dragon 2020-12-27 12:43:27 -05:00
parent 4c3ffdd2e6
commit bd9f77b122
1 changed files with 5 additions and 3 deletions

View File

@ -144,6 +144,11 @@ mount "${loopdev}p1" /mnt/boot
# Things are mounted now, so set mounted to 0 (bash true)
mounted=0
wget "${url[$imageVersion]}" -O- | bsdtar -xpf - -C /mnt
# Set up wifi
if [[ -n "${imageWifi}" ]]; then
mkdir -v "/mnt/etc/netctl"
cp -v "${imageWifi}" "/mnt/etc/netctl"
fi
# Create Mycroft service file
cat << 'EOF' > /mnt/etc/systemd/system/mycroft.service
[Unit]
@ -223,9 +228,6 @@ EOF
# Copy override files into place.
cp -rv ../files/etc/* /mnt/etc
if [[ -n "${imageWifi}" ]]; then
cp -v "${imageWifi}" "/mnt/etc/"
fi
# Exiting calls the cleanup function to unmount.
exit 0