aboutsummaryrefslogtreecommitdiffstats
path: root/config/freeradius2/freeradius.inc
diff options
context:
space:
mode:
authorAlexander Wilke <nachtfalkeaw@web.de>2012-06-25 13:31:34 +0300
committerAlexander Wilke <nachtfalkeaw@web.de>2012-06-25 13:31:34 +0300
commit7d1253c1b585f71a72489f33b2ce152c143ae5e1 (patch)
tree96a8fc4ebc5146a73ab111ddb23f09e53a455f7a /config/freeradius2/freeradius.inc
parent5ef976c856683a2f8ab3bf26fec77ff48cb0097a (diff)
downloadpfsense-packages-7d1253c1b585f71a72489f33b2ce152c143ae5e1.tar.gz
pfsense-packages-7d1253c1b585f71a72489f33b2ce152c143ae5e1.tar.bz2
pfsense-packages-7d1253c1b585f71a72489f33b2ce152c143ae5e1.zip
freeradius2: fix for one-time-password on pfsense 2.1
If we need OTP we download bash from freebsd server. better not to put into .pbi - the goal should be to convert the otpverify.sh bash script into shell.
Diffstat (limited to 'config/freeradius2/freeradius.inc')
-rw-r--r--config/freeradius2/freeradius.inc18
1 files changed, 15 insertions, 3 deletions
diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc
index 6a33301c..0e31b8d1 100644
--- a/config/freeradius2/freeradius.inc
+++ b/config/freeradius2/freeradius.inc
@@ -3806,14 +3806,26 @@ function freeradius_motp_resync() {
exec("cd /var/db/pkg && pkg_delete `ls | grep bash`");
log_error('FreeRADIUS: Uninstalling package "bash-4.1.7" which comes with Mobile-One-Time-Password (motp).');
}
+ if (exec("cd /var/db/pkg && ls | grep bash") == "bash-4.2.20") {
+ exec("cd /var/db/pkg && pkg_delete `ls | grep bash`");
+ log_error('FreeRADIUS: Uninstalling package "bash-4.2.20" which comes with Mobile-One-Time-Password (motp).');
+ }
}
// check if enabled then we need to download "bash"
else {
- if (exec("cd /var/db/pkg && ls | grep bash") != "bash-4.1.7") {
- log_error('FreeRADIUS: Downloading and installing package "bash-4.1.7" to use Mobile-One-Time-Password (motp).');
- exec("pkg_add -r http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/`uname -m`/packages-8.1-release/All/bash-4.1.7.tbz");
+ if (substr(trim(file_get_contents("/etc/version")),0,3) == "2.0") {
+ if (exec("cd /var/db/pkg && ls | grep bash") != "bash-4.1.7") {
+ log_error('FreeRADIUS: Downloading and installing package "bash-4.1.7" to use Mobile-One-Time-Password (motp).');
+ exec("pkg_add -r http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/`uname -m`/packages-8.1-release/All/bash-4.1.7.tbz");
+ }
+ } else {
+ if (exec("cd /var/db/pkg && ls | grep bash") != "bash-4.2.20") {
+ log_error('FreeRADIUS: Downloading and installing package "bash-4.2.20" to use Mobile-One-Time-Password (motp).');
+ exec("pkg_add -r http://ftp-archive.freebsd.org/pub/FreeBSD/ports/`uname -m`/packages-8.3-release/All/bash-4.2.20.tbz");
+ }
}
+
$conf .= <<<EOD
#!/bin/bash