aboutsummaryrefslogtreecommitdiffstats
path: root/packages/freeradiussettings.xml
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-02-19 07:37:17 +0000
committerColin Smith <colin@pfsense.org>2005-02-19 07:37:17 +0000
commit81a38ab9c202bf6506c87ccfb57f59cc62922dcd (patch)
treef98a397740ec655a00c4c4e5edfdaf7d81030e94 /packages/freeradiussettings.xml
parent68129e3547063d95db5a817f92b0bf00179f22e5 (diff)
downloadpfsense-packages-81a38ab9c202bf6506c87ccfb57f59cc62922dcd.tar.gz
pfsense-packages-81a38ab9c202bf6506c87ccfb57f59cc62922dcd.tar.bz2
pfsense-packages-81a38ab9c202bf6506c87ccfb57f59cc62922dcd.zip
Update FreeRADIUS settings page.
Diffstat (limited to 'packages/freeradiussettings.xml')
-rw-r--r--packages/freeradiussettings.xml48
1 files changed, 17 insertions, 31 deletions
diff --git a/packages/freeradiussettings.xml b/packages/freeradiussettings.xml
index 3bf3dfcd..a5a7b369 100644
--- a/packages/freeradiussettings.xml
+++ b/packages/freeradiussettings.xml
@@ -22,7 +22,7 @@
<field>
<fielddescr>Listening Interface(s)</fielddescr>
<fieldname>interface</fieldname>
- <description>Enter the desired listening interface(s) here</description>
+ <description>Enter the desired listening interface here</description>
<type>interfaces_selection</type>
</field>
<field>
@@ -33,36 +33,22 @@
</field>
</fields>
<custom_php_command_before_form>
- function sync_package() {
- global $config;
- $fout = fopen("/usr/local/etc/raddb/radiusd.conf.dynamic","w");
- if($config['installedpackages']['freeradiusclients']['config'] != "") {
- /* Comment out port entries to use listen directives instead.
- if($config['installedpackages']['freeradiussettings']['config']['port'] != "") {
- fwrite($fout, "port = " . $port . "\n\n");
- } else {
- fwrite($fout, "port = 0\n\n");
- }
- */
- if($config['installedpackages']['freeradiussettings']['config']['interface'] != "") {
- $split_int = split(" ", $config['installedpackages']['freeradiussettings']['config']['interface']);
- foreach($split_int as $int) {
- $int_ip = find_interface_ip($int);
- fwrite($fout, "{\nipaddr = " . $int_ip . "\n");
- if($config['installedpackages']['freeradiussettings']['config']['port'] != "") {
- fwrite($fout, "port = " . $config['installedpackages']['freeradiussettings']['config']['port'] . "\n");
- } else {
- fwrite($fout, "port = 0\n");
- }
- fwrite($fout, "type = auth\n}");
- }
- }
- }
- fclose($fout);
- mwexec("killall radiusd");
- mwexec("/usr/local/etc/rc.d/radiusd");
- }
- sync_package();
+ function sync_package() {
+ global $config;
+ $fout = fopen("/usr/local/etc/raddb/radiusd.conf.dynamic","w");
+ $int_ip = find_interface_ip($config['installedpackages']['freeradiussettings']['config']['interface']);
+ fwrite($fout, "{\nipaddr = " . $int_ip);
+ if($config['installedpackages']['freeradiussettings']['config']['port'] != "") {
+ fwrite($fout, "port = " . $port . "\n");
+ } else {
+ fwrite($fout, "port = 0\n");
+ }
+ fwrite($fout, "type = auth\n}\n\n") ;
+ fclose($fout);
+ }
+ mwexec("killall radiusd");
+ mwexec("/usr/local/etc/rc.d/radiusd");
+ sync_package();
</custom_php_command_before_form>
<custom_add_php_command>
sync_package();