updated 'radtest' for new 'radclient' command-line options
[freeradius.git] / src / main / radtest.in
index 997f802..8535296 100644 (file)
@@ -3,7 +3,7 @@
 # radtest      Emulate the user interface of the old
 #              radtest that used to be part of cistron-radius.
 #
-# Version:     @(#)radtest.sh  1.10  25-Jul-1999  miquels@cistron.nl
+# Version:     $Id$
 #
 
 prefix="@prefix@"
@@ -21,6 +21,14 @@ then
        radclient=./radclient
 fi
 
+if [ "$1" = "-d" ]
+then
+    DICTIONARY="-d $2"
+    shift;shift
+else
+    DICTIONARY=""
+fi
+
 if [ $# -lt 5 ] || [ $# -gt 7 ]
 then
        usage
@@ -42,5 +50,5 @@ fi
        then
                echo "Framed-Protocol = PPP"
        fi
-) | $radclient -dn $3 auth $5
+) | $radclient $DICTIONARY -xn $3 auth $5