summaryrefslogtreecommitdiff
path: root/tools/naptr-eduroam.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/naptr-eduroam.sh')
-rwxr-xr-xtools/naptr-eduroam.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/naptr-eduroam.sh b/tools/naptr-eduroam.sh
index 6497549..0e37afb 100755
--- a/tools/naptr-eduroam.sh
+++ b/tools/naptr-eduroam.sh
@@ -17,12 +17,13 @@ test -n "${1}" || usage
REALM="${1}"
DIGCMD=$(command -v dig)
HOSTCMD=$(command -v host)
+PRINTCMD=$(command -v printf)
dig_it_srv() {
${DIGCMD} +short srv $SRV_HOST | sort -n -k1 |
while read line; do
set $line ; PORT=$3 ; HOST=$4
- echo -e "\thost ${HOST%.}:${PORT}"
+ $PRINTCMD "\thost ${HOST%.}:${PORT}\n"
done
}
@@ -41,7 +42,7 @@ host_it_srv() {
${HOSTCMD} -t srv $SRV_HOST | sort -n -k5 |
while read line; do
set $line ; PORT=$7 ; HOST=$8
- echo -e "\thost ${HOST%.}:${PORT}"
+ $PRINTCMD "\thost ${HOST%.}:${PORT}\n"
done
}
@@ -66,7 +67,7 @@ else
fi
if [ -n "${SERVERS}" ]; then
- echo -e "server dynamic_radsec.${REALM} {\n${SERVERS}\n\ttype TLS\n}"
+ $PRINTCMD "server dynamic_radsec.${REALM} {\n${SERVERS}\n\ttype TLS\n}\n"
exit 0
fi