summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-02-10 10:25:32 -0500
committerjim-p <jimp@pfsense.org>2011-02-10 10:58:16 -0500
commit93c2c1e620aa71b9ffd29deb0aeeda3028bb413a (patch)
tree848a91eaa9a982a4f054119f14f42e2514b3331f /etc
parent0fc6be3f54db706ccc7cce8b19b12f88dec171fa (diff)
downloadpfsense-93c2c1e620aa71b9ffd29deb0aeeda3028bb413a.zip
pfsense-93c2c1e620aa71b9ffd29deb0aeeda3028bb413a.tar.gz
Generalize pppoe server enabled check and use it elsewhere in the GUI that needed fixed. Still needs changes in filter.inc - Ticket #1243
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 113de9a..b90246e 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1039,6 +1039,22 @@ function is_dhcp_server_enabled()
return $dhcpdenable;
}
+/* Any PPPoE servers enabled? */
+function is_pppoe_server_enabled() {
+ global $config;
+
+ $pppoeenable = false;
+
+ if (!is_array($config['pppoes']) || !is_array($config['pppoes']['pppoe']))
+ return false;
+
+ foreach ($config['pppoes']['pppoe'] as $pppoes)
+ if ($pppoes['mode'] == 'server')
+ $pppoeenable = true;
+
+ return $pppoeenable;
+}
+
function convert_seconds_to_hms($sec){
$min=$hrs=0;
if ($sec != 0){
OpenPOWER on IntegriCloud