meta-openembedded/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest
Jackie Huang ab68fcadbf libauthen-radius-perl: add new recipe
The Authen::Radius module provides a simple class that
allows you to send/receive Radius requests/responses
to/from a Radius server.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-04-27 11:14:58 +02:00

22 lines
529 B
Bash

#!/bin/sh
#
# prepare testing config
CONF_USERS=`readlink -f /etc/raddb/users`
mv ${CONF_USERS} ${CONF_USERS}_orig
echo "testing Cleartext-Password := \"testpassword\"" > ${CONF_USERS}
cat ${CONF_USERS}_orig >> ${CONF_USERS}
# restart radiusd server
systemctl restart radiusd || /etc/init.d/radiusd restart || {
echo "FAIL: Start radiusd service."
exit 1
}
# run teests
perl test.pl
# restore the config and restart
mv ${CONF_USERS}_orig ${CONF_USERS}
systemctl restart radiusd || /etc/init.d/radiusd restart