Dear maintainer,

I've prepared an NMU for iscsitarget (versioned as 0.4.17+svn229-1.3) and
uploaded it to DELAYED/05. Please feel free to tell me if I
should delay it longer.

Regards.
 -- Guido
diff -u iscsitarget-0.4.17+svn229/debian/rules iscsitarget-0.4.17+svn229/debian/rules
--- iscsitarget-0.4.17+svn229/debian/rules
+++ iscsitarget-0.4.17+svn229/debian/rules
@@ -141,8 +141,9 @@
 	mkdir -p debian/iscsitarget/usr/share/lintian/overrides
 	cp debian/iscsitarget.overrides \
 		debian/iscsitarget/usr/share/lintian/overrides/iscsitarget
-	
-
+	# Add sysctl tune knobs
+	install -D -m 644 debian/30-iscsitarget.conf \
+		debian/iscsitarget/etc/sysctl.d/30-iscsitarget.conf
 
 # Must not depend on anything. This is to be called by
 # binary-arch/binary-indep
diff -u iscsitarget-0.4.17+svn229/debian/changelog iscsitarget-0.4.17+svn229/debian/changelog
--- iscsitarget-0.4.17+svn229/debian/changelog
+++ iscsitarget-0.4.17+svn229/debian/changelog
@@ -1,3 +1,11 @@
+iscsitarget (0.4.17+svn229-1.3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * [2a179ca] Let propcs handle the sysctl knobs to  make it more obvious to
+    the sysadmin what's going on. (Closes: #543604)
+
+ -- Guido Günther <[email protected]>  Sat, 23 Jan 2010 17:36:12 +0100
+
 iscsitarget (0.4.17+svn229-1.2) unstable; urgency=low
 
   * Non-maintainer upload.
diff -u iscsitarget-0.4.17+svn229/debian/iscsitarget.init iscsitarget-0.4.17+svn229/debian/iscsitarget.init
--- iscsitarget-0.4.17+svn229/debian/iscsitarget.init
+++ iscsitarget-0.4.17+svn229/debian/iscsitarget.init
@@ -2,8 +2,8 @@
 #
 ### BEGIN INIT INFO
 # Provides:          iscsitarget
-# Required-Start:    $remote_fs $syslog $network $time
-# Required-Stop:     $remote_fs $syslog $network $time
+# Required-Start:    $remote_fs $syslog $network $time procps
+# Required-Stop:     $remote_fs $syslog $network $time procps
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Short-Description: Starts and stops the iSCSI target
@@ -15,10 +15,6 @@
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
-# Don't touch this "memsize thingy" unless you are blessed
-# with knowledge about it.
-MEM_SIZE=1048576
-
 . /lib/lsb/init-functions # log_{warn,failure}_msg
 ISCSITARGET_ENABLE=false
 ISCSITARGET_DEFAULTS_FILE=/etc/default/iscsitarget
@@ -34,43 +30,11 @@
     esac
 fi
 
-configure_memsize()
-{
-    if [ -e /proc/sys/net/core/wmem_max ]; then
-        echo ${MEM_SIZE} > /proc/sys/net/core/wmem_max
-    fi
-
-    if [ -e /proc/sys/net/core/rmem_max ]; then
-        echo ${MEM_SIZE} > /proc/sys/net/core/rmem_max
-    fi
-
-    if [ -e /proc/sys/net/core/wmem_default ]; then
-        echo ${MEM_SIZE} > /proc/sys/net/core/wmem_default
-    fi
-
-    if [ -e /proc/sys/net/core/rmem_default ]; then
-        echo ${MEM_SIZE} > /proc/sys/net/core/rmem_default
-    fi
-
-    if [ -e /proc/sys/net/ipv4/tcp_mem ]; then
-        echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_mem
-    fi
-
-    if [ -e  /proc/sys/net/ipv4/tcp_rmem ]; then
-        echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_rmem
-    fi
-
-    if [ -e /proc/sys/net/ipv4/tcp_wmem ]; then
-        echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_wmem
-    fi
-}
-
 RETVAL=0
 
 ietd_start()
 {
 	echo -n "Starting iSCSI enterprise target service: "
-	configure_memsize
 	modprobe -q crc32c
 	modprobe iscsi_trgt
 	RETVAL=$?
only in patch2:
unchanged:
--- iscsitarget-0.4.17+svn229.orig/debian/30-iscsitarget.conf
+++ iscsitarget-0.4.17+svn229/debian/30-iscsitarget.conf
@@ -0,0 +1,9 @@
+# Increases send and receive buffers for iSCSI
+
+net.core.wmem_max=1048576
+net.core.rmem_max=1048576
+net.core.wmem_default=1048576
+net.core.rmem_default=1048576
+net.ipv4.tcp_mem=1048576
+net.ipv4.tcp_rmem=1048576
+net.ipv4.tcp_wmem=1048576

Reply via email to