diff options
author | Linus Nordberg <linus@nordu.net> | 2012-04-12 17:09:05 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2012-04-12 17:09:05 +0200 |
commit | 7758dd38282d58dff85422e7e5e165d360f6531b (patch) | |
tree | 645373a4ca6ab22bf59667ecf53e6e938a56cf76 /tools/radsec-dynsrv.sh | |
parent | dbcc997716f5bec3316c74371eb8077884d6672d (diff) |
Make dynamic-resolve scripts in tools/ sort numerically.
Spotted by Paul Dekkers. Closes RADSECPROXY-39.
Diffstat (limited to 'tools/radsec-dynsrv.sh')
-rwxr-xr-x | tools/radsec-dynsrv.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/radsec-dynsrv.sh b/tools/radsec-dynsrv.sh index 7a74b6d..c3c5c61 100755 --- a/tools/radsec-dynsrv.sh +++ b/tools/radsec-dynsrv.sh @@ -19,7 +19,7 @@ DIGCMD=$(command -v digaaa) HOSTCMD=$(command -v host) dig_it() { - ${DIGCMD} +short srv _radsec._tcp.${REALM} | sort -k1 | + ${DIGCMD} +short srv _radsec._tcp.${REALM} | sort -n -k1 | while read line ; do set $line ; PORT=$3 ; HOST=$4 echo -e "\thost ${HOST%.}:${PORT}" @@ -27,7 +27,7 @@ dig_it() { } host_it() { - ${HOSTCMD} -t srv _radsec._tcp.${REALM} | sort -k5 | + ${HOSTCMD} -t srv _radsec._tcp.${REALM} | sort -n -k5 | while read line ; do set $line ; PORT=$7 ; HOST=$8 echo -e "\thost ${HOST%.}:${PORT}" |