summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-10-29 03:07:11 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-10-29 03:07:11 +0000
commite3a13b00682d61838628570e6d634654bf7f34fd (patch)
treed9892a7a62d625a6451d6cb7438a29c6839432e2 /etc
parentbc8472b77ae3acaf52fcd37e86959cad4676425d (diff)
downloadpfsense-e3a13b00682d61838628570e6d634654bf7f34fd.zip
pfsense-e3a13b00682d61838628570e6d634654bf7f34fd.tar.gz
Add services_dhcp_server_enable which allows the DHCP server to be turned
off easily.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/globals.inc3
-rw-r--r--etc/inc/services.inc6
-rwxr-xr-xetc/rc.initial.setlanip5
3 files changed, 10 insertions, 4 deletions
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc
index 92dce05..2380b7f 100644
--- a/etc/inc/globals.inc
+++ b/etc/inc/globals.inc
@@ -73,6 +73,7 @@ $g = array(
"captiveportal_element_sizelimit" => 262144,
"xmlrpcpath" => "/pfSense/xmlrpc.php",
"embeddedbootupslice" => "/dev/ad0a",
+ "services_dhcp_server_enable" => true,
"update_url" => "http://updates.pfSense.com/_updaters",
"update_manifest" => "http://updates.pfSense.com/manifest",
"wireless_regex" => "/^(ndis|wi|ath|an|ral|ural|wai|iwi|awi|wlan|rum)/",
@@ -86,4 +87,4 @@ $iptos = array("lowdelay", "throughput", "reliability");
/* TCP flags */
$tcpflags = array("syn", "ack", "fin", "rst", "psh", "urg");
-?>
+?> \ No newline at end of file
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 559cdce..7bc11cb 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -42,6 +42,10 @@ function load_balancer_use_sticky() {
function services_dhcpd_configure() {
global $config, $g;
+
+ if($g['services_dhcp_server_enable'] == false)
+ return;
+
if(isset($config['system']['developerspew'])) {
$mt = microtime();
echo "services_dhcpd_configure($if) being called $mt\n";
@@ -1253,4 +1257,4 @@ function upnp_start() {
}
}
-?>
+?> \ No newline at end of file
diff --git a/etc/rc.initial.setlanip b/etc/rc.initial.setlanip
index 3d81e7c..bd536dd 100755
--- a/etc/rc.initial.setlanip
+++ b/etc/rc.initial.setlanip
@@ -136,7 +136,8 @@
$config['interfaces'][$interface]['ipaddr'] = $intip;
$config['interfaces'][$interface]['subnet'] = $intbits;
- $yn = prompt_for_enable_dhcp_server();
+ if($g['services_dhcp_server_enable'])
+ $yn = prompt_for_enable_dhcp_server();
// TODO: Add DHCP IPv6 support
if ($yn == "y") {
@@ -237,4 +238,4 @@
fgets($fp);
fclose($fp);
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud