[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Print that we"re raising the ulimit to stdout in the init s...
Update of /home/or/cvsroot/tor/debian
In directory moria:/tmp/cvs-serv31700
Modified Files:
changelog tor.init
Log Message:
Print that we're raising the ulimit to stdout in the init script.
Index: changelog
===================================================================
RCS file: /home/or/cvsroot/tor/debian/changelog,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -p -d -r1.152 -r1.153
--- changelog 23 Jan 2006 14:02:03 -0000 1.152
+++ changelog 23 Jan 2006 15:04:03 -0000 1.153
@@ -6,8 +6,9 @@ tor (0.1.1.12-alpha-cvs-0) unreleased; u
* Create /var/run/tor on init script start if it does
not exist already.
* Set default ulimit -n to 8k instead of 4k in /etc/default/tor.
+ * Print that we're raising the ulimit to stdout in the init script.
- -- Peter Palfrader <weasel@xxxxxxxxxx> Mon, 23 Jan 2006 15:00:53 +0100
+ -- Peter Palfrader <weasel@xxxxxxxxxx> Mon, 23 Jan 2006 15:57:59 +0100
tor (0.1.1.12-alpha-1) experimental; urgency=low
Index: tor.init
===================================================================
RCS file: /home/or/cvsroot/tor/debian/tor.init,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -d -r1.18 -r1.19
--- tor.init 23 Jan 2006 14:02:03 -0000 1.18
+++ tor.init 23 Jan 2006 15:04:03 -0000 1.19
@@ -25,7 +25,7 @@ TORPID=$TORPIDDIR/tor.pid
DEFAULTSFILE=/etc/default/$NAME
WAITFORDAEMON=60
ARGS=""
-MAX_FILEDESCRIPTORS=4096
+MAX_FILEDESCRIPTORS=8192
NICE=""
test -x $DAEMON || exit 0
@@ -72,8 +72,15 @@ case "$1" in
fi
if test ! -x $TORPIDDIR; then echo "Cannot access $TORPIDDIR directory, are you root?" >&2; exit 1;
else
+ if [ -n "$MAX_FILEDESCRIPTORS" ]; then
+ echo -n "Raising maximum number of filedescriptors (ulimit -n) to $MAX_FILEDESCRIPTORS"
+ if ulimit -n "$MAX_FILEDESCRIPTORS" ; then
+ echo "."
+ else
+ echo ": FAILED."
+ fi
+ fi
echo "Starting $DESC: $NAME..."
- ulimit -n $MAX_FILEDESCRIPTORS || echo "Warn: Could not set ulimit for number of file descriptors." >&2
start-stop-daemon --start --quiet --oknodo \
--chuid debian-tor:debian-tor \
--pidfile $TORPID \