The custom dnsmasq conf files should be placed under the follow dir: /etc/compass-ci/dnsmasq.d/
Signed-off-by: Yu Chuan 13186087857@163.com --- container/dnsmasq/start | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/container/dnsmasq/start b/container/dnsmasq/start index 3cad801ec81c..7230c9cf6188 100755 --- a/container/dnsmasq/start +++ b/container/dnsmasq/start @@ -8,6 +8,12 @@ docker_rm dnsmasq
kill $(ps -ef| grep dnsmasq| grep libvirt| awk '{print $2}') 2> /dev/null
+WORKSPACE=$(dirname "$(realpath "$0")") + +# load custom dnsmasq.conf +[ -d "/etc/compass-ci/dnsmasq.d/" ] && + cp -a /etc/compass-ci/dnsmasq.d/* ${WORKSPACE}/dnsmasq.d/ + cmd=( docker run --restart=always @@ -15,7 +21,7 @@ cmd=( --net=host --publish 67:67/udp --publish 69:69/udp - -v $PWD/dnsmasq.d:/etc/dnsmasq.d + -v ${WORKSPACE}/dnsmasq.d:/etc/dnsmasq.d -v /etc/localtime:/etc/localtime:ro -v /tftpboot:/tftpboot:ro --detach