From edffb6e0b4b5801d4d04dd05404951943a23a1e9 Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Nov 20 2011 11:09:13 +0000 Subject: Minor improvements to freeradius scripts --- diff --git a/tests/p_freeradius/radiusd_test.sh b/tests/p_freeradius/radiusd_test.sh index d3be6a3..f524317 100755 --- a/tests/p_freeradius/radiusd_test.sh +++ b/tests/p_freeradius/radiusd_test.sh @@ -24,12 +24,12 @@ service radiusd restart if (t_GetPkgRel basesystem | grep -q el6) then t_Log "Running C6-Test" - WORKING=$(radtest -d /etc/raddb -x steve centos 127.0.0.1:1812 1 testing123 |grep -c 'Access-Accept') - if [ $WORKING == 1 ]; then ret_val=0 ; fi + radtest -d /etc/raddb -x steve centos 127.0.0.1:1812 1 testing123 |grep -qc 'Access-Accept' + ret_val=$? else t_Log "Running C5-Test" - WORKING=$(radtest steve centos 127.0.0.1:1812 1 testing123 |grep -c 'Access-Accept') - if [ $WORKING == 1 ]; then ret_val=0 ; fi + radtest steve centos 127.0.0.1:1812 1 testing123 |grep -qc 'Access-Accept' + ret_val=$? fi # Restore settings @@ -37,15 +37,4 @@ fi rm -rf /etc/raddb/users.orig service radiusd restart -#if (t_GetPkgRel basesystem | grep -q el5) -# then -# -# sed -i 's/#\ INCLUDE\ eap\.conf/\ \ INCLUDE eap.conf/g' /etc/raddb/radiusd.conf -# ln -s /etc/raddb/sites-available/control-socket /etc/raddb/sites-enabled/ -# ln -s /etc/raddb/sites-available/inner-tunnel /etc/raddb/sites-enabled/ -# /bin/cp -a /etc/raddb/sites-available/default.orig /etc/raddb/sites-available/default -# rm -rf /etc/raddb/sites-available/default.orig -# service radiusd stop -#fi - t_CheckExitStatus $ret_val