Use system resolv.conf file when available
Where possible use the system configured resolv.conf file to to support resolution of internal servers such as proxies. Use previous hardcoded google dns nameserver as fallback Change-Id: Ibc1e8a3b96e733a2f7fbcdd4b2c5d3e8926424c4
This commit is contained in:
parent
5682d59ca6
commit
e5cda1f731
1 changed files with 7 additions and 1 deletions
|
@ -86,7 +86,13 @@ function create_base () {
|
|||
# Recreate resolv.conf
|
||||
sudo touch $TMP_MOUNT_PATH/etc/resolv.conf
|
||||
sudo chmod 777 $TMP_MOUNT_PATH/etc/resolv.conf
|
||||
echo nameserver 8.8.8.8 > $TMP_MOUNT_PATH/etc/resolv.conf
|
||||
# use system configured resolv.conf if available to support internal proxy resolving
|
||||
if [ -e /etc/resolv.conf ]
|
||||
then
|
||||
cat /etc/resolv.conf > $TMP_MOUNT_PATH/etc/resolv.conf
|
||||
else
|
||||
echo nameserver 8.8.8.8 > $TMP_MOUNT_PATH/etc/resolv.conf
|
||||
fi
|
||||
|
||||
# supporting kernel file systems
|
||||
sudo mount -t proc none $TMP_MOUNT_PATH/proc
|
||||
|
|
Loading…
Reference in a new issue