Fix DNS migration to handle UseDNS=no in network files (#1314)

* Fix DNS migration to handle UseDNS=no in network files

Issue #1246: Migration 1755109182.sh only fixes resolved.conf but doesn't
remove UseDNS=no from network files. When UseDNS=no persists, it blocks
DHCP DNS and forces fallback to Cloudflare after reboot.

Fix: Remove UseDNS=no from all network files, matching omarchy-setup-dns DHCP behavior.

* Add new migration 1756491748.sh for existing users

Fixes DNS issue for users who already ran migration 1755109182.sh.
Removes UseDNS=no from network files to enable DHCP DNS.

* Apply requested changes

- Revert 1755109182.sh to original state
- Consolidate all fixes in new migration 1756491748.sh
- Follow migration style guidelines
This commit is contained in:
Jarek
2025-08-30 09:41:14 +02:00
committed by GitHub
parent effae1e7f2
commit 59c70fdd46
2 changed files with 7 additions and 2 deletions

View File

@@ -28,5 +28,4 @@ if [ -f /etc/systemd/resolved.conf ]; then
echo "DNS configuration reset to use DHCP (router DNS)"
echo "To use Cloudflare DNS, run: omarchy-setup-dns Cloudflare"
fi
fi

6
migrations/1756491748.sh Executable file
View File

@@ -0,0 +1,6 @@
echo "Removing UseDNS=no from network files to fix DNS issue"
for file in /etc/systemd/network/*.network; do
[[ -f "$file" ]] || continue
sudo sed -i '/^UseDNS=no/d' "$file"
done