summaryrefslogtreecommitdiffstats
path: root/boot/aai2_install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'boot/aai2_install.sh')
-rw-r--r--boot/aai2_install.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/boot/aai2_install.sh b/boot/aai2_install.sh
index 2dccc36e..3553798d 100644
--- a/boot/aai2_install.sh
+++ b/boot/aai2_install.sh
@@ -71,12 +71,16 @@ curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose
chmod +x /opt/docker/docker-compose
# 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