From 706f9ee35266c1188d1d5030f3fc7a39673c4830 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 6 Jul 2015 17:22:42 +0100 Subject: [PATCH 1/2] detect `--dns-search ` ...and not just `--dns-search=` Fixes #1086. --- weave | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weave b/weave index 9574975d..9b3efb21 100755 --- a/weave +++ b/weave @@ -664,7 +664,7 @@ dns_args() { WITHOUT_DNS= while [ $# -gt 0 ] ; do case "$1" in - --dns-search=*) + --dns-search|--dns-search=*) DNS_SEARCH_SPECIFIED=1 ;; --name) From 02715f88d5515fed5e017a926096af71ab3e55b8 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 6 Jul 2015 17:26:04 +0100 Subject: [PATCH 2/2] cosmetic: re-order option parsing to match the order in which we susequently process them. --- weave | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/weave b/weave index 9b3efb21..67d69d9f 100755 --- a/weave +++ b/weave @@ -664,8 +664,11 @@ dns_args() { WITHOUT_DNS= while [ $# -gt 0 ] ; do case "$1" in - --dns-search|--dns-search=*) - DNS_SEARCH_SPECIFIED=1 + --with-dns) + WITH_DNS=1 + ;; + --without-dns) + WITHOUT_DNS=1 ;; --name) NAME_ARG="$2" @@ -677,11 +680,8 @@ dns_args() { -h|--hostname|--hostname=*) HOSTNAME_SPECIFIED=1 ;; - --with-dns) - WITH_DNS=1 - ;; - --without-dns) - WITHOUT_DNS=1 + --dns-search|--dns-search=*) + DNS_SEARCH_SPECIFIED=1 ;; esac shift