Remove trailing dot from FQDN

As it is described in #2140, the trailing dot might appear
when starting a container via "weave run".
This commit is contained in:
Martynas Pumputis committed 2016-04-11 11:17:36 +01:00
1 parent 28e0b14220
commit a4062bd15c
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -1150,7 +1150,7 @@ etc_hosts_contents() {
shift
NAME=${FQDN%%.*}
HOSTNAMES="$NAME"
[ "$NAME" = "$FQDN" -o "$NAME." = "$FQDN" ] || HOSTNAMES="$FQDN $HOSTNAMES"
[ "$NAME" = "$FQDN" -o "$NAME." = "$FQDN" ] || HOSTNAMES="${FQDN%.} $HOSTNAMES"
echo "# created by Weave - BEGIN"
echo "# container hostname"