[packages/oracle-xe] configure sysctl with a file. update min/max from Oracle XE 11.2.0 release

glen glen at pld-linux.org
Tue Apr 15 10:53:10 CEST 2014


commit 42c69f123feeb3ed7abaa31a6fc2ffb7095af782
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Apr 15 11:51:45 2014 +0300

    configure sysctl with a file. update min/max from Oracle XE 11.2.0 release

 oracle-xe.init | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/oracle-xe.init b/oracle-xe.init
index c6a29e9..b621f0c 100755
--- a/oracle-xe.init
+++ b/oracle-xe.init
@@ -40,6 +40,9 @@ else
 fi
 
 confkernel() {
+	local conffile=/etc/sysctl.d/10-oracle-xe.conf
+
+	test -e $conffile || return
 	eval $(awk '
 	function min(a, b) {return ((a < b)?a:b)}
 	function max(a, b) {return ((a > b)?a:b)}
@@ -52,7 +55,7 @@ confkernel() {
 		printf("semmni=%i\n", max(128, $4));
 
 		getline < "/proc/sys/kernel/shmmax"
-		printf("shmmax=%i\n", max(536870912, $1));
+		printf("shmmax=%i\n", max(4294967295, $1));
 
 		getline < "/proc/sys/kernel/shmmni"
 		printf("shmmni=%i\n", max(4096, $1));
@@ -61,19 +64,23 @@ confkernel() {
 		printf("shmall=%i\n", max(2097152, $1));
 
 		getline < "/proc/sys/fs/file-max"
-		printf("filemax=%i\n", max(65536, $1));
+		printf("filemax=%i\n", max(6815744, $1));
 
 		getline < "/proc/sys/net/ipv4/ip_local_port_range"
-		printf("ip_local_port_range_lb=%i\n", max(1024, $1));
+		printf("ip_local_port_range_lb=%i\n", max(9000, $1));
 		printf("ip_local_port_range_ub=%i\n", min(65000 $2));
 	}')
 
-	/sbin/sysctl -w kernel.sem="$semmsl $semmns $semopm $semmni"
-	/sbin/sysctl -w kernel.shmmax="$shmmax"
-	/sbin/sysctl -w kernel.shmmni="$shmmni"
-	/sbin/sysctl -w kernel.shmall="$shmall"
-	/sbin/sysctl -w fs.file-max="$filemax"
-	/sbin/sysctl -w net.ipv4.ip_local_port_range="$ip_local_port_range_lb $ip_local_port_range_ub"
+	cat <<-EOF >> /etc/sysctl.d/10-oracle-xe.conf
+	kernel.sem = $semmsl $semmns $semopm $semmni
+	kernel.shmmax = $shmmax
+	kernel.shmmni = $shmmni
+	kernel.shmall = $shmall
+	fs.file-max = $filemax
+	net.ipv4.ip_local_port_range = $ip_local_port_range_lb $ip_local_port_range_ub
+	EOF
+
+	apply_sysctl
 }
 
 start() {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/oracle-xe.git/commitdiff/42c69f123feeb3ed7abaa31a6fc2ffb7095af782



More information about the pld-cvs-commit mailing list