diff options
author | Jackie Huang <jackie.huang@windriver.com> | 2017-04-26 16:22:05 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-04-27 11:14:58 +0200 |
commit | ab68fcadbfa51e6cdd5edd950c4252da2d16de53 (patch) | |
tree | 7436e1467b64a7538c9de32afbea510d318b6018 /meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest | |
parent | 8bdaca3f6688d138d7359190824dbff305a3fc9f (diff) | |
download | meta-openembedded-ab68fcadbfa51e6cdd5edd950c4252da2d16de53.tar.gz |
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>
Diffstat (limited to 'meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest')
-rw-r--r-- | meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest | 21 |
1 files changed, 21 insertions, 0 deletions
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 000000000..f1c833e6c --- /dev/null +++ b/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest | |||
@@ -0,0 +1,21 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | |||
4 | # prepare testing config | ||
5 | CONF_USERS=`readlink -f /etc/raddb/users` | ||
6 | mv ${CONF_USERS} ${CONF_USERS}_orig | ||
7 | echo "testing Cleartext-Password := \"testpassword\"" > ${CONF_USERS} | ||
8 | cat ${CONF_USERS}_orig >> ${CONF_USERS} | ||
9 | |||
10 | # restart radiusd server | ||
11 | systemctl restart radiusd || /etc/init.d/radiusd restart || { | ||
12 | echo "FAIL: Start radiusd service." | ||
13 | exit 1 | ||
14 | } | ||
15 | |||
16 | # run teests | ||
17 | perl test.pl | ||
18 | |||
19 | # restore the config and restart | ||
20 | mv ${CONF_USERS}_orig ${CONF_USERS} | ||
21 | systemctl restart radiusd || /etc/init.d/radiusd restart | ||