Package: tinc
Version: 1.1~pre6-1
Severity: normal
Tags: patch

Hi,

just discovered that tinc supports ifupdown. Cool.
This is just a copy of #690685, but for the ifupdown script.

Copy-and-paste patch attached.

Thanks,
Gian Piero.

-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages tinc depends on:
ii  dpkg          1.16.10
ii  install-info  4.13a.dfsg.1-10
ii  libc6         2.13-38
ii  liblzo2-2     2.06-1
ii  libncurses5   5.9-10
ii  libreadline6  6.2+dfsg-0.1
ii  libssl1.0.0   1.0.1e-2
ii  libtinfo5     5.9-10
ii  zlib1g        1:1.2.7.dfsg-13

tinc recommends no packages.

tinc suggests no packages.

-- Configuration Files:
/etc/default/tinc changed [not included]

-- no debconf information
Sun Mar 31 20:07:45 CEST 2013  Gian Piero Carrubba <gpi...@rm-rf.it>
  * set process limits when started by ifupdown
diff -rN -u old-tinc-1.1~pre6/debian/tinc.if-pre-up new-tinc-1.1~pre6/debian/tinc.if-pre-up
--- old-tinc-1.1~pre6/debian/tinc.if-pre-up	2013-04-04 21:21:51.346494376 +0200
+++ new-tinc-1.1~pre6/debian/tinc.if-pre-up	2013-04-04 21:21:51.346494376 +0200
@@ -8,6 +8,21 @@
 
 . /etc/default/tinc
 
+# Set process limits
+
+setlimits() {
+  while [ $# -gt 0 ]; do
+    parm=$1 ; shift
+    if [ -n "$1" -a "${1#-}" = "$1" ]; then
+      value=$1 ; shift
+      ulimit $parm $value
+    else
+      ulimit $parm
+    fi
+  done
+}
+test -n "$LIMITS" && setlimits $LIMITS
+
 # Read options from /etc/network/interfaces
 
 [ -n "$IF_TINC_CONFIG" ]          && EXTRA="$EXTRA -c $IF_TINC_CONFIG"

Reply via email to