What does 'radius -C' do? (2.1.3)

Alan DeKok aland at deployingradius.com
Mon Mar 9 19:24:40 CET 2009


Mike Diggins wrote:
> 
> Just as a quick example, I added this line to radius.conf:
> 
> $INCLUDE dsdfsdf/    # bogus line
> 
> radiusd -C doesn't complain:
> 
> [root at rad01 raddb]# /usr/local/freeradius/sbin/radiusd -C
> [root at rad01 raddb]#

  Err..  try "echo $?" after that.  It doesn't print out log messages to
stdout unless you also do "-X".

> But:
> 
> Radius -XC does:
> 
> including files in directory /usr/local/freeradius/etc/raddb/dsdfsdf/
> /usr/local/freeradius/etc/raddb/radiusd.conf[96]: Error reading
> directory /usr/local/freeradius/etc/raddb/dsdfsdf/: No such file or
> directory
> Errors reading /usr/local/freeradius/etc/raddb/radiusd.conf
> [root at prad01 raddb]#
> 
> Basically I just wanted to do a quick syntax check to ensure radius will
> start, in case I mangle something in the config.

 radiusd -C
 if [ "$?" eq "0" ]; then
    echo OK
 else
    echo FAILED something
 fi

  Alan DeKok.




More information about the Freeradius-Users mailing list