Strip trailing period from hostname generated from weavedns domain.
We strip at the calling point rather than in the server, because DNS servers do see the domain as ending with a '.' representing the root.
This commit is contained in:
1 parent
dd9adf6a65
commit
79db00a90e
3 files changed
+5
-3
No files matched your search
@@ -660,7 +660,8 @@ dns_args() {
|
||||
DNS_ARGS="$DNS_ARG $DNS_SEARCH_ARG"
|
||||
if [ -n "$NAME_ARG" -a -z "$HOSTNAME_SPECIFIED" ] ; then
|
||||
DOMAIN=$(call_dns GET /domain 2>/dev/null) || DOMAIN=weave.local.
|
||||
DNS_ARGS="$DNS_ARGS --hostname=$NAME_ARG.$DOMAIN"
|
||||
# Strip trailing period off DNS domain to reduce surprise
|
||||
DNS_ARGS="$DNS_ARGS --hostname=$NAME_ARG.${DOMAIN%.}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user