aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-04-29 11:21:06 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-04-29 11:21:06 -0300
commite311eae6fde43d7d258327914861f4097a11ba6b (patch)
treebd4f7db6bde797fb17106bb538a8a33d14712f53 /config
parentaaa47df7de41a57d8be69d61e1964d3b55f74b11 (diff)
downloadpfsense-packages-e311eae6fde43d7d258327914861f4097a11ba6b.tar.gz
pfsense-packages-e311eae6fde43d7d258327914861f4097a11ba6b.tar.bz2
pfsense-packages-e311eae6fde43d7d258327914861f4097a11ba6b.zip
Fix more freeradius macro definitions to work on 2.3+, also check if dir exist before try to run chown. Bump version to 1.6.12
Diffstat (limited to 'config')
-rw-r--r--config/freeradius2/freeradius.inc16
-rw-r--r--config/freeradius2/freeradius.xml2
2 files changed, 10 insertions, 8 deletions
diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc
index a094853a..76da6213 100644
--- a/config/freeradius2/freeradius.inc
+++ b/config/freeradius2/freeradius.inc
@@ -54,12 +54,12 @@ else
define('FREERADIUS_BASE', '/usr/local');
$bash_path = FREERADIUS_BASE . "/bin/bash";
-if ($pfs_version == "2.1") {
- define('FREERADIUS_LIB', FREERADIUS_BASE . '/lib');
- define('FREERADIUS_ETC', FREERADIUS_BASE . '/etc');
-} else {
+if ($pfs_version == "2.2") {
define('FREERADIUS_LIB', FREERADIUS_BASE . '/local/lib');
define('FREERADIUS_ETC', FREERADIUS_BASE . '/local/etc');
+} else {
+ define('FREERADIUS_LIB', FREERADIUS_BASE . '/lib');
+ define('FREERADIUS_ETC', FREERADIUS_BASE . '/etc');
}
// Check freeradius lib version
@@ -68,11 +68,11 @@ if ($pfs_version == "2.1") {
$libfiles = scandir(FREERADIUS_LIB);
foreach ($libfiles as $libfile){
if (preg_match("/freeradius-/",$libfile))
- $frlib=FREERADIUS_BASE . "/lib/{$libfile}";
+ $frlib=FREERADIUS_LIB . '/' . $libfile;
}
}
if ($frlib == ""){
- log_error("freeRADIUS - No freeradius lib found on ".FREERADIUS_BASE."/lib");
+ log_error("freeRADIUS - No freeradius lib found on ".FREERADIUS_LIB);
}
function freeradius_deinstall_command() {
@@ -95,7 +95,9 @@ function freeradius_install_command() {
@symlink(FREERADIUS_ETC . "/raddb", "/usr/local/etc/raddb");
if (!file_exists("/var/log/radutmp")) { exec("touch /var/log/radutmp"); }
if (!file_exists("/var/log/radwtmp")) { exec("touch /var/log/radwtmp"); }
- exec("chown -R root:wheel " . FREERADIUS_ETC . "/raddb && chown -R root:wheel {$frlib} && chown -R root:wheel /var/log/radacct");
+ exec("chown -R root:wheel " . FREERADIUS_ETC . "/raddb /var/log/radacct");
+ if (file_exists($frlib))
+ exec("chown -R root:wheel {$frlib}");
// creating a backup file of the original policy.conf no matter if user checked this or not
if (!file_exists(FREERADIUS_ETC . "/raddb/policy.conf.backup")) {
diff --git a/config/freeradius2/freeradius.xml b/config/freeradius2/freeradius.xml
index 8cef9430..16a4875c 100644
--- a/config/freeradius2/freeradius.xml
+++ b/config/freeradius2/freeradius.xml
@@ -45,7 +45,7 @@
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>freeradius</name>
- <version>2.2.0</version>
+ <version>1.6.12</version>
<title>FreeRADIUS: Users</title>
<include_file>/usr/local/pkg/freeradius.inc</include_file>
<menu>