summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmodules.d/slx-network/scripts/udhcpc-trigger.stage34
1 files changed, 2 insertions, 2 deletions
diff --git a/modules.d/slx-network/scripts/udhcpc-trigger.stage3 b/modules.d/slx-network/scripts/udhcpc-trigger.stage3
index fa771868..a9eadea3 100755
--- a/modules.d/slx-network/scripts/udhcpc-trigger.stage3
+++ b/modules.d/slx-network/scripts/udhcpc-trigger.stage3
@@ -71,9 +71,9 @@ reverse_lookup() {
[ -z "$dns" ] && return
[ -z "$1" ] && return
timeout 3 nslookup "$1" | awk '{
- if ($2 == "name") { print gensub("\.$", "", "", $4); exit; }
+ if ($2 == "name") { print gensub("\\.$", "", 1, $4); exit; }
if ($1 == "Name:") { ok = 1 }
- if (ok && $1 == "Address") { print gensub("\.$", "", "", $4); exit; }
+ if (ok && $1 == "Address") { print gensub("\\.$", "", 1, $4); exit; }
}'
}