diff options
author | Alexander Wilke <nachtfalkeaw@web.de> | 2012-06-20 22:09:58 +0300 |
---|---|---|
committer | Alexander Wilke <nachtfalkeaw@web.de> | 2012-06-20 22:09:58 +0300 |
commit | d71eeb920ffb266cc681578c757bd93ca64032d9 (patch) | |
tree | 227e3a97b564722ccb8bdd9ccaabaceed503d579 /config/freeradius2/freeradius_view_config.php | |
parent | 70b6007a67c57a35ddc37177ba17007e14a8dd6a (diff) | |
download | pfsense-packages-d71eeb920ffb266cc681578c757bd93ca64032d9.tar.gz pfsense-packages-d71eeb920ffb266cc681578c757bd93ca64032d9.tar.bz2 pfsense-packages-d71eeb920ffb266cc681578c757bd93ca64032d9.zip |
Update master
Diffstat (limited to 'config/freeradius2/freeradius_view_config.php')
-rw-r--r-- | config/freeradius2/freeradius_view_config.php | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/config/freeradius2/freeradius_view_config.php b/config/freeradius2/freeradius_view_config.php index 6bda5f3e..ee7ca4c1 100644 --- a/config/freeradius2/freeradius_view_config.php +++ b/config/freeradius2/freeradius_view_config.php @@ -31,19 +31,35 @@ */ 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 { + define('RADDB', '/usr/local/etc/raddb'); +} +// End of system check + + function get_file($file){ - $files['radiusd']="/usr/local/etc/raddb/radiusd.conf"; - $files['eap']="/usr/local/etc/raddb/eap.conf"; - $files['sql']="/usr/local/etc/raddb/sql.conf"; - $files['clients']="/usr/local/etc/raddb/clients.conf"; - $files['users']="/usr/local/etc/raddb/users"; - $files['macs']="/usr/local/etc/raddb/authorized_macs"; - $files['virtual-server-default']="/usr/local/etc/raddb/sites-enabled/default"; - $files['ca']="/usr/local/etc/raddb/certs/ca.cnf"; - $files['server']="/usr/local/etc/raddb/certs/server.cnf"; - $files['client']="/usr/local/etc/raddb/certs/client.cnf"; - $files['index']="/usr/local/etc/raddb/certs/index.txt"; - $files['ldap']="/usr/local/etc/raddb/modules/ldap"; + $files['radiusd']=RADDB . "/radiusd.conf"; + $files['eap']=RADDB . "/eap.conf"; + $files['sql']=RADDB . "/sql.conf"; + $files['clients']=RADDB . "/clients.conf"; + $files['users']=RADDB . "/users"; + $files['macs']=RADDB . "/authorized_macs"; + $files['virtual-server-default']=RADDB . "/sites-enabled/default"; + $files['ca']=RADDB . "/certs/ca.cnf"; + $files['server']=RADDB . "/certs/server.cnf"; + $files['client']=RADDB . "/certs/client.cnf"; + $files['index']=RADDB . "/certs/index.txt"; + $files['ldap']=RADDB . "/modules/ldap"; if ($files[$file]!="" && file_exists($files[$file])){ |