init_packages "${MAX_TAGS}"
# NB: This needs to come before steps potentially overwriting /etc/network/interfaces.
-echo "\nChecking for existing wifi config in ${PATH_NETWORK_INTERFACES}."
-adopt_wifi_connection
+if [ "$(nmcli -f TYPE conn | grep 'wifi' | wc -l)" = "0" ]; then
+ echo "\nChecking for existing wifi config in ${PATH_NETWORK_INTERFACES}."
+ adopt_wifi_connection
+else
+ echo "\nAlready know wifi connection, nothing to add."
+fi
echo "\nSetting hostname and FQDN."
echo "${SYSTEM_NAME}" > "${PATH_ETC}/hostname"