You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
592 B
17 lines
592 B
4 years ago
|
#!/bin/bash -eux
|
||
|
|
||
|
if [[ "$PACKER_BUILDER_TYPE" == virtualbox* ]]; then
|
||
|
|
||
|
## https://access.redhat.com/site/solutions/58625 (subscription required)
|
||
|
# add 'single-request-reopen' so it is included when /etc/resolv.conf is generated
|
||
|
cat >> /etc/NetworkManager/dispatcher.d/fix-slow-dns <<EOF
|
||
|
#!/bin/bash
|
||
|
echo "options single-request-reopen" >> /etc/resolv.conf
|
||
|
EOF
|
||
|
chmod +x /etc/NetworkManager/dispatcher.d/fix-slow-dns
|
||
|
systemctl restart NetworkManager.service
|
||
|
echo 'Slow DNS fix applied (single-request-reopen)'
|
||
|
else
|
||
|
echo 'Slow DNS fix not required for this platform, skipping'
|
||
|
fi
|