diff options
author | Jim P <jim@pingle.org> | 2011-12-20 12:27:32 -0800 |
---|---|---|
committer | Jim P <jim@pingle.org> | 2011-12-20 12:27:32 -0800 |
commit | 96759f9c99d33e2616f382850bbc45bf1b7a429b (patch) | |
tree | 60966bed0a9b5ab777e3901e4c3ce4345d018a92 /config | |
parent | ae6dd0edbd3d9e6ce2ec07aea54aeec73672d76a (diff) | |
parent | 99f90358909b9d89a183ba50ea7dbb98d2658ff4 (diff) | |
download | pfsense-packages-96759f9c99d33e2616f382850bbc45bf1b7a429b.tar.gz pfsense-packages-96759f9c99d33e2616f382850bbc45bf1b7a429b.tar.bz2 pfsense-packages-96759f9c99d33e2616f382850bbc45bf1b7a429b.zip |
Merge pull request #152 from Nachtfalkeaw/patch-1
only enable virtual-server "coa" if there is an interface-type "coa" whi...
Diffstat (limited to 'config')
-rw-r--r-- | config/freeradius2/freeradius.inc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc index 879077f4..ad113469 100644 --- a/config/freeradius2/freeradius.inc +++ b/config/freeradius2/freeradius.inc @@ -121,10 +121,10 @@ regular_expressions = $varsettingsregularexpressions extended_expressions = $varsettingsextendedexpressions EOD; -// This activates virtual-server coa. -// A better way would be if this link would only be created if there is an interface type "coa" -// and if deleted the link will be deleted, too -exec("ln -s /usr/local/etc/raddb/sites-available/coa /usr/local/etc/raddb/sites-enabled/"); + +// Deletes virtual-server coa by default. Will be re-enabled if there is an interface-type "coa" +exec("rm -f /usr/local/etc/raddb/sites-enabled/coa"); + $arrinterfaces = $config['installedpackages']['freeradiusinterfaces']['config']; if (is_array($arrinterfaces) && !empty($arrinterfaces)) { foreach ($arrinterfaces as $item) { @@ -149,6 +149,8 @@ EOD; // Begin "if" for interface-type = coa if ($item['varinterfacetype'] == 'coa') { + // Enables virtual-server coa because interface-type is coa + exec("ln -s /usr/local/etc/raddb/sites-available/coa /usr/local/etc/raddb/sites-enabled/"); $conf .= <<<EOD listen { type = $varinterfacetype @@ -158,7 +160,7 @@ listen { } EOD; - } // End "if" for interface-type = detail + } // End "if" for interface-type = coa // Begin "if" for interface-type = auth, acct, proxy, status if (($item['varinterfacetype'] == 'auth') || ($item['varinterfacetype'] == 'acct') || ($item['varinterfacetype'] == 'proxy') || ($item['varinterfacetype'] == 'status')) { @@ -257,7 +259,7 @@ global $config; $conf = ''; $users = $config['installedpackages']['freeradius']['config']; -if (is_array($users)) { +if (is_array($users) && !empty($users)) { foreach ($users as $user) { $username = $user['username']; $password = $user['password']; |