summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2012-04-16 21:29:03 +0200
committerLinus Nordberg <linus@nordu.net>2012-04-16 21:29:03 +0200
commit2f7eb5a947e5093f91ed5264d3b0a97859e53769 (patch)
treee92256f9a4b468873f2a711dbaba826efa8237ab
parent9e391efe8bf3adeb8af3ec43c7883e234a84999e (diff)
Use printf(1) instead of 'echo -e' in tools/ scripts.
Closes RADSECPROXY-40.
-rw-r--r--ChangeLog2
-rwxr-xr-xtools/naptr-eduroam.sh7
-rwxr-xr-xtools/radsec-dynsrv.sh7
3 files changed, 9 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 2e0f904..57cb95c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,12 +25,12 @@
- Stop the autoconfery from warning about defining variables
conditionally and unconditionally.
- Honour configure option --sysconfdir. (RADSECPROXY-31)
- - Other bugs. (RADSECPROXY-26, -28, -34, -35, -39)
- Don't crash on failing DynamicLookupCommand scripts. Fix made
with help from Ralf Paffrath. (RADSECPROXY-33)
- When a DynamicLookupCommand script is failing, fall back to
other server(s) in the realm. The timeout depends on the kind of
failure.
+ - Other bugs. (RADSECPROXY-26, -28, -34, -35, -39, -40)
2011-10-08 1.5
New features:
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
diff --git a/tools/radsec-dynsrv.sh b/tools/radsec-dynsrv.sh
index 3150018..2c87a33 100755
--- a/tools/radsec-dynsrv.sh
+++ b/tools/radsec-dynsrv.sh
@@ -17,12 +17,13 @@ test -n "${1}" || usage
REALM="${1}"
DIGCMD=$(command -v digaaa)
HOSTCMD=$(command -v host)
+PRINTCMD=$(command -v printf)
dig_it() {
${DIGCMD} +short srv _radsec._tcp.${REALM} | sort -n -k1 |
while read line ; do
set $line ; PORT=$3 ; HOST=$4
- echo -e "\thost ${HOST%.}:${PORT}"
+ $PRINTCMD "\thost ${HOST%.}:${PORT}\n"
done
}
@@ -30,7 +31,7 @@ host_it() {
${HOSTCMD} -t srv _radsec._tcp.${REALM} | sort -n -k5 |
while read line ; do
set $line ; PORT=$7 ; HOST=$8
- echo -e "\thost ${HOST%.}:${PORT}"
+ $PRINTCMD "\thost ${HOST%.}:${PORT}\n"
done
}
@@ -44,7 +45,7 @@ else
fi
if test -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