From 674fcc46e55d9920c72962e8fa1141a2a1a13b42 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 19 Feb 2005 01:37:20 +0000 Subject: Update Colins FreeRADIUS package --- packages/freeradius.xml | 6 ++-- packages/freeradiusclients.xml | 19 +++++------- packages/freeradiussettings.xml | 66 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 14 deletions(-) create mode 100644 packages/freeradiussettings.xml (limited to 'packages') diff --git a/packages/freeradius.xml b/packages/freeradius.xml index fd0e0be1..2dd31e10 100644 --- a/packages/freeradius.xml +++ b/packages/freeradius.xml @@ -20,10 +20,11 @@ Settings /pkg_edit.php?xml=freeradiussettings.xml - + http://www.pfsense.com/packages/config/freeradiusclients.xml http://www.pfsense.com/packages/config/freeradiussettings.xml + http://www.pfsense.com/packages/config/freeradiusconfig.tgz installedpackages->package->$packagename->configuration->settings @@ -85,4 +86,5 @@ sync_package(); - \ No newline at end of file + + diff --git a/packages/freeradiusclients.xml b/packages/freeradiusclients.xml index 89598ac1..de2bc2c5 100644 --- a/packages/freeradiusclients.xml +++ b/packages/freeradiusclients.xml @@ -1,26 +1,20 @@ freeradiusclients - - RADIUS Clients - Add, edit, and delete RADIUS clients. -
Services
- freeradiusclients.xml -
- - + + Users /pkg_edit.php?xml=freeradius.xml - + Clients /pkg_edit.php?xml=freeradiusclients.xml - + Settings /pkg_edit.php?xml=freeradiussettings.xml - + installedpackages->package->$packagename->configuration->settings @@ -79,4 +73,5 @@ sync_package(); -
\ No newline at end of file + + diff --git a/packages/freeradiussettings.xml b/packages/freeradiussettings.xml new file mode 100644 index 00000000..8776f5f3 --- /dev/null +++ b/packages/freeradiussettings.xml @@ -0,0 +1,66 @@ + + freeradiussettings + + + Users + /pkg_edit.php?xml=freeradius.xml + + + Clients + /pkg_edit.php?xml=freeradiusclients.xml + + + Settings + /pkg_edit.php?xml=freeradiussettings.xml + + + + installedpackages->package->$packagename->configuration->settings + + + Listening Interface(s) + interface + Enter the desired listening interface(s) here + input + + + Port + port + Enter the desired port here + input + + + + 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 = " . $port . "\n"); + } else { + fwrite($fout, "port = 0\n"); + } + fwrite($fout, "type = auth\n}"; + } + } + fclose($fout); + } + sync_package(); + + + sync_package(); + + + -- cgit v1.2.3