From aa9fd9e6133d25918b483d956b04f260d8794b4c Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 18 Dec 2005 21:25:35 +0000 Subject: override some global configuration parms if they exist instead of hard coding these checks into the codebase --- etc/inc/config.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'etc') diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 2a5e6e0..8ff12ba 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -207,6 +207,20 @@ function parse_config($parse = false) { alias_make_table($config); config_unlock(); + + /* override some global configuration parms if they exist + * instead of hard coding these checks into the codebase + */ + if($config['pptp']['n_pptp_units']) + $g['n_pptp_units'] = $config['pptp']['n_pptp_units']; + if($config['pptp']['pptp_subnet']) + $g['pptp_subnet'] = $config['pptp']['pptp_subnet']; + + if($config['pppoe']['n_pppoe_units']) + $g['n_pppoe_units'] = $config['pppoe']['n_pppoe_units']; + if($config['pppoe']['pppoe_subnet']) + $g['pppoe_subnet'] = $config['pppoe']['pppoe_subnet']; + return $config; } -- cgit v1.1