summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest')
-rw-r--r--meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest b/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest
new file mode 100644
index 000000000..f1c833e6c
--- /dev/null
+++ b/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest
@@ -0,0 +1,21 @@
1#!/bin/sh
2#
3
4# prepare testing config
5CONF_USERS=`readlink -f /etc/raddb/users`
6mv ${CONF_USERS} ${CONF_USERS}_orig
7echo "testing Cleartext-Password := \"testpassword\"" > ${CONF_USERS}
8cat ${CONF_USERS}_orig >> ${CONF_USERS}
9
10# restart radiusd server
11systemctl restart radiusd || /etc/init.d/radiusd restart || {
12 echo "FAIL: Start radiusd service."
13 exit 1
14}
15
16# run teests
17perl test.pl
18
19# restore the config and restart
20mv ${CONF_USERS}_orig ${CONF_USERS}
21systemctl restart radiusd || /etc/init.d/radiusd restart