[or-cvs] r17122: {torvm} Fix configuration of control port in tor config (torvm/trunk/build/kamikaze/patches)
coderman at seul.org
coderman at seul.org
Thu Oct 16 01:18:47 UTC 2008
Author: coderman
Date: 2008-10-15 21:18:47 -0400 (Wed, 15 Oct 2008)
New Revision: 17122
Modified:
torvm/trunk/build/kamikaze/patches/001-kamikaze-tor-package.patch
Log:
Fix configuration of control port in tor config
Modified: torvm/trunk/build/kamikaze/patches/001-kamikaze-tor-package.patch
===================================================================
--- torvm/trunk/build/kamikaze/patches/001-kamikaze-tor-package.patch 2008-10-16 00:43:30 UTC (rev 17121)
+++ torvm/trunk/build/kamikaze/patches/001-kamikaze-tor-package.patch 2008-10-16 01:18:47 UTC (rev 17122)
@@ -115,8 +115,8 @@
+$(eval $(call BuildPackage,tor))
diff -Naur orig-kamikaze/package/tor/files/tor.init mod-torpkg-kamikaze/package/tor/files/tor.init
--- orig-kamikaze/package/tor/files/tor.init 1970-01-01 00:00:00.000000000 +0000
-+++ mod-torpkg-kamikaze/package/tor/files/tor.init 2008-10-14 02:07:38.092349312 +0000
-@@ -0,0 +1,110 @@
++++ mod-torpkg-kamikaze/package/tor/files/tor.init 2008-10-16 01:08:41.832711721 +0000
+@@ -0,0 +1,112 @@
+#!/bin/sh
+
+BIN=tor
@@ -141,7 +141,7 @@
+if [ "$1" = "start" ]; then
+ [ -f $DEFAULT ] && . $DEFAULT
+ [ -d $HOME_D ] || mkdir -p $HOME_D
-+ [ ! -f $CONF_F ] && cp /etc/tor/torrc $CONF_F
++ [ -f $CONF_F ] || cp -f /etc/tor/torrc $CONF_F
+ [ -d $LOG_D ] || mkdir -p $LOG_D
+ chown $RUN_USER:$RUN_GROUP $LOG_D
+ [ -d $DATA_D ] || mkdir -p $DATA_D
@@ -165,7 +165,9 @@
+ echo $ARGS | grep ' CTLSOCK=' >/dev/null 2>&1 ; \
+ if [ $? -eq 0 ]; then \
+ CTLSOCK=`echo $ARGS | sed 's/.* CTLSOCK=//' | sed 's/ .*//'`; \
-+ cat $CONF_F | grep -v 'ControlListenAddress' > $TMP_F; \
++ CTLPORT=`echo $CTLSOCK | sed 's/.*://'`; \
++ cat $CONF_F | grep -v 'ControlListenAddress' | grep -v ControlPort > $TMP_F; \
++ echo "ControlPort ${CTLPORT}" >> $TMP_F; \
+ echo "ControlListenAddress ${CTLSOCK}" >> $TMP_F; \
+ mv -f $TMP_F $CONF_F; \
+ fi;
More information about the tor-commits
mailing list