[or-cvs] Create /var/run/tor on init script start if it does not exi...

Peter Palfrader weasel at seul.org
Mon Jan 23 14:02:06 UTC 2006


Update of /home/or/cvsroot/tor/debian
In directory moria:/tmp/cvs-serv27799

Modified Files:
	changelog tor.default tor.init 
Log Message:
* 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.


Index: changelog
===================================================================
RCS file: /home/or/cvsroot/tor/debian/changelog,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -p -d -r1.151 -r1.152
--- changelog	12 Jan 2006 02:19:40 -0000	1.151
+++ changelog	23 Jan 2006 14:02:03 -0000	1.152
@@ -1,10 +1,13 @@
-tor (0.1.1.12-alpha-2XXXXXX) unreleased; urgency=low
+tor (0.1.1.12-alpha-cvs-0) unreleased; urgency=low
 
   * CVS SNAPSHOT
   * Forward port patches/02_add_debian_files_in_manpage.
   * Forward port patches/03_tor_manpage_in_section_8.
+  * 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.
 
- -- Peter Palfrader <weasel at debian.org>  Thu, 12 Jan 2006 03:18:59 +0100
+ -- Peter Palfrader <weasel at debian.org>  Mon, 23 Jan 2006 15:00:53 +0100
 
 tor (0.1.1.12-alpha-1) experimental; urgency=low
 

Index: tor.default
===================================================================
RCS file: /home/or/cvsroot/tor/debian/tor.default,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -d -r1.10 -r1.11
--- tor.default	15 Nov 2005 10:33:54 -0000	1.10
+++ tor.default	23 Jan 2006 14:02:03 -0000	1.11
@@ -12,7 +12,7 @@ RUN_DAEMON="yes"
 # if they are very busy and have many clients connected to them.
 #  (ulimit -n)
 #
-MAX_FILEDESCRIPTORS=4096
+MAX_FILEDESCRIPTORS=8192
 
 #
 # If tor is seriously hogging your CPU, taking away too much cycles from

Index: tor.init
===================================================================
RCS file: /home/or/cvsroot/tor/debian/tor.init,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -d -r1.17 -r1.18
--- tor.init	15 Nov 2005 10:36:42 -0000	1.17
+++ tor.init	23 Jan 2006 14:02:03 -0000	1.18
@@ -65,8 +65,12 @@ case "$1" in
 	if [ "$RUN_DAEMON" != "yes" ]; then
 		echo "Not starting $DESC (Disabled in $DEFAULTSFILE)."
 	else
-		if   test ! -d $TORPIDDIR; then echo "There is no $TORPIDDIR directory." >&2; exit 1
-		elif test ! -x $TORPIDDIR; then echo "Cannot access $TORPIDDIR directory, are you root?" >&2; exit 1;
+		if test ! -d $TORPIDDIR; then
+			echo "There is no $TORPIDDIR directory.  Creating one for you."
+			mkdir -m 02700 "$TORPIDDIR"
+			chown debian-tor:debian-tor "$TORPIDDIR"
+		fi
+		if test ! -x $TORPIDDIR; then echo "Cannot access $TORPIDDIR directory, are you root?" >&2; exit 1;
 		else
 			echo "Starting $DESC: $NAME..."
 			ulimit -n $MAX_FILEDESCRIPTORS || echo "Warn: Could not set ulimit for number of file descriptors." >&2



More information about the tor-commits mailing list