summaryrefslogtreecommitdiffstats
path: root/boot/asdc_install.sh
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2017-06-07 11:06:41 -0400
committerMarco Platania <platania@research.att.com>2017-06-07 11:06:41 -0400
commit998b2ca49c0e7650888d26e7823b7e74262fc6d3 (patch)
tree85dbaf0b30c3349d4cde4090c4feda44be8d57d6 /boot/asdc_install.sh
parent2c49993be9e4d32c3963b4244396c4e6197c3970 (diff)
Add local DNS config to docker engine
Change-Id: I40d2528fc77e201c669e709765465dd1ff91f731 Signed-off-by: Marco Platania <platania@research.att.com>
Diffstat (limited to 'boot/asdc_install.sh')
-rw-r--r--boot/asdc_install.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/boot/asdc_install.sh b/boot/asdc_install.sh
index 24544f27..c97818f4 100644
--- a/boot/asdc_install.sh
+++ b/boot/asdc_install.sh
@@ -87,12 +87,16 @@ mount /dev/$DISK"1" /data
echo "/dev/"$DISK"1 /data ext4 errors=remount-ro,noatime,barrier=0 0 1" >> /etc/fstab
# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
+DNS_FLAG=""
+if [ -s /opt/config/dns_ip_addr.txt ]
+then
+ DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
+fi
if [ -s /opt/config/external_dns.txt ]
then
- echo "DOCKER_OPTS=\"--dns $(cat /opt/config/external_dns.txt) --mtu=$MTU\"" >> /etc/default/docker
-else
- echo "DOCKER_OPTS=\"--mtu=$MTU\"" >> /etc/default/docker
+ DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
fi
+echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
cp /lib/systemd/system/docker.service /etc/systemd/system
sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service