From 5f507f54faec0c14a8e99024026c2e3653f0f8de Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 1 Mar 2024 14:58:31 +0100 Subject: [slx-network] Fix escaping in awk script --- modules.d/slx-network/scripts/udhcpc-trigger.stage3 | 4 ++-- 1 file 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; } }' } -- cgit v1.2.3-55-g7522