diff --git a/backend/src/net/wifi.rs b/backend/src/net/wifi.rs index a179f116a..65f3bfb73 100644 --- a/backend/src/net/wifi.rs +++ b/backend/src/net/wifi.rs @@ -801,7 +801,6 @@ pub async fn synchronize_wpa_supplicant_conf>( .arg("up") .invoke(ErrorKind::Wifi) .await?; - Command::new("dhclient").invoke(ErrorKind::Wifi).await?; if let Some(last_country_code) = last_country_code { tracing::info!("Setting the region"); let _ = Command::new("iw") diff --git a/build/initialization.sh b/build/initialization.sh index 0fdfc87b0..8f304a36e 100755 --- a/build/initialization.sh +++ b/build/initialization.sh @@ -56,9 +56,16 @@ apt update && apt install -y tor deb.torproject.org-keyring curl -fsSL https://get.docker.com | sh # TODO: commit this script into git instead of live fetching it -apt-get purge openresolv dhcpcd5 -y +# enable embassyd dns server +systemctl enable systemd-resolved +sed -i '/\(^\|#\)DNS=/c\DNS=127.0.0.1' /etc/systemd/resolved.conf +systemctl start systemd-resolved + +apt-get remove --purge openresolv dhcpcd5 -y systemctl disable wpa_supplicant.service +ln -rsf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf + systemctl disable bluetooth.service systemctl disable triggerhappy.service @@ -95,17 +102,12 @@ EOF cat << EOF > /etc/NetworkManager/NetworkManager.conf [main] plugins=ifupdown,keyfile -dns=none -rc-manager=unmanaged +dns=systemd-resolved [ifupdown] managed=false EOF -# enable embassyd dns server -systemctl enable systemd-resolved -sed -i '/\(^\|#\)DNS=/c\DNS=127.0.0.1' /etc/systemd/resolved.conf -sed -i '/prepend domain-name-servers/c\prepend domain-name-servers 127.0.0.53;' /etc/dhcp/dhclient.conf if [ -f /embassy-os/product_key.txt ] then