summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkolla <kolla>2009-02-13 17:40:44 +0000
committerkolla <kolla@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2009-02-13 17:40:44 +0000
commit0761678023bb36f9926bd06318df849b623137f8 (patch)
treee90d72f1daec5fdd96ff21d05979f1729b1c547f
parentccb73e4109f9c1d7318c1b5053ae0ff1cc9f2a99 (diff)
Sort by priority
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@472 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rwxr-xr-xradsec-dynsrv.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/radsec-dynsrv.sh b/radsec-dynsrv.sh
index 6260a8a..ef3b67a 100755
--- a/radsec-dynsrv.sh
+++ b/radsec-dynsrv.sh
@@ -13,11 +13,11 @@ usage() {
test -n "${1}" || usage
REALM="${1}"
-DIGCMD=$(command -v dig)
+DIGCMD=$(command -v digaaa)
HOSTCMD=$(command -v host)
dig_it() {
- ${DIGCMD} +short srv _radsec._tcp.${REALM} |
+ ${DIGCMD} +short srv _radsec._tcp.${REALM} | sort -k1 |
while read line ; do
set $line ; PORT=$3 ; HOST=$4
echo "\thost ${HOST%.}:${PORT}"
@@ -25,7 +25,7 @@ dig_it() {
}
host_it() {
- ${HOSTCMD} -t srv _radsec._tcp.${REALM} |
+ ${HOSTCMD} -t srv _radsec._tcp.${REALM} | sort -k5 |
while read line ; do
set $line ; PORT=$7 ; HOST=$8
echo "\thost ${HOST%.}:${PORT}"