From ab68fcadbfa51e6cdd5edd950c4252da2d16de53 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Wed, 26 Apr 2017 16:22:05 +0800 Subject: 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 Signed-off-by: Martin Jansa --- .../libauthen/libauthen-radius-perl/run-ptest | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest (limited to 'meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest') diff --git a/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest b/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest new file mode 100644 index 0000000000..f1c833e6ca --- /dev/null +++ b/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest @@ -0,0 +1,21 @@ +#!/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 -- cgit v1.2.3-54-g00ecf