radclient: problem with exit code 0 and 1
oz
oz at bluemonk.de
Wed Mar 18 16:43:32 CET 2009
Hello,
for monitoring our radius-servers, I use radclient for a long time in a script.
After migration to another platform, radclient seems to work else, than before.
If a monitored radiusd is down or the Auth of my monitoring-user fails,
radclient gets an expected answer, but exits with status 0 in these cases. As
far as I remember, in the past it was exit 1 (--> echo $?=1). I used to process
exit 1 to indicate a problem with my radius-servers. Has this behaviour changed
somewhere in the past? Or is it the wanted behaviour, that every valid answer
to radclient exits with status 0 now?
Take this for example:
# /usr/bin/radclient -f /home/me/radpacket -x 192.168.x.x:1812 auth secret123
Sending Access-Request of id 248 to 192.168.x.x port 1812
User-Name = "test-user"
Password = "XXXXXXX"
NAS-IP-Address = 255.255.255.255
NAS-Port = 10
radclient: no response from server for ID 248
# echo $?
0
... I expected $? to be 1, because the server was down and did not respond,
what indicates an error.
I am running radclient from freeradius 1.1.3-3, Debian/etch amd64:
# radclient -v
radclient: $Id: radclient.c,v 1.72.2.1.2.5 2006/05/16 18:26:08 aland Exp $
built on Dec 17 2006 at 01:07:36
Any ideas?
thnx
More information about the Freeradius-Users
mailing list