home · contact · privacy
Fix. master
authorChristian Heller <c.heller@plomlompom.de>
Mon, 31 Mar 2025 09:25:21 +0000 (11:25 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 31 Mar 2025 09:25:21 +0000 (11:25 +0200)
testing/scripts/setup_desktop.sh

index 398de31f68613f21a9822eb16ac03ca66d8c61d1..57eeac6b9b15c7304136c7226ac811824f48d733 100755 (executable)
@@ -89,8 +89,12 @@ upgrade_from_older_release
 init_packages "${MAX_TAGS}"
 
 # NB: This needs to come before steps potentially overwriting /etc/network/interfaces.
 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"
 
 echo "\nSetting hostname and FQDN."
 echo "${SYSTEM_NAME}" > "${PATH_ETC}/hostname"