From 2fd4604aa42b4ffd8a4c5bae585e545ea63d3c90 Mon Sep 17 00:00:00 2001 From: Hajimu UMEMOTO Date: Tue, 7 Mar 2006 19:13:00 +0000 Subject: [PATCH] Remove trailing dot from the servername in the serverlist to be able to use portsnap from behind a http proxy. Some HTTP proxy don't like trailing dot in the servername. Approved by: cperciva MFC after: 2 days --- usr.sbin/portsnap/portsnap/portsnap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/portsnap/portsnap/portsnap.sh b/usr.sbin/portsnap/portsnap/portsnap.sh index 34a04904f86..75772f6f278 100644 --- a/usr.sbin/portsnap/portsnap/portsnap.sh +++ b/usr.sbin/portsnap/portsnap/portsnap.sh @@ -328,7 +328,7 @@ fetch_pick_server() { # Issue the SRV query and pull out the Priority, Weight, and Target fields. host -t srv "_http._tcp.${SERVERNAME}" | grep -E "^_http._tcp.${SERVERNAME} has SRV record" | - cut -f 5,6,8 -d ' ' > serverlist + cut -f 5,6,8 -d ' ' | sed -e 's/\.$//' > serverlist # If no records, give up -- we'll just use the server name we were given. if [ `wc -l < serverlist` -eq 0 ]; then -- 2.45.2