aboutsummaryrefslogtreecommitdiffstats
path: root/packages/freeradiussettings.xml
diff options
context:
space:
mode:
authorFernando Lemos <fernandotcl@pfsense.org>2006-06-02 13:41:17 +0000
committerFernando Lemos <fernandotcl@pfsense.org>2006-06-02 13:41:17 +0000
commitc868bc5be8c9f7cc8b7ca91bbd36990a931d9875 (patch)
tree5bd31ed5427b8547222e5cfe496239c49a0aecac /packages/freeradiussettings.xml
parent341ff9436ee8b6eb2c89365d3b05a00408eb0eb3 (diff)
downloadpfsense-packages-c868bc5be8c9f7cc8b7ca91bbd36990a931d9875.tar.gz
pfsense-packages-c868bc5be8c9f7cc8b7ca91bbd36990a931d9875.tar.bz2
pfsense-packages-c868bc5be8c9f7cc8b7ca91bbd36990a931d9875.zip
A working version of the FreeRADIUS package (this one writes the configuration to the right files ;)).
Diffstat (limited to 'packages/freeradiussettings.xml')
-rw-r--r--packages/freeradiussettings.xml46
1 files changed, 13 insertions, 33 deletions
diff --git a/packages/freeradiussettings.xml b/packages/freeradiussettings.xml
index 7db3402d..91c1cd63 100644
--- a/packages/freeradiussettings.xml
+++ b/packages/freeradiussettings.xml
@@ -1,6 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
<packagegui>
<name>freeradiussettings</name>
<title>FreeRADIUS: Settings</title>
+ <include_file>freeradius.inc</include_file>
<aftersaveredirect>pkg_edit.php?xml=freeradiussettings.xml&amp;id=0</aftersaveredirect>
<tabs>
<tab>
@@ -17,47 +19,25 @@
<active/>
</tab>
</tabs>
- <configpath>installedpackages->package->$packagename->configuration->settings</configpath>
<fields>
<field>
- <fielddescr>Listening Interface(s)</fielddescr>
<fieldname>interface</fieldname>
- <description>Enter the desired listening interface here</description>
+ <fielddescr>Listening Interface(s)</fielddescr>
+ <description>Enter the desired listening interface here.</description>
<type>interfaces_selection</type>
+ <required/>
</field>
<field>
- <fielddescr>Port</fielddescr>
<fieldname>port</fieldname>
- <description>Enter the desired port here (default 1812)</description>
+ <fielddescr>Port</fielddescr>
+ <description>Enter the port the RADIUS server will listen on. Leave blank to default to the system default, i.e., 1892.</description>
<type>input</type>
</field>
</fields>
- <custom_php_command_before_form>
- function sync_package_freeradius_settings() {
- conf_mount_rw();
- config_lock();
- global $config;
- $fout = fopen("/usr/local/etc/raddb/radiusd.conf.dynamic","w");
- fwrite($fout, "# This file was automatically generated by the pfSense\n# package management system.\n\n");
- $int = convert_friendly_interface_to_real_interface_name($config['installedpackages']['freeradiussettings']['config']['0']['interface']);
- $int_ip = find_interface_ip($int);
- $port = $config['installedpackages']['freeradiussettings']['config'][0]['port'];
- fwrite($fout, "{\nipaddr = " . $int_ip);
- if($port != "") {
- fwrite($fout, "port = " . $port . "\n");
- } else {
- fwrite($fout, "port = 0\n");
- }
- fwrite($fout, "type = auth\n}\n\n");
- fwrite($fout, "{\nipaddr = 127.0.0.1\nport = 0\ntype = auth\n}\n\n");
- fclose($fout);
- conf_mount_ro();
- config_unlock();
- restart_service("freeradius");
- }
- </custom_php_command_before_form>
- <custom_add_php_command>
- sync_package_freeradius_settings();
- </custom_add_php_command>
+ <custom_delete_php_command>
+ freeradius_settings_resync();
+ </custom_delete_php_command>
+ <custom_php_resync_config_command>
+ freeradius_settings_resync();
+ </custom_php_resync_config_command>
</packagegui>
-