aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest
diff options
context:
space:
mode:
authorDerek Straka <derek@asterius.io>2017-09-29 14:53:20 -0400
committerJoe MacDonald <joe_macdonald@mentor.com>2017-10-11 16:22:49 -0400
commitbd4dc896642f3074bf7ed260f6cf765733d721a7 (patch)
tree41944e0348e3effbbc2678113a6aba56a5be103e /meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest
parent68443bd22e48782a94db7ce6c3d6cd40f42c9c5a (diff)
downloadmeta-openembedded-contrib-bd4dc896642f3074bf7ed260f6cf765733d721a7.tar.gz
libauthen-radius-perl: move recipe to meta-networking
Recipe depends on radius which is located in meta-networking Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
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 0000000000..f1c833e6ca
--- /dev/null
+++ b/meta-networking/recipes-devtools/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