aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-04-28 10:07:23 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-04-28 10:07:23 -0300
commite936ec53eeea5c41c4b53459c8f5954f84cd2bad (patch)
tree2cd24bae9d699f1fee0a60457d12fb51a77fd21e /config
parent275df19a521e54c8afb273de8bad76e361307923 (diff)
downloadpfsense-packages-e936ec53eeea5c41c4b53459c8f5954f84cd2bad.tar.gz
pfsense-packages-e936ec53eeea5c41c4b53459c8f5954f84cd2bad.tar.bz2
pfsense-packages-e936ec53eeea5c41c4b53459c8f5954f84cd2bad.zip
Fix pbi detection on freeradius2
Diffstat (limited to 'config')
-rw-r--r--config/freeradius2/freeradius.inc5
-rw-r--r--config/freeradius2/freeradius_view_config.php7
2 files changed, 9 insertions, 3 deletions
diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc
index 00076816..a094853a 100644
--- a/config/freeradius2/freeradius.inc
+++ b/config/freeradius2/freeradius.inc
@@ -48,7 +48,10 @@ require_once("services.inc");
// Check pfSense version
$pfs_version = substr(trim(file_get_contents("/etc/version")),0,3);
-define('FREERADIUS_BASE', '/usr/pbi/freeradius-' . php_uname("m"));
+if ($pfs_version == "2.1" || $pfs_version == "2.2")
+ define('FREERADIUS_BASE', '/usr/pbi/freeradius-' . php_uname("m"));
+else
+ define('FREERADIUS_BASE', '/usr/local');
$bash_path = FREERADIUS_BASE . "/bin/bash";
if ($pfs_version == "2.1") {
diff --git a/config/freeradius2/freeradius_view_config.php b/config/freeradius2/freeradius_view_config.php
index b2959783..0095b009 100644
--- a/config/freeradius2/freeradius_view_config.php
+++ b/config/freeradius2/freeradius_view_config.php
@@ -33,10 +33,13 @@
require("guiconfig.inc");
// Check to find out on which system the package is running
-if (substr(trim(file_get_contents("/etc/version")),0,3) == "2.1") {
+$pfs_version = substr(trim(file_get_contents("/etc/version")),0,3);
+if ($pfs_version == "2.1") {
define('RADDB', '/usr/pbi/freeradius-' . php_uname("m") . '/etc/raddb');
-} else {
+} else if ($pfs_version == "2.1") {
define('RADDB', '/usr/pbi/freeradius-' . php_uname("m") . '/local/etc/raddb');
+} else {
+ define('RADDB', '/usr/local/etc/raddb');
}
// End of system check