aboutsummaryrefslogtreecommitdiffstats
path: root/config/freeradius2
diff options
context:
space:
mode:
authorAlexander Wilke <nachtfalkeaw@web.de>2012-06-24 21:07:07 +0300
committerAlexander Wilke <nachtfalkeaw@web.de>2012-06-24 21:07:07 +0300
commitf2d3fcde45029c4bc10748147ce6f92a99887e62 (patch)
tree366743fa9071851bbc272b3e5196d69f83e26bea /config/freeradius2
parent7bb83f2998d098e1e90c0d828fdadbce91818e76 (diff)
downloadpfsense-packages-f2d3fcde45029c4bc10748147ce6f92a99887e62.tar.gz
pfsense-packages-f2d3fcde45029c4bc10748147ce6f92a99887e62.tar.bz2
pfsense-packages-f2d3fcde45029c4bc10748147ce6f92a99887e62.zip
some better code
Diffstat (limited to 'config/freeradius2')
-rw-r--r--config/freeradius2/freeradius_view_config.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/config/freeradius2/freeradius_view_config.php b/config/freeradius2/freeradius_view_config.php
index ee7ca4c1..e584a4ba 100644
--- a/config/freeradius2/freeradius_view_config.php
+++ b/config/freeradius2/freeradius_view_config.php
@@ -33,15 +33,9 @@
require("guiconfig.inc");
// Check to find out on which system the package is running
-if (exec("uname -r | cut -c 1-3") == '8.3') {
- if (exec("uname -m") == "i386") {
- define('RADDB', '/usr/pbi/freeradius-i386/etc/raddb');
- }
- else {
- define('RADDB', '/usr/pbi/freeradius-amd64/etc/raddb');
- }
-}
-else {
+if (substr(trim(file_get_contents("/etc/version")),0,3) == "2.1") {
+ define('RADDB', '/usr/pbi/freeradius-' . php_uname("m") . '/etc/raddb');
+} else {
define('RADDB', '/usr/local/etc/raddb');
}
// End of system check