Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not remove upstream DNS configuraton in cleanup #1280

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions host_cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ if systemctl is-active --quiet NetworkManager; then
else
sudo systemctl restart NetworkManager
fi
mv /etc/resolv.conf.dev-scripts.backup /etc/resolv.conf

# There was a bug in this file, it may need to be recreated.
# delete the interface as it can cause issues when not rebooting
Expand Down
3 changes: 3 additions & 0 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,9 @@ function write_pull_secret() {
}

function switch_to_internal_dns() {
# Create backup of the current resolv.conf in case user is using a manual configuration. This
# file will be used in host_cleanup to revert the initial DNS configuration of the host.
cp /etc/resolv.conf /etc/resolv.conf.dev-scripts.backup
sudo mkdir -p /etc/NetworkManager/conf.d/
ansible localhost -b -m ini_file -a "path=/etc/NetworkManager/conf.d/dnsmasq.conf section=main option=dns value=dnsmasq"
if [ "$ADDN_DNS" ] ; then
Expand Down