From ae8bc12d1ad5f4325a63e0efdbe902d6ab31b901 Mon Sep 17 00:00:00 2001 From: Anthony Young Date: Mon, 17 Oct 2011 10:38:05 -0700 Subject: [PATCH] automatically use the nameserver of the launching host if not specified --- tools/build_lxc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build_lxc.sh b/tools/build_lxc.sh index 0f1737806c..580581b83a 100755 --- a/tools/build_lxc.sh +++ b/tools/build_lxc.sh @@ -32,7 +32,7 @@ CONTAINER_IP=${CONTAINER_IP:-192.168.1.50} CONTAINER_CIDR=${CONTAINER_CIDR:-$CONTAINER_IP/24} CONTAINER_NETMASK=${CONTAINER_NETMASK:-255.255.255.0} CONTAINER_GATEWAY=${CONTAINER_GATEWAY:-192.168.1.1} -NAMESERVER=${NAMESERVER:-$CONTAINER_GATEWAY} +NAMESERVER=${NAMESERVER:-`cat /etc/resolv.conf | grep nameserver | head -1 | cut -d " " -f2`} COPYENV=${COPYENV:-1} DEST=${DEST:-/opt/stack} WAIT_TILL_LAUNCH=${WAIT_TILL_LAUNCH:-1}