 +	fi; \
 +	echo $ARGS | grep ' CTLSOCK=' >/dev/null 2>&1 ; \
 +	if [ $? -eq 0 ]; then \
-+	  CTLSOCK=`echo $ARGS | sed 's/.* CTLSOCK=//' | sed 's/ .*//'`; \
-+	  CTLPORT=`echo $CTLSOCK | sed 's/.*://'`; \
++	  CTLADDR=`echo $ARGS | sed 's/.* CTLSOCK=//' | sed 's/ .*//'`; \
++	  CTLPORT=`echo $CTLADDR | sed 's/.*://'`; \
 +	  cat $CONF_F | grep -v 'ControlListenAddress' | grep -v ControlPort > $TMP_F; \
 +	  echo "ControlPort ${CTLPORT}" >> $TMP_F; \
-+	  echo "ControlListenAddress ${CTLSOCK}" >> $TMP_F; \
++	  echo "ControlListenAddress ${CTLADDR}" >> $TMP_F; \
++	  echo "SocksListenAddress ${CTLADDR}" >> $TMP_F; \
 +	  mv -f $TMP_F $CONF_F; \
 +	fi; \
 +	chown $RUN_USER:$RUN_GROUP $CONF_F ; \
 +	if [ $FOLLOWTOR -eq 1 ]; then \
-+	  /etc/init.d/tor dofollow >/dev/null 2>&1 &; \
++	  /etc/init.d/tor dofollow >/dev/null 2>&1 & \
 +        else \
 +	  $BIN --runasdaemon 1 -f $CONF_F > $SLOG_F 2>&1 ; \
 +	fi; 

+
diff -Naur a/package/tor/files/tor.init b/package/tor/files/tor.init
--- a/package/tor/files/tor.init	1970-01-01 00:00:00.000000000 +0000
+++ b/package/tor/files/tor.init	2009-03-26 03:54:19.952640296 +0000
@@ -0,0 +1,136 @@
+#!/bin/sh 
+# make sure we check the system bin dirs
+export PATH=/usr/sbin:/sbin:$PATH

+AutomapHostsOnResolve 1
+
+# options appended from command line placed below:
+SocksPort 9050
+DNSPort 9093
+TransPort 9095
