[or-cvs] r6932: So long, farewell, auf Wiedersehen, adieu, launchd (tor/trunk/contrib/osx)

phobos at seul.org phobos at seul.org
Fri Jul 28 13:52:37 UTC 2006


Author: phobos
Date: 2006-07-28 09:52:36 -0400 (Fri, 28 Jul 2006)
New Revision: 6932

Modified:
   tor/trunk/contrib/osx/Makefile.am
   tor/trunk/contrib/osx/TorPostflight
   tor/trunk/contrib/osx/TorPreFlight
   tor/trunk/contrib/osx/package.sh
   tor/trunk/contrib/osx/uninstall_tor_bundle.sh
Log:
So long, farewell, auf Wiedersehen, adieu, launchd


Modified: tor/trunk/contrib/osx/Makefile.am
===================================================================
--- tor/trunk/contrib/osx/Makefile.am	2006-07-28 03:01:31 UTC (rev 6931)
+++ tor/trunk/contrib/osx/Makefile.am	2006-07-28 13:52:36 UTC (rev 6932)
@@ -7,4 +7,4 @@
     package.sh privoxy.config TorPostflight addsysuser 	\
     Tor_Uninstaller.applescript uninstall_tor_bundle.sh \
     package_list.txt tor_logo.gif Tor_Uninstaller.app.tar.gz \
-    net.freehaven.tor.plist.in TorPreFlight
+    TorPreFlight

Modified: tor/trunk/contrib/osx/TorPostflight
===================================================================
--- tor/trunk/contrib/osx/TorPostflight	2006-07-28 03:01:31 UTC (rev 6931)
+++ tor/trunk/contrib/osx/TorPostflight	2006-07-28 13:52:36 UTC (rev 6932)
@@ -19,25 +19,6 @@
 	TARGET=/Library/Tor
 fi
 
-## Determine OSX Version
-# map version to name
-if [ -x /usr/bin/sw_vers ]; then
-# This is poor, yet functional.  We don't care about the 3rd number in
-# the OS version
-  OSVER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2`
-  case "$OSVER" in
- 	"10.5") OS="leopard";;
-	"10.4") OS="tiger";;
-	"10.3") OS="panther";;
-	"10.2") OS="jaguar";;
-	"10.1") OS="puma";;
-	"10.0") OS="cheetah";;
-	*) OS="unknown";;
-  esac
-else
-  OS="unknown"
-fi
-
 # Create user $TORUSER in group daemon.  If it's already there, great.
 $ADDSYSUSER $TORUSER "Tor System user" $TORDIR
 
@@ -117,33 +98,11 @@
 # If the pre-install script did it's thing, it should have saved the
 # config and server keys; put these back and clean up
 if [ -f /tmp/TorSavedMe.tar.gz ]; then
-	tar zxf /tmp/TorSavedMe.tar.gz -C /
-	rm /tmp/TorSavedMe.tar.gz
+   tar zxf /tmp/TorSavedMe.tar.gz -C /
+   rm /tmp/TorSavedMe.tar.gz
 fi
 
-# Determine how to start by OS Version
-if [ $OS = "tiger" ]; then
-  if [ -f $PACKAGE_PATH/Contents/Resources/net.freehaven.tor.plist ]; then
-     rm -rf /Library/StartupItems/Tor
-     cp $PACKAGE_PATH/Contents/Resources/net.freehaven.tor.plist /System/Library/LaunchDaemons/net.freehaven.tor.plist
-     chmod 644 /System/Library/LaunchDaemons/net.freehaven.tor.plist
-     if [ -f $TARGET/torrc ]; then
-       IFS=,
-       CONFIGVARS="#--START,RunAsDaemon 0,Log notice file $TARGET/var/log/tor/tor.log,DataDirectory $TARGET/var/lib/tor,Group daemon,User _tor,PidFile /var/run/Tor.pid,#--END"
-       for var in ${CONFIGVARS}
-         do
-	 RC=`grep ^$var $TARGET/torrc`
-	 if [ -z $RC ]; then
-	   echo "$var" >> $TARGET/torrc
-	 fi
-       done
-     fi
-  fi
-     /bin/launchctl load /System/Library/LaunchDaemons/net.freehaven.tor.plist
-     /bin/launchctl start net.freehaven.tor
-else
-  if [ -d /Library/StartupItems/Tor ]; then
-    rm -f /Library/StartupItems/Tor/Tor.loc
-    echo "$TARGET" > /Library/StartupItems/Tor/Tor.loc
-  fi
+if [ -d /Library/StartupItems/Tor ]; then
+   rm -f /Library/StartupItems/Tor/Tor.loc
+   echo "$TARGET" > /Library/StartupItems/Tor/Tor.loc
 fi

Modified: tor/trunk/contrib/osx/TorPreFlight
===================================================================
--- tor/trunk/contrib/osx/TorPreFlight	2006-07-28 03:01:31 UTC (rev 6931)
+++ tor/trunk/contrib/osx/TorPreFlight	2006-07-28 13:52:36 UTC (rev 6932)
@@ -4,8 +4,6 @@
 # Figure out where Tor is installed
 if [ -f /Library/StartupItems/Tor/Tor.loc ]; then
 	TORPATH=`cat /Library/StartupItems/Tor/Tor.loc`
-elif [ -f /System/Library/LaunchDaemons/net.freehaven.tor.plist ]; then
-	TORPATH=/`grep -A1 "<key>Program</key>" /System/Library/LaunchDaemons/net.freehaven.tor.plist | grep string | cut -d"/" -f2,3`
 else
 	TORPATH="/Library/Tor/"
 fi

Modified: tor/trunk/contrib/osx/package.sh
===================================================================
--- tor/trunk/contrib/osx/package.sh	2006-07-28 03:01:31 UTC (rev 6931)
+++ tor/trunk/contrib/osx/package.sh	2006-07-28 13:52:36 UTC (rev 6932)
@@ -90,7 +90,6 @@
 cp contrib/osx/uninstall_tor_bundle.sh $BUILD_DIR/tor_resources/uninstall_tor_bundle.sh
 cp contrib/osx/package_list.txt $BUILD_DIR/tor_resources/package_list.txt
 cp contrib/osx/tor_logo.gif $BUILD_DIR/tor_resources/background.gif
-cp contrib/osx/net.freehaven.tor.plist $BUILD_DIR/tor_resources/net.freehaven.tor.plist
 cat <<EOF > $BUILD_DIR/tor_resources/Welcome.txt
 Tor: an anonymous Internet communication system
 

Modified: tor/trunk/contrib/osx/uninstall_tor_bundle.sh
===================================================================
--- tor/trunk/contrib/osx/uninstall_tor_bundle.sh	2006-07-28 03:01:31 UTC (rev 6931)
+++ tor/trunk/contrib/osx/uninstall_tor_bundle.sh	2006-07-28 13:52:36 UTC (rev 6932)
@@ -135,9 +135,6 @@
 echo ". Cleaning up"
 rm -rf $TEMP_BOM_CONTENTS
 rm -rf /Library/Privoxy/ /Library/StartupItems/Privoxy/ /Library/Tor/ /Library/StartupItems/Tor/
-if [ -f /System/Library/LaunchDaemons/net.freehaven.tor.plist ]; then
-   rm /System/Library/LaunchDaemons/net.freehaven.tor.plist
-fi
 
 echo ". Finished"
 



More information about the tor-commits mailing list