Commit 2f7eb5a9 authored by Linus Nordberg's avatar Linus Nordberg
Browse files

Use printf(1) instead of 'echo -e' in tools/ scripts.

Closes RADSECPROXY-40.
parent 9e391efe
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
- Stop the autoconfery from warning about defining variables - Stop the autoconfery from warning about defining variables
conditionally and unconditionally. conditionally and unconditionally.
- Honour configure option --sysconfdir. (RADSECPROXY-31) - Honour configure option --sysconfdir. (RADSECPROXY-31)
- Other bugs. (RADSECPROXY-26, -28, -34, -35, -39)
- Don't crash on failing DynamicLookupCommand scripts. Fix made - Don't crash on failing DynamicLookupCommand scripts. Fix made
with help from Ralf Paffrath. (RADSECPROXY-33) with help from Ralf Paffrath. (RADSECPROXY-33)
- When a DynamicLookupCommand script is failing, fall back to - When a DynamicLookupCommand script is failing, fall back to
other server(s) in the realm. The timeout depends on the kind of other server(s) in the realm. The timeout depends on the kind of
failure. failure.
- Other bugs. (RADSECPROXY-26, -28, -34, -35, -39, -40)
2011-10-08 1.5 2011-10-08 1.5
New features: New features:
......
...@@ -17,12 +17,13 @@ test -n "${1}" || usage ...@@ -17,12 +17,13 @@ test -n "${1}" || usage
REALM="${1}" REALM="${1}"
DIGCMD=$(command -v dig) DIGCMD=$(command -v dig)
HOSTCMD=$(command -v host) HOSTCMD=$(command -v host)
PRINTCMD=$(command -v printf)
dig_it_srv() { dig_it_srv() {
${DIGCMD} +short srv $SRV_HOST | sort -n -k1 | ${DIGCMD} +short srv $SRV_HOST | sort -n -k1 |
while read line; do while read line; do
set $line ; PORT=$3 ; HOST=$4 set $line ; PORT=$3 ; HOST=$4
echo -e "\thost ${HOST%.}:${PORT}" $PRINTCMD "\thost ${HOST%.}:${PORT}\n"
done done
} }
...@@ -41,7 +42,7 @@ host_it_srv() { ...@@ -41,7 +42,7 @@ host_it_srv() {
${HOSTCMD} -t srv $SRV_HOST | sort -n -k5 | ${HOSTCMD} -t srv $SRV_HOST | sort -n -k5 |
while read line; do while read line; do
set $line ; PORT=$7 ; HOST=$8 set $line ; PORT=$7 ; HOST=$8
echo -e "\thost ${HOST%.}:${PORT}" $PRINTCMD "\thost ${HOST%.}:${PORT}\n"
done done
} }
...@@ -66,7 +67,7 @@ else ...@@ -66,7 +67,7 @@ else
fi fi
if [ -n "${SERVERS}" ]; then 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 exit 0
fi fi
......
...@@ -17,12 +17,13 @@ test -n "${1}" || usage ...@@ -17,12 +17,13 @@ test -n "${1}" || usage
REALM="${1}" REALM="${1}"
DIGCMD=$(command -v digaaa) DIGCMD=$(command -v digaaa)
HOSTCMD=$(command -v host) HOSTCMD=$(command -v host)
PRINTCMD=$(command -v printf)
dig_it() { dig_it() {
${DIGCMD} +short srv _radsec._tcp.${REALM} | sort -n -k1 | ${DIGCMD} +short srv _radsec._tcp.${REALM} | sort -n -k1 |
while read line ; do while read line ; do
set $line ; PORT=$3 ; HOST=$4 set $line ; PORT=$3 ; HOST=$4
echo -e "\thost ${HOST%.}:${PORT}" $PRINTCMD "\thost ${HOST%.}:${PORT}\n"
done done
} }
...@@ -30,7 +31,7 @@ host_it() { ...@@ -30,7 +31,7 @@ host_it() {
${HOSTCMD} -t srv _radsec._tcp.${REALM} | sort -n -k5 | ${HOSTCMD} -t srv _radsec._tcp.${REALM} | sort -n -k5 |
while read line ; do while read line ; do
set $line ; PORT=$7 ; HOST=$8 set $line ; PORT=$7 ; HOST=$8
echo -e "\thost ${HOST%.}:${PORT}" $PRINTCMD "\thost ${HOST%.}:${PORT}\n"
done done
} }
...@@ -44,7 +45,7 @@ else ...@@ -44,7 +45,7 @@ else
fi fi
if test -n "${SERVERS}" ; then 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 exit 0
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment