aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-12-08 20:13:59 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-12-08 20:13:59 +0000
commit95455f337699145de603c35e64a0a4e5a143a9f7 (patch)
tree6384eb4e6fb01506dc016e05b6c359abdf11bbe1
parent6561653c61de53113171cb5a94ec503701bd4844 (diff)
downloadpfsense-packages-95455f337699145de603c35e64a0a4e5a143a9f7.tar.gz
pfsense-packages-95455f337699145de603c35e64a0a4e5a143a9f7.tar.bz2
pfsense-packages-95455f337699145de603c35e64a0a4e5a143a9f7.zip
Write out advanced TinyDNS options to rc.d svscan.sh file
-rw-r--r--packages/tinydns/tinydns.inc35
1 files changed, 29 insertions, 6 deletions
diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc
index e0cf91c9..3dfefa28 100644
--- a/packages/tinydns/tinydns.inc
+++ b/packages/tinydns/tinydns.inc
@@ -38,6 +38,29 @@ function tinydns_custom_php_install_command() {
return;
}
+ $ip = $config['installedpackages']['tinydns']['config'][0]['ipaddress'];
+
+ $minsegment = "10240";
+ $maxfilesize = "10240";
+ $maxsegment = "20480";
+ $maxfd = "100";
+ $maxchild = "40";
+
+ if($config['installedpackages']['tinydns']['config'][0]['minsegment'])
+ $minsegment = $config['installedpackages']['tinydns']['config'][0]['minsegment'];
+
+ if($config['installedpackages']['tinydns']['config'][0]['maxfilesize'])
+ $maxfilesize = $config['installedpackages']['tinydns']['config'][0]['maxfilesize'];
+
+ if($config['installedpackages']['tinydns']['config'][0]['maxsegment'])
+ $maxsegment = $config['installedpackages']['tinydns']['config'][0]['maxsegment'];
+
+ if($config['installedpackages']['tinydns']['config'][0]['maxfd'])
+ $maxfd = $config['installedpackages']['tinydns']['config'][0]['maxfd'];
+
+ if($config['installedpackages']['tinydns']['config'][0]['maxchild'])
+ $maxchild = $config['installedpackages']['tinydns']['config'][0]['maxchild'];
+
$svscan = <<<EOD
#!/bin/sh
@@ -52,12 +75,12 @@ MAXFD=100
MAXCHILD=40
# ulimits
-ulimit -d \${MINSEGMENT}
-ulimit -f \${MAXFILESIZE}
-ulimit -m \${MAXSEGMENT}
-ulimit -n \${MAXFD}
-ulimit -s \${MINSEGMENT}
-ulimit -u \${MAXCHILD}
+ulimit -d \${{$minsegment}}
+ulimit -f \${{$maxfilesize}}
+ulimit -m \${{$maxsegment}}
+ulimit -n \${{$$maxfd}}
+ulimit -s \${{$minsegment}}
+ulimit -u \${{$maxchild}}
. /etc/rc.subr