[or-cvs] r16188: Add support for persistent Tor data via xfs on hda1, win32 b (in torvm/trunk: . build/kamikaze/patches build/win32 build/win32/files)

coderman at seul.org coderman at seul.org
Fri Jul 25 11:17:31 UTC 2008


Author: coderman
Date: 2008-07-25 07:17:31 -0400 (Fri, 25 Jul 2008)
New Revision: 16188

Added:
   torvm/trunk/build/win32/files/run.bat
Modified:
   torvm/trunk/Makefile
   torvm/trunk/build/kamikaze/patches/001-kamikaze-tor-package.patch
   torvm/trunk/build/kamikaze/patches/002-kamikaze-mod-basefiles.patch
   torvm/trunk/build/win32/Makefile
   torvm/trunk/build/win32/files/autorun.inf
   torvm/trunk/build/win32/files/install.bat
Log:
Add support for persistent Tor data via xfs on hda1, win32 build improvements suggested by goldy, and parse options set on kernel command line.

Modified: torvm/trunk/Makefile
===================================================================
--- torvm/trunk/Makefile	2008-07-25 08:23:02 UTC (rev 16187)
+++ torvm/trunk/Makefile	2008-07-25 11:17:31 UTC (rev 16188)
@@ -36,7 +36,7 @@
 	@if [ ! -f .build_prereqs_verified ]; then \
 		echo "Verifying build prerequisites ..." >&2; \
 		NOFOUND=""; \
-		REQS="gmake gcc g++ gawk bison flex unzip bzip2 patch perl wget tar svn autoconf mkisofs"; \
+		REQS="gmake gcc g++ ccache gawk bison flex unzip bzip2 patch perl wget tar svn autoconf mkisofs sha1sum"; \
 		for REQ in $$REQS; do \
 			which $$REQ >/dev/null 2>&1; \
 			if (( $$? != 0 )); then \

Modified: torvm/trunk/build/kamikaze/patches/001-kamikaze-tor-package.patch
===================================================================
--- torvm/trunk/build/kamikaze/patches/001-kamikaze-tor-package.patch	2008-07-25 08:23:02 UTC (rev 16187)
+++ torvm/trunk/build/kamikaze/patches/001-kamikaze-tor-package.patch	2008-07-25 11:17:31 UTC (rev 16188)
@@ -1,7 +1,7 @@
-diff -Naur x86-uclibc-orig/package/tor/Makefile x86-uclibc-torvm/package/tor/Makefile
---- x86-uclibc-orig/package/tor/Makefile	1970-01-01 00:00:00.000000000 +0000
-+++ x86-uclibc-torvm/package/tor/Makefile	2008-07-09 03:50:07.851861387 +0000
-@@ -0,0 +1,114 @@
+diff -Naur kamikaze-orig/package/tor/Makefile kamikaze-mod/package/tor/Makefile
+--- kamikaze-orig/package/tor/Makefile	1970-01-01 00:00:00.000000000 +0000
++++ kamikaze-mod/package/tor/Makefile	2008-07-25 12:48:12.440601165 +0000
+@@ -0,0 +1,112 @@
 +#
 +# Copyright (C) 2008 OpenWrt.org
 +#
@@ -86,7 +86,6 @@
 +
 +CONFIGURE_ARGS += \
 +	--enable-eventdns \
-+	--disable-threads \
 +	--enable-transparent \
 +	--with-libevent-dir="$(STAGING_DIR)/usr" \
 +	--with-ssl-dir="$(STAGING_DIR)/usr" \
@@ -111,54 +110,59 @@
 +	$(INSTALL_DIR) $(1)/etc/tor
 +	$(INSTALL_DATA) ./files/torrc $(1)/etc/tor/torrc
 +	$(INSTALL_DIR) $(1)/var/log/tor
-+	$(INSTALL_DIR) $(1)/var/lib/tor
 +	$(INSTALL_DIR) $(1)/var/run/tor
 +endef
 +
 +$(eval $(call BuildPackage,tor))
-diff -Naur x86-uclibc-orig/package/tor/files/tor.init x86-uclibc-torvm/package/tor/files/tor.init
---- x86-uclibc-orig/package/tor/files/tor.init	1970-01-01 00:00:00.000000000 +0000
-+++ x86-uclibc-torvm/package/tor/files/tor.init	2008-07-09 03:48:57.228743488 +0000
-@@ -0,0 +1,78 @@
+diff -Naur kamikaze-orig/package/tor/files/tor.init kamikaze-mod/package/tor/files/tor.init
+--- kamikaze-orig/package/tor/files/tor.init	1970-01-01 00:00:00.000000000 +0000
++++ kamikaze-mod/package/tor/files/tor.init	2008-07-25 12:47:37.800604618 +0000
+@@ -0,0 +1,84 @@
 +#!/bin/sh 
 +
 +BIN=tor
 +DEFAULT=/etc/default/$BIN
++CONF_F=/home/$BIN/torrc
 +LOG_D=/var/log/$BIN
 +SLOG_F=$LOG_D/start.log
-+LIB_D=/var/lib/$BIN
++DATA_D=/home/$BIN/data
 +RUN_D=/var/run/$BIN
 +PID_F=$RUN_D/$BIN.pid
 +RUN_USER=$BIN
 +RUN_GROUP=$BIN
 +TOR_INTF=eth0
++grep eth1: /proc/net/dev >/dev/null 2>&1
++if [ $? -eq 0 ]; then
++  TOR_INTF=eth1
++fi
 +MYIP=$(ifconfig $TOR_INTF | grep 'inet addr' | sed 's/.*inet addr://' | sed 's/ .*//')
 +
 +if [ "$1" = "start" ]; then
 +	[ -f $DEFAULT ] && . $DEFAULT
 +	[ -d $LOG_D ] || mkdir -p $LOG_D
 +	chown $RUN_USER:$RUN_GROUP $LOG_D
-+	[ -d $LIB_D ] || mkdir -p $LIB_D
-+	chown $RUN_USER:$RUN_GROUP $LIB_D
-+	chmod 700 $LIB_D
++	[ -d $DATA_D ] || mkdir -p $DATA_D
++	chown $RUN_USER:$RUN_GROUP $DATA_D
++	chmod 700 $DATA_D
 +	[ -d $RUN_D ] || mkdir -p $RUN_D
 +	chown $RUN_USER:$RUN_GROUP $RUN_D
 +	chmod 700 $RUN_D
-+	$BIN $OPTIONS > $SLOG_F 2>&1
++	chown $RUN_USER:$RUN_GROUP $CONF_F
++	$BIN -f $CONF_F $OPTIONS > $SLOG_F 2>&1
 +	# forcibly filter some traffic which should never go over Tor:
 +	# no SMTP
-+	iptables -t nat -A PREROUTING -s ! $MYIP -p tcp --dport 25 -j DROP
++	iptables -t nat -A PREROUTING -i $TOR_INTF -s ! $MYIP -p tcp --dport 25 -j DROP
 +	# no TCP DNS
-+	iptables -t nat -A PREROUTING -s ! $MYIP -p tcp --dport 53 -j DROP
++	iptables -t nat -A PREROUTING -i $TOR_INTF -s ! $MYIP -p tcp --dport 53 -j DROP
 +	# no NetBIOS
-+	iptables -t nat -A PREROUTING -s ! $MYIP -p tcp --dport 137 -j DROP
-+	iptables -t nat -A PREROUTING -s ! $MYIP -p tcp --dport 138 -j DROP
-+	iptables -t nat -A PREROUTING -s ! $MYIP -p tcp --dport 139 -j DROP
++	iptables -t nat -A PREROUTING -i $TOR_INTF -s ! $MYIP -p tcp --dport 137 -j DROP
++	iptables -t nat -A PREROUTING -i $TOR_INTF -s ! $MYIP -p tcp --dport 138 -j DROP
++	iptables -t nat -A PREROUTING -i $TOR_INTF -s ! $MYIP -p tcp --dport 139 -j DROP
 +	# trans proxy TCP and DNS
-+	iptables -t nat -A PREROUTING -s ! $MYIP -p tcp -j REDIRECT --to 9095
-+	iptables -t nat -A PREROUTING -s ! $MYIP -p udp --dport 53 -j REDIRECT --to 9093
++	iptables -t nat -A PREROUTING -i $TOR_INTF -s ! $MYIP -p tcp -j REDIRECT --to 9095
++	iptables -t nat -A PREROUTING -i $TOR_INTF -s ! $MYIP -p udp --dport 53 -j REDIRECT --to 9093
 +	# drop everything else ...
-+	iptables -t nat -A PREROUTING -s ! $MYIP -j DROP
++	iptables -t nat -A PREROUTING -i $TOR_INTF -s ! $MYIP -j DROP
 +
 +elif [ "$1" = "stop" ]; then
 +	# XXX TODO: replace this with a fail-safe shutdown
@@ -179,9 +183,9 @@
 +	  echo
 +	  # check if we are fully bootstrapped yet
 +	  grep 'Bootstrapped 100' /var/log/tor/notices.log >/dev/null 2>&1
-+	  if [ -x $? ]; then
++	  if [ $? -eq 0 ]; then
 +	  	echo "Tor is still trying to bootstrap into the network..."
-+		echo "Be sure the TorVM clock is correct and that your traffic"
++		echo "Be sure the Tor VM clock is correct and that your traffic"
 +		echo " is not getting filtered upstream."
 +		echo
 +	  	grep Bootstrapped /var/log/tor/notices.log | sed 's/.*Bootstrapped/Bootstrapped/' | tail -6
@@ -198,24 +202,18 @@
 +	exit 1
 +fi
 +exit 0
-diff -Naur x86-uclibc-orig/package/tor/files/torrc x86-uclibc-torvm/package/tor/files/torrc
---- x86-uclibc-orig/package/tor/files/torrc	1970-01-01 00:00:00.000000000 +0000
-+++ x86-uclibc-torvm/package/tor/files/torrc	2008-07-09 03:49:34.792072977 +0000
-@@ -0,0 +1,27 @@
+diff -Naur kamikaze-orig/package/tor/files/torrc kamikaze-mod/package/tor/files/torrc
+--- kamikaze-orig/package/tor/files/torrc	1970-01-01 00:00:00.000000000 +0000
++++ kamikaze-mod/package/tor/files/torrc	2008-07-25 12:46:06.317280333 +0000
+@@ -0,0 +1,20 @@
 +# Configuration for TorVM
 +RunAsDaemon 1
-+AllowUnverifiedNodes middle,rendezvous
 +User tor
 +Group tor
 +PidFile /var/run/tor/pid
-+DataDirectory /var/lib/tor
++DataDirectory /home/tor/data
 +Log notice file /var/log/tor/notices.log
-+ControlSocket /var/run/tor/control
 +
-+# Disable SOCKS support for now.
-+#SocksPort 9050
-+#SocksBindAddress 0.0.0.0
-+
 +# Rely on netfilter for access control to transproxy ports
 +TransListenAddress 0.0.0.0
 +TransPort 9095
@@ -228,10 +226,9 @@
 +
 +# Misc. options
 +AutomapHostsOnResolve 1
-+CircuitBuildTimeout  20
-diff -Naur x86-uclibc-orig/package/tor/patches/001-correct-configure.patch x86-uclibc-torvm/package/tor/patches/001-correct-configure.patch
---- x86-uclibc-orig/package/tor/patches/001-correct-configure.patch	1970-01-01 00:00:00.000000000 +0000
-+++ x86-uclibc-torvm/package/tor/patches/001-correct-configure.patch	2008-07-09 02:42:10.366852465 +0000
+diff -Naur kamikaze-orig/package/tor/patches/001-correct-configure.patch kamikaze-mod/package/tor/patches/001-correct-configure.patch
+--- kamikaze-orig/package/tor/patches/001-correct-configure.patch	1970-01-01 00:00:00.000000000 +0000
++++ kamikaze-mod/package/tor/patches/001-correct-configure.patch	2008-07-25 12:38:19.827535516 +0000
 @@ -0,0 +1,56 @@
 +diff -Naur tor-0.2.1.2-alpha-orig/configure tor-0.2.1.2-alpha-mod/configure
 +--- tor-0.2.1.2-alpha-orig/configure	2008-06-20 06:27:43.000000000 +0000

Modified: torvm/trunk/build/kamikaze/patches/002-kamikaze-mod-basefiles.patch
===================================================================
--- torvm/trunk/build/kamikaze/patches/002-kamikaze-mod-basefiles.patch	2008-07-25 08:23:02 UTC (rev 16187)
+++ torvm/trunk/build/kamikaze/patches/002-kamikaze-mod-basefiles.patch	2008-07-25 11:17:31 UTC (rev 16188)
@@ -1,6 +1,6 @@
-diff -Naur x86-uclibc-orig/package/base-files/Makefile x86-uclibc-torvm/package/base-files/Makefile
---- x86-uclibc-orig/package/base-files/Makefile	2008-06-11 19:59:16.494753000 +0000
-+++ x86-uclibc-torvm/package/base-files/Makefile	2008-07-09 02:23:09.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/Makefile kamikaze-mod/package/base-files/Makefile
+--- kamikaze-orig/package/base-files/Makefile	2008-06-11 19:59:16.494753000 +0000
++++ kamikaze-mod/package/base-files/Makefile	2008-07-25 11:32:02.090961485 +0000
 @@ -36,8 +36,8 @@
    URL:=http://openwrt.org/
    VERSION:=$(PKG_RELEASE)-$(REVISION)
@@ -40,9 +40,9 @@
  	mkdir -p $(1)/root
  	ln -sf /proc/mounts $(1)/etc/mtab
  	rm -f $(1)/var
-diff -Naur x86-uclibc-orig/package/base-files/files/bin/firstboot x86-uclibc-torvm/package/base-files/files/bin/firstboot
---- x86-uclibc-orig/package/base-files/files/bin/firstboot	2007-07-11 20:46:25.691898000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/bin/firstboot	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/bin/firstboot kamikaze-mod/package/base-files/files/bin/firstboot
+--- kamikaze-orig/package/base-files/files/bin/firstboot	2007-07-11 20:46:25.691898000 +0000
++++ kamikaze-mod/package/base-files/files/bin/firstboot	1970-01-01 00:00:00.000000000 +0000
 @@ -1,126 +0,0 @@
 -#!/bin/sh
 -# $Id: firstboot 5544 2006-11-17 03:07:10Z nbd $
@@ -170,9 +170,9 @@
 -	mount "$mtdpart" /jffs -t jffs2
 -	fopivot /jffs /rom 1
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/banner x86-uclibc-torvm/package/base-files/files/etc/banner
---- x86-uclibc-orig/package/base-files/files/etc/banner	2005-12-20 15:03:08.038259000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/banner	2008-07-09 03:57:16.155151830 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/banner kamikaze-mod/package/base-files/files/etc/banner
+--- kamikaze-orig/package/base-files/files/etc/banner	2005-12-20 15:03:08.038259000 +0000
++++ kamikaze-mod/package/base-files/files/etc/banner	2008-07-25 11:32:02.090961485 +0000
 @@ -1,10 +1,2 @@
 -  _______                     ________        __
 - |       |.-----.-----.-----.|  |  |  |.----.|  |_
@@ -186,9 +186,9 @@
 - ---------------------------------------------------
 +Tor Virtual Machine BUILDDATE BUILDVER
 +
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/config/fstab x86-uclibc-torvm/package/base-files/files/etc/config/fstab
---- x86-uclibc-orig/package/base-files/files/etc/config/fstab	2007-09-22 13:47:20.783817000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/config/fstab	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/config/fstab kamikaze-mod/package/base-files/files/etc/config/fstab
+--- kamikaze-orig/package/base-files/files/etc/config/fstab	2007-09-22 13:47:20.783817000 +0000
++++ kamikaze-mod/package/base-files/files/etc/config/fstab	1970-01-01 00:00:00.000000000 +0000
 @@ -1,10 +0,0 @@
 -config mount
 -	option target	/home
@@ -200,9 +200,9 @@
 -config swap
 -	option device	/dev/sda2
 -	option enabled	0
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/config/network x86-uclibc-torvm/package/base-files/files/etc/config/network
---- x86-uclibc-orig/package/base-files/files/etc/config/network	2007-10-18 13:20:02.347557000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/config/network	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/config/network kamikaze-mod/package/base-files/files/etc/config/network
+--- kamikaze-orig/package/base-files/files/etc/config/network	2007-10-18 13:20:02.347557000 +0000
++++ kamikaze-mod/package/base-files/files/etc/config/network	1970-01-01 00:00:00.000000000 +0000
 @@ -1,14 +0,0 @@
 -# Copyright (C) 2006 OpenWrt.org
 -
@@ -218,24 +218,24 @@
 -	option proto	static
 -	option ipaddr	192.168.1.1
 -	option netmask	255.255.255.0
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/config/system x86-uclibc-torvm/package/base-files/files/etc/config/system
---- x86-uclibc-orig/package/base-files/files/etc/config/system	2008-06-11 19:59:16.494753000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/config/system	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/config/system kamikaze-mod/package/base-files/files/etc/config/system
+--- kamikaze-orig/package/base-files/files/etc/config/system	2008-06-11 19:59:16.494753000 +0000
++++ kamikaze-mod/package/base-files/files/etc/config/system	1970-01-01 00:00:00.000000000 +0000
 @@ -1,3 +0,0 @@
 -config system
 -	option hostname	OpenWrt
 -	option timezone	UTC
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/diag.sh x86-uclibc-torvm/package/base-files/files/etc/diag.sh
---- x86-uclibc-orig/package/base-files/files/etc/diag.sh	2007-05-10 19:19:23.337706000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/diag.sh	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/diag.sh kamikaze-mod/package/base-files/files/etc/diag.sh
+--- kamikaze-orig/package/base-files/files/etc/diag.sh	2007-05-10 19:19:23.337706000 +0000
++++ kamikaze-mod/package/base-files/files/etc/diag.sh	1970-01-01 00:00:00.000000000 +0000
 @@ -1,4 +0,0 @@
 -#!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
 -
 -set_state() :
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/functions.sh x86-uclibc-torvm/package/base-files/files/etc/functions.sh
---- x86-uclibc-orig/package/base-files/files/etc/functions.sh	2008-02-05 01:47:47.130132000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/functions.sh	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/functions.sh kamikaze-mod/package/base-files/files/etc/functions.sh
+--- kamikaze-orig/package/base-files/files/etc/functions.sh	2008-02-05 01:47:47.130132000 +0000
++++ kamikaze-mod/package/base-files/files/etc/functions.sh	1970-01-01 00:00:00.000000000 +0000
 @@ -1,211 +0,0 @@
 -#!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
@@ -448,16 +448,16 @@
 -)}
 -
 -[ -z "$IPKG_INSTROOT" -a -f /lib/config/uci.sh ] && . /lib/config/uci.sh
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/hotplug.d/iface/00-netstate x86-uclibc-torvm/package/base-files/files/etc/hotplug.d/iface/00-netstate
---- x86-uclibc-orig/package/base-files/files/etc/hotplug.d/iface/00-netstate	2008-02-03 06:48:15.292457000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/hotplug.d/iface/00-netstate	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/hotplug.d/iface/00-netstate kamikaze-mod/package/base-files/files/etc/hotplug.d/iface/00-netstate
+--- kamikaze-orig/package/base-files/files/etc/hotplug.d/iface/00-netstate	2008-02-03 06:48:15.292457000 +0000
++++ kamikaze-mod/package/base-files/files/etc/hotplug.d/iface/00-netstate	1970-01-01 00:00:00.000000000 +0000
 @@ -1,3 +0,0 @@
 -[ ifup = "$ACTION" ] && {
 -	uci_set_state network "$INTERFACE" up 1 
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/hotplug.d/iface/10-routes x86-uclibc-torvm/package/base-files/files/etc/hotplug.d/iface/10-routes
---- x86-uclibc-orig/package/base-files/files/etc/hotplug.d/iface/10-routes	2008-06-06 18:49:23.308519000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/hotplug.d/iface/10-routes	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/hotplug.d/iface/10-routes kamikaze-mod/package/base-files/files/etc/hotplug.d/iface/10-routes
+--- kamikaze-orig/package/base-files/files/etc/hotplug.d/iface/10-routes	2008-06-06 18:49:23.308519000 +0000
++++ kamikaze-mod/package/base-files/files/etc/hotplug.d/iface/10-routes	1970-01-01 00:00:00.000000000 +0000
 @@ -1,67 +0,0 @@
 -add_route() {
 -	local config="$1"
@@ -526,9 +526,9 @@
 -		config_foreach "add_route6" route6
 -	;;
 -esac
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/hotplug.d/net/10-net x86-uclibc-torvm/package/base-files/files/etc/hotplug.d/net/10-net
---- x86-uclibc-orig/package/base-files/files/etc/hotplug.d/net/10-net	2007-03-04 04:41:46.644094000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/hotplug.d/net/10-net	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/hotplug.d/net/10-net kamikaze-mod/package/base-files/files/etc/hotplug.d/net/10-net
+--- kamikaze-orig/package/base-files/files/etc/hotplug.d/net/10-net	2007-03-04 04:41:46.644094000 +0000
++++ kamikaze-mod/package/base-files/files/etc/hotplug.d/net/10-net	1970-01-01 00:00:00.000000000 +0000
 @@ -1,40 +0,0 @@
 -# Copyright (C) 2006 OpenWrt.org
 -
@@ -570,9 +570,9 @@
 -		addif
 -	;;
 -esac
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/hotplug.d/usb/10-usb-storage x86-uclibc-torvm/package/base-files/files/etc/hotplug.d/usb/10-usb-storage
---- x86-uclibc-orig/package/base-files/files/etc/hotplug.d/usb/10-usb-storage	2007-06-20 22:05:15.338323000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/hotplug.d/usb/10-usb-storage	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/hotplug.d/usb/10-usb-storage kamikaze-mod/package/base-files/files/etc/hotplug.d/usb/10-usb-storage
+--- kamikaze-orig/package/base-files/files/etc/hotplug.d/usb/10-usb-storage	2007-06-20 22:05:15.338323000 +0000
++++ kamikaze-mod/package/base-files/files/etc/hotplug.d/usb/10-usb-storage	1970-01-01 00:00:00.000000000 +0000
 @@ -1,13 +0,0 @@
 -#!/bin/sh
 -
@@ -587,9 +587,9 @@
 -		;;
 -esac	
 -		
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/hotplug2-common.rules x86-uclibc-torvm/package/base-files/files/etc/hotplug2-common.rules
---- x86-uclibc-orig/package/base-files/files/etc/hotplug2-common.rules	2008-01-26 03:16:11.438222000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/hotplug2-common.rules	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/hotplug2-common.rules kamikaze-mod/package/base-files/files/etc/hotplug2-common.rules
+--- kamikaze-orig/package/base-files/files/etc/hotplug2-common.rules	2008-01-26 03:16:11.438222000 +0000
++++ kamikaze-mod/package/base-files/files/etc/hotplug2-common.rules	1970-01-01 00:00:00.000000000 +0000
 @@ -1,35 +0,0 @@
 -
 -DEVICENAME ~~ (null|full|ptmx|tty|zero|gpio) {
@@ -626,18 +626,18 @@
 -	exec /sbin/hotplug-call firmware;
 -	next
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/hotplug2-init.rules x86-uclibc-torvm/package/base-files/files/etc/hotplug2-init.rules
---- x86-uclibc-orig/package/base-files/files/etc/hotplug2-init.rules	2007-12-01 17:08:04.802538000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/hotplug2-init.rules	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/hotplug2-init.rules kamikaze-mod/package/base-files/files/etc/hotplug2-init.rules
+--- kamikaze-orig/package/base-files/files/etc/hotplug2-init.rules	2007-12-01 17:08:04.802538000 +0000
++++ kamikaze-mod/package/base-files/files/etc/hotplug2-init.rules	1970-01-01 00:00:00.000000000 +0000
 @@ -1,5 +0,0 @@
 -$include /etc/hotplug2-common.rules
 -
 -SUBSYSTEM ~~ button {
 -	exec kill -USR1 1 ;
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/init.d/boot x86-uclibc-torvm/package/base-files/files/etc/init.d/boot
---- x86-uclibc-orig/package/base-files/files/etc/init.d/boot	2008-06-16 19:37:00.739972000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/init.d/boot	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/init.d/boot kamikaze-mod/package/base-files/files/etc/init.d/boot
+--- kamikaze-orig/package/base-files/files/etc/init.d/boot	2008-06-16 19:37:00.739972000 +0000
++++ kamikaze-mod/package/base-files/files/etc/init.d/boot	1970-01-01 00:00:00.000000000 +0000
 @@ -1,66 +0,0 @@
 -#!/bin/sh /etc/rc.common
 -# Copyright (C) 2006 OpenWrt.org
@@ -705,9 +705,9 @@
 -
 -	load_modules /etc/modules.d/*
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/init.d/done x86-uclibc-torvm/package/base-files/files/etc/init.d/done
---- x86-uclibc-orig/package/base-files/files/etc/init.d/done	2007-05-10 14:37:47.286148000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/init.d/done	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/init.d/done kamikaze-mod/package/base-files/files/etc/init.d/done
+--- kamikaze-orig/package/base-files/files/etc/init.d/done	2007-05-10 14:37:47.286148000 +0000
++++ kamikaze-mod/package/base-files/files/etc/init.d/done	1970-01-01 00:00:00.000000000 +0000
 @@ -1,15 +0,0 @@
 -#!/bin/sh /etc/rc.common
 -# Copyright (C) 2006 OpenWrt.org
@@ -724,9 +724,9 @@
 -	. /etc/diag.sh
 -	set_state done
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/init.d/fstab x86-uclibc-torvm/package/base-files/files/etc/init.d/fstab
---- x86-uclibc-orig/package/base-files/files/etc/init.d/fstab	2008-05-20 19:02:19.166035000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/init.d/fstab	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/init.d/fstab kamikaze-mod/package/base-files/files/etc/init.d/fstab
+--- kamikaze-orig/package/base-files/files/etc/init.d/fstab	2008-05-20 19:02:19.166035000 +0000
++++ kamikaze-mod/package/base-files/files/etc/init.d/fstab	1970-01-01 00:00:00.000000000 +0000
 @@ -1,66 +0,0 @@
 -#!/bin/sh /etc/rc.common
 -# Copyright (C) 2007 OpenWrt.org
@@ -794,9 +794,9 @@
 -	config_foreach do_swapoff swap
 -}
 -
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/init.d/network x86-uclibc-torvm/package/base-files/files/etc/init.d/network
---- x86-uclibc-orig/package/base-files/files/etc/init.d/network	2008-04-15 16:29:49.167688000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/init.d/network	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/init.d/network kamikaze-mod/package/base-files/files/etc/init.d/network
+--- kamikaze-orig/package/base-files/files/etc/init.d/network	2008-04-15 16:29:49.167688000 +0000
++++ kamikaze-mod/package/base-files/files/etc/init.d/network	1970-01-01 00:00:00.000000000 +0000
 @@ -1,33 +0,0 @@
 -#!/bin/sh /etc/rc.common
 -# Copyright (C) 2006 OpenWrt.org
@@ -831,9 +831,9 @@
 -stop() {
 -	ifdown -a
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/init.d/rcS x86-uclibc-torvm/package/base-files/files/etc/init.d/rcS
---- x86-uclibc-orig/package/base-files/files/etc/init.d/rcS	2007-11-28 02:36:14.270663000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/init.d/rcS	2008-07-09 02:23:09.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/init.d/rcS kamikaze-mod/package/base-files/files/etc/init.d/rcS
+--- kamikaze-orig/package/base-files/files/etc/init.d/rcS	2007-11-28 02:36:14.270663000 +0000
++++ kamikaze-mod/package/base-files/files/etc/init.d/rcS	2008-07-25 11:32:02.094188683 +0000
 @@ -1,8 +1,2 @@
  #!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
@@ -844,9 +844,9 @@
 -	done 
 -} | logger -s -p 6 -t '' &
 +exit 0
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/init.d/sysctl x86-uclibc-torvm/package/base-files/files/etc/init.d/sysctl
---- x86-uclibc-orig/package/base-files/files/etc/init.d/sysctl	2007-05-10 10:07:38.965405000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/init.d/sysctl	2008-07-09 02:23:09.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/init.d/sysctl kamikaze-mod/package/base-files/files/etc/init.d/sysctl
+--- kamikaze-orig/package/base-files/files/etc/init.d/sysctl	2007-05-10 10:07:38.965405000 +0000
++++ kamikaze-mod/package/base-files/files/etc/init.d/sysctl	2008-07-25 11:32:02.094188683 +0000
 @@ -1,7 +1,2 @@
 -#!/bin/sh /etc/rc.common
 -# Copyright (C) 2006 OpenWrt.org 
@@ -857,9 +857,9 @@
 -}
 +#!/bin/sh
 +[ -f /etc/sysctl.conf ] && sysctl -p >&-
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/init.d/umount x86-uclibc-torvm/package/base-files/files/etc/init.d/umount
---- x86-uclibc-orig/package/base-files/files/etc/init.d/umount	2007-05-10 10:45:04.317089000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/init.d/umount	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/init.d/umount kamikaze-mod/package/base-files/files/etc/init.d/umount
+--- kamikaze-orig/package/base-files/files/etc/init.d/umount	2007-05-10 10:45:04.317089000 +0000
++++ kamikaze-mod/package/base-files/files/etc/init.d/umount	1970-01-01 00:00:00.000000000 +0000
 @@ -1,8 +0,0 @@
 -#!/bin/sh /etc/rc.common
 -# Copyright (C) 2006 OpenWrt.org 
@@ -869,9 +869,9 @@
 -	sync
 -	umount -a -r
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/init.d/usb x86-uclibc-torvm/package/base-files/files/etc/init.d/usb
---- x86-uclibc-orig/package/base-files/files/etc/init.d/usb	2007-04-06 16:07:36.852022000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/init.d/usb	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/init.d/usb kamikaze-mod/package/base-files/files/etc/init.d/usb
+--- kamikaze-orig/package/base-files/files/etc/init.d/usb	2007-04-06 16:07:36.852022000 +0000
++++ kamikaze-mod/package/base-files/files/etc/init.d/usb	1970-01-01 00:00:00.000000000 +0000
 @@ -1,9 +0,0 @@
 -#!/bin/sh /etc/rc.common
 -# Copyright (C) 2006 OpenWrt.org 
@@ -882,9 +882,9 @@
 -		/bin/mount -t usbfs none /proc/bus/usb
 -	}		
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/init.d/watchdog x86-uclibc-torvm/package/base-files/files/etc/init.d/watchdog
---- x86-uclibc-orig/package/base-files/files/etc/init.d/watchdog	2008-04-03 21:01:16.263826000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/init.d/watchdog	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/init.d/watchdog kamikaze-mod/package/base-files/files/etc/init.d/watchdog
+--- kamikaze-orig/package/base-files/files/etc/init.d/watchdog	2008-04-03 21:01:16.263826000 +0000
++++ kamikaze-mod/package/base-files/files/etc/init.d/watchdog	1970-01-01 00:00:00.000000000 +0000
 @@ -1,7 +0,0 @@
 -#!/bin/sh /etc/rc.common
 -# Copyright (C) 2008 OpenWrt.org
@@ -893,28 +893,31 @@
 -start() {
 -        [ -c /dev/watchdog ] && watchdog -t 5 /dev/watchdog
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/inittab x86-uclibc-torvm/package/base-files/files/etc/inittab
---- x86-uclibc-orig/package/base-files/files/etc/inittab	2007-05-10 14:50:42.865525000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/inittab	2008-07-09 04:02:36.868453139 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/inittab kamikaze-mod/package/base-files/files/etc/inittab
+--- kamikaze-orig/package/base-files/files/etc/inittab	2007-05-10 14:50:42.865525000 +0000
++++ kamikaze-mod/package/base-files/files/etc/inittab	2008-07-25 11:32:02.094188683 +0000
 @@ -1,5 +1,3 @@
  ::sysinit:/etc/init.d/rcS S boot
  ::shutdown:/etc/init.d/rcS K stop
 -tts/0::askfirst:/bin/ash --login
 -ttyS0::askfirst:/bin/ash --login
  tty1::askfirst:/bin/ash --login
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/ipkg.conf x86-uclibc-torvm/package/base-files/files/etc/ipkg.conf
---- x86-uclibc-orig/package/base-files/files/etc/ipkg.conf	2008-02-29 02:41:39.429442000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/ipkg.conf	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/ipkg.conf kamikaze-mod/package/base-files/files/etc/ipkg.conf
+--- kamikaze-orig/package/base-files/files/etc/ipkg.conf	2008-02-29 02:41:39.429442000 +0000
++++ kamikaze-mod/package/base-files/files/etc/ipkg.conf	1970-01-01 00:00:00.000000000 +0000
 @@ -1,3 +0,0 @@
 -src snapshots http://downloads.openwrt.org/snapshots/$S/packages
 -dest root /
 -dest ram /tmp
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/preinit x86-uclibc-torvm/package/base-files/files/etc/preinit
---- x86-uclibc-orig/package/base-files/files/etc/preinit	2008-04-23 16:20:46.084166000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/preinit	2008-07-09 04:08:34.418417829 +0000
-@@ -1,92 +1,78 @@
+diff -Naur kamikaze-orig/package/base-files/files/etc/preinit kamikaze-mod/package/base-files/files/etc/preinit
+--- kamikaze-orig/package/base-files/files/etc/preinit	2008-04-23 16:20:46.084166000 +0000
++++ kamikaze-mod/package/base-files/files/etc/preinit	2008-07-25 12:35:53.673800071 +0000
+@@ -1,92 +1,127 @@
  #!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
++# Copyright (C) 2008  The Tor Project, Inc.
++# See LICENSE file for rights and terms.
++
  export PATH=/bin:/sbin:/usr/bin:/usr/sbin
 -. /etc/diag.sh
  
@@ -981,6 +984,18 @@
  
  mkdir -p /dev/pts /dev/shm
  mount devpts /dev/pts -t devpts
++hddev=/dev/hda1
++hdopt="b 3 1"
++if [ ! -e $hddev ]; then
++  grep `basename $hddev` /proc/partitions >/dev/null 2>&1
++  if [ $? -eq 0 ]; then
++    mknod $hddev $hdopt
++  fi
++fi
++mkdir /home
++if [ -e $hddev ]; then
++  mount $hddev /home
++fi
  
 -# the shell really doesn't like having stdin/out closed
 -# that's why we use /dev/pty/m0 and m1 as replacement
@@ -989,11 +1004,72 @@
 -	M0=/dev/console
 -	M1=/dev/console
 -}
--
--exec <$M0 >$M1 2>&0
++mkdir -p /var/run
++mkdir -p /var/log
++mkdir -p /var/lock
++mkdir -p /var/state
++touch /var/log/wtmp
++touch /var/log/lastlog
++ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
++
++/etc/init.d/sysctl
++
++ifconfig lo 127.0.0.1 netmask 255.0.0.0 up
++
++# setup various runtime options using kernel parameters
++ARGS=`cat /proc/cmdline`
++ARGS="_ $ARGS _"
++
 +# XXX need a good way to set this flexibly...
-+echo 'PST8PDT,M3.2.0/2,M11.1.0/2' > /etc/TZ
++TZ='PST8PDT,M3.2.0/2,M11.1.0/2'
++echo $ARGS | grep ' TZ=' >/dev/null 2>&1
++if [ $? -eq 0 ]; then
++  TZ=`echo $ARGS | sed 's/.* TZ=//' | sed 's/ .*//'`
++fi
++echo $TZ > /etc/TZ
++
++PRIVIP=10.99.11.1
++echo $ARGS | grep ' PRIVIP=' >/dev/null 2>&1
++if [ $? -eq 0 ]; then
++  PRIVIP=`echo $ARGS | sed 's/.* PRIVIP=//' | sed 's/ .*//'`
++fi
++grep eth1: /proc/net/dev >/dev/null 2>&1
++if [ $? -eq 0 ]; then
++  ifconfig eth1 $PRIVIP netmask 255.255.255.252 up
++fi
  
+-exec <$M0 >$M1 2>&0
++# if we're passed IP/routing info then do network pivot, otherwise just use dhcp
++netup=0
++echo $ARGS | grep ' IP=' >/dev/null 2>&1
++if [ $? -eq 0 ]; then
++  IP=`echo $ARGS | sed 's/.* IP=//' | sed 's/ .*//'`
++  MASK=`echo $ARGS | sed 's/.* MASK=//' | sed 's/ .*//'`
++  GW=`echo $ARGS | sed 's/.* GW=//' | sed 's/ .*//'`
++  MAC=`echo $ARGS | sed 's/.* MAC=//' | sed 's/ .*//'`
++  dn "Setting IP $IP / $MASK via $GW ..."
++  ifconfig eth0 hw ether $MAC
++  ifconfig eth0 $IP netmask $MASK up
++  route add default gw $GW
++  netup=1
++else
++  # dhcp for address
++  dn "Trying to get DHCP lease ..."
++  udhcpc -b -i eth0 -p /var/run/dhcp.eth0.pid >/dev/null 2>&1 &
++  maxrt=20
++  while [ $maxrt -gt 0 ]; do
++    sleep 1
++    ifconfig eth0 | grep 'inet addr:' >/dev/null 2>&1
++    if [ $? -eq 0 ]; then
++      netup=1
++      maxrt=0
++    else
++      echo -n "."
++      maxrt=$(expr $maxrt - 1)
++    fi
++  done
++fi
+ 
 -echo "- preinit -"
 -trap 'FAILSAFE=true' USR1
 -[ -e /etc/preinit.arch ] && . /etc/preinit.arch
@@ -1017,34 +1093,6 @@
 -	
 -	killall hotplug2
 -	exec /sbin/init
-+mkdir -p /var/run
-+mkdir -p /var/log
-+mkdir -p /var/lock
-+mkdir -p /var/state
-+touch /var/log/wtmp
-+touch /var/log/lastlog
-+ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
-+
-+/etc/init.d/sysctl
-+
-+ifconfig lo 127.0.0.1 netmask 255.0.0.0 up
-+
-+dn "Trying to get DHCP lease ... "
-+udhcpc -b -i eth0 -p /var/run/dhcp.eth0.pid >/dev/null 2>&1 &
-+netup=0
-+maxrt=20
-+while [ $maxrt -gt 0 ]; do
-+  sleep 1
-+  ifconfig eth0 | grep 'inet addr:' >/dev/null 2>&1
-+  if [ $? -eq 0 ]; then
-+    netup=1
-+    maxrt=0
-+  else
-+    echo -n "."
-+    maxrt=$(expr $maxrt - 1)
-+  fi
-+done
-+
 +if [ $netup -eq 0 ]; then
 +  echo " FAILED."
 +  d "ERROR: Unable to get an IP address."
@@ -1059,9 +1107,9 @@
 +  d "Run /etc/init.d/tor status"
 +  d " for bootstrap status."
  fi
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/rc.common x86-uclibc-torvm/package/base-files/files/etc/rc.common
---- x86-uclibc-orig/package/base-files/files/etc/rc.common	2008-01-25 10:59:40.292163000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/rc.common	2008-07-09 02:23:09.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/rc.common kamikaze-mod/package/base-files/files/etc/rc.common
+--- kamikaze-orig/package/base-files/files/etc/rc.common	2008-01-25 10:59:40.292163000 +0000
++++ kamikaze-mod/package/base-files/files/etc/rc.common	2008-07-25 11:32:02.094188683 +0000
 @@ -1,92 +1,4 @@
  #!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
@@ -1158,9 +1206,9 @@
 +# forcibly disable the usual init process
 +# all start/stop activity is controlled by the TorVM controller.
 +exit 0
-diff -Naur x86-uclibc-orig/package/base-files/files/etc/sysctl.conf x86-uclibc-torvm/package/base-files/files/etc/sysctl.conf
---- x86-uclibc-orig/package/base-files/files/etc/sysctl.conf	2007-10-24 18:44:07.273843000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/etc/sysctl.conf	2008-07-09 02:23:09.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/etc/sysctl.conf kamikaze-mod/package/base-files/files/etc/sysctl.conf
+--- kamikaze-orig/package/base-files/files/etc/sysctl.conf	2007-10-24 18:44:07.273843000 +0000
++++ kamikaze-mod/package/base-files/files/etc/sysctl.conf	2008-07-25 11:32:02.094188683 +0000
 @@ -1,14 +1,10 @@
  kernel.panic=3
 -net.ipv4.conf.default.arp_ignore=1
@@ -1179,9 +1227,9 @@
 -net.ipv6.conf.all.forwarding=1
 +net.ipv4.netfilter.ip_conntrack_udp_timeout=600
 +net.ipv4.netfilter.ip_conntrack_udp_timeout_stream=600
-diff -Naur x86-uclibc-orig/package/base-files/files/lib/config/parse_spec.awk x86-uclibc-torvm/package/base-files/files/lib/config/parse_spec.awk
---- x86-uclibc-orig/package/base-files/files/lib/config/parse_spec.awk	2007-03-04 04:41:46.644094000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/lib/config/parse_spec.awk	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/lib/config/parse_spec.awk kamikaze-mod/package/base-files/files/lib/config/parse_spec.awk
+--- kamikaze-orig/package/base-files/files/lib/config/parse_spec.awk	2007-03-04 04:41:46.644094000 +0000
++++ kamikaze-mod/package/base-files/files/lib/config/parse_spec.awk	1970-01-01 00:00:00.000000000 +0000
 @@ -1,255 +0,0 @@
 -# AWK file for parsing uci specification files
 -#
@@ -1438,9 +1486,9 @@
 -		section=""
 -	}
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/lib/config/specs/network.spec x86-uclibc-torvm/package/base-files/files/lib/config/specs/network.spec
---- x86-uclibc-orig/package/base-files/files/lib/config/specs/network.spec	2007-03-04 04:41:46.644094000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/lib/config/specs/network.spec	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/lib/config/specs/network.spec kamikaze-mod/package/base-files/files/lib/config/specs/network.spec
+--- kamikaze-orig/package/base-files/files/lib/config/specs/network.spec	2007-03-04 04:41:46.644094000 +0000
++++ kamikaze-mod/package/base-files/files/lib/config/specs/network.spec	1970-01-01 00:00:00.000000000 +0000
 @@ -1,7 +0,0 @@
 -interface[] {
 -	proto: string, required;
@@ -1449,9 +1497,9 @@
 -	gateway: ip;
 -	dns: ip;
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/lib/config/template.awk x86-uclibc-torvm/package/base-files/files/lib/config/template.awk
---- x86-uclibc-orig/package/base-files/files/lib/config/template.awk	2007-03-04 04:41:46.644094000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/lib/config/template.awk	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/lib/config/template.awk kamikaze-mod/package/base-files/files/lib/config/template.awk
+--- kamikaze-orig/package/base-files/files/lib/config/template.awk	2007-03-04 04:41:46.644094000 +0000
++++ kamikaze-mod/package/base-files/files/lib/config/template.awk	1970-01-01 00:00:00.000000000 +0000
 @@ -1,42 +0,0 @@
 -# Copyright (C) 2006 OpenWrt.org
 -
@@ -1495,9 +1543,9 @@
 -	if_open = 0
 -	noprint = 0
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/lib/config/validate.sh x86-uclibc-torvm/package/base-files/files/lib/config/validate.sh
---- x86-uclibc-orig/package/base-files/files/lib/config/validate.sh	2007-03-04 04:41:46.644094000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/lib/config/validate.sh	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/lib/config/validate.sh kamikaze-mod/package/base-files/files/lib/config/validate.sh
+--- kamikaze-orig/package/base-files/files/lib/config/validate.sh	2007-03-04 04:41:46.644094000 +0000
++++ kamikaze-mod/package/base-files/files/lib/config/validate.sh	1970-01-01 00:00:00.000000000 +0000
 @@ -1,74 +0,0 @@
 -# Shell script defining validating configuration macros
 -#
@@ -1573,9 +1621,9 @@
 -
 -	return ${VALIDATE_RES:-0}
 -)}
-diff -Naur x86-uclibc-orig/package/base-files/files/lib/config/validate_config.awk x86-uclibc-torvm/package/base-files/files/lib/config/validate_config.awk
---- x86-uclibc-orig/package/base-files/files/lib/config/validate_config.awk	2007-03-04 04:41:46.644094000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/lib/config/validate_config.awk	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/lib/config/validate_config.awk kamikaze-mod/package/base-files/files/lib/config/validate_config.awk
+--- kamikaze-orig/package/base-files/files/lib/config/validate_config.awk	2007-03-04 04:41:46.644094000 +0000
++++ kamikaze-mod/package/base-files/files/lib/config/validate_config.awk	1970-01-01 00:00:00.000000000 +0000
 @@ -1,105 +0,0 @@
 -# AWK file for validating uci specification files
 -#
@@ -1682,9 +1730,9 @@
 -	return valid
 -}
 -
-diff -Naur x86-uclibc-orig/package/base-files/files/lib/config/validate_spec.awk x86-uclibc-torvm/package/base-files/files/lib/config/validate_spec.awk
---- x86-uclibc-orig/package/base-files/files/lib/config/validate_spec.awk	2007-03-04 04:41:46.644094000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/lib/config/validate_spec.awk	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/lib/config/validate_spec.awk kamikaze-mod/package/base-files/files/lib/config/validate_spec.awk
+--- kamikaze-orig/package/base-files/files/lib/config/validate_spec.awk	2007-03-04 04:41:46.644094000 +0000
++++ kamikaze-mod/package/base-files/files/lib/config/validate_spec.awk	1970-01-01 00:00:00.000000000 +0000
 @@ -1,171 +0,0 @@
 -# AWK file for validating uci specification files
 -#
@@ -1857,9 +1905,9 @@
 -END {
 -	validate_config()
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/lib/network/config.sh x86-uclibc-torvm/package/base-files/files/lib/network/config.sh
---- x86-uclibc-orig/package/base-files/files/lib/network/config.sh	2008-04-07 16:02:50.405821000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/lib/network/config.sh	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/lib/network/config.sh kamikaze-mod/package/base-files/files/lib/network/config.sh
+--- kamikaze-orig/package/base-files/files/lib/network/config.sh	2008-04-07 16:02:50.405821000 +0000
++++ kamikaze-mod/package/base-files/files/lib/network/config.sh	1970-01-01 00:00:00.000000000 +0000
 @@ -1,228 +0,0 @@
 -#!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
@@ -2089,9 +2137,9 @@
 -		done
 -	}
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/lib/upgrade/common.sh x86-uclibc-torvm/package/base-files/files/lib/upgrade/common.sh
---- x86-uclibc-orig/package/base-files/files/lib/upgrade/common.sh	2008-06-04 23:20:56.755507000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/lib/upgrade/common.sh	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/lib/upgrade/common.sh kamikaze-mod/package/base-files/files/lib/upgrade/common.sh
+--- kamikaze-orig/package/base-files/files/lib/upgrade/common.sh	2008-06-04 23:20:56.755507000 +0000
++++ kamikaze-mod/package/base-files/files/lib/upgrade/common.sh	1970-01-01 00:00:00.000000000 +0000
 @@ -1,151 +0,0 @@
 -#!/bin/sh
 -
@@ -2244,16 +2292,16 @@
 -	}
 -	ask_bool 1 "Reboot" && reboot
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/rom/note x86-uclibc-torvm/package/base-files/files/rom/note
---- x86-uclibc-orig/package/base-files/files/rom/note	2005-07-17 22:52:59.000000000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/rom/note	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/rom/note kamikaze-mod/package/base-files/files/rom/note
+--- kamikaze-orig/package/base-files/files/rom/note	2005-07-17 22:52:59.000000000 +0000
++++ kamikaze-mod/package/base-files/files/rom/note	1970-01-01 00:00:00.000000000 +0000
 @@ -1,3 +0,0 @@
 -SQUASHFS USERS:
 -After firstboot has been run, / will be jffs2 and /rom will be squashfs
 -(* except when in failsafe)
-diff -Naur x86-uclibc-orig/package/base-files/files/sbin/hotplug-call x86-uclibc-torvm/package/base-files/files/sbin/hotplug-call
---- x86-uclibc-orig/package/base-files/files/sbin/hotplug-call	2007-06-15 16:07:09.574671000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/sbin/hotplug-call	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/sbin/hotplug-call kamikaze-mod/package/base-files/files/sbin/hotplug-call
+--- kamikaze-orig/package/base-files/files/sbin/hotplug-call	2007-06-15 16:07:09.574671000 +0000
++++ kamikaze-mod/package/base-files/files/sbin/hotplug-call	1970-01-01 00:00:00.000000000 +0000
 @@ -1,28 +0,0 @@
 -#!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
@@ -2283,9 +2331,9 @@
 -		[ -f $script ] && . $script
 -	); done
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/sbin/ifdown x86-uclibc-torvm/package/base-files/files/sbin/ifdown
---- x86-uclibc-orig/package/base-files/files/sbin/ifdown	2008-02-03 06:48:15.292457000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/sbin/ifdown	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/sbin/ifdown kamikaze-mod/package/base-files/files/sbin/ifdown
+--- kamikaze-orig/package/base-files/files/sbin/ifdown	2008-02-03 06:48:15.292457000 +0000
++++ kamikaze-mod/package/base-files/files/sbin/ifdown	1970-01-01 00:00:00.000000000 +0000
 @@ -1,66 +0,0 @@
 -#!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
@@ -2353,9 +2401,9 @@
 -config_get iftype "$cfg" type
 -[ "bridge" = "$iftype" ] && brctl delbr "$ifname" >/dev/null 2>/dev/null
 -
-diff -Naur x86-uclibc-orig/package/base-files/files/sbin/ifup x86-uclibc-torvm/package/base-files/files/sbin/ifup
---- x86-uclibc-orig/package/base-files/files/sbin/ifup	2006-10-24 23:59:08.851426000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/sbin/ifup	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/sbin/ifup kamikaze-mod/package/base-files/files/sbin/ifup
+--- kamikaze-orig/package/base-files/files/sbin/ifup	2006-10-24 23:59:08.851426000 +0000
++++ kamikaze-mod/package/base-files/files/sbin/ifup	1970-01-01 00:00:00.000000000 +0000
 @@ -1,11 +0,0 @@
 -#!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
@@ -2368,9 +2416,9 @@
 -for dev in $ifname; do
 -	setup_interface "$dev" "$1"
 -done
-diff -Naur x86-uclibc-orig/package/base-files/files/sbin/mount_root x86-uclibc-torvm/package/base-files/files/sbin/mount_root
---- x86-uclibc-orig/package/base-files/files/sbin/mount_root	2007-05-31 12:09:08.638373000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/sbin/mount_root	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/sbin/mount_root kamikaze-mod/package/base-files/files/sbin/mount_root
+--- kamikaze-orig/package/base-files/files/sbin/mount_root	2007-05-31 12:09:08.638373000 +0000
++++ kamikaze-mod/package/base-files/files/sbin/mount_root	1970-01-01 00:00:00.000000000 +0000
 @@ -1,25 +0,0 @@
 -#!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
@@ -2397,9 +2445,9 @@
 -	mtd unlock rootfs
 -	mount -o remount,rw /dev/root /
 -}
-diff -Naur x86-uclibc-orig/package/base-files/files/sbin/sysupgrade x86-uclibc-torvm/package/base-files/files/sbin/sysupgrade
---- x86-uclibc-orig/package/base-files/files/sbin/sysupgrade	2007-08-21 18:23:57.703561000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/sbin/sysupgrade	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/sbin/sysupgrade kamikaze-mod/package/base-files/files/sbin/sysupgrade
+--- kamikaze-orig/package/base-files/files/sbin/sysupgrade	2007-08-21 18:23:57.703561000 +0000
++++ kamikaze-mod/package/base-files/files/sbin/sysupgrade	1970-01-01 00:00:00.000000000 +0000
 @@ -1,92 +0,0 @@
 -#!/bin/sh
 -. /etc/functions.sh
@@ -2493,9 +2541,9 @@
 -
 -v "Switching to ramdisk..."
 -run_ramfs '. /etc/functions.sh; include /lib/upgrade; do_upgrade'
-diff -Naur x86-uclibc-orig/package/base-files/files/sbin/usb-storage x86-uclibc-torvm/package/base-files/files/sbin/usb-storage
---- x86-uclibc-orig/package/base-files/files/sbin/usb-storage	2007-11-04 15:12:08.860897000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/sbin/usb-storage	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/sbin/usb-storage kamikaze-mod/package/base-files/files/sbin/usb-storage
+--- kamikaze-orig/package/base-files/files/sbin/usb-storage	2007-11-04 15:12:08.860897000 +0000
++++ kamikaze-mod/package/base-files/files/sbin/usb-storage	1970-01-01 00:00:00.000000000 +0000
 @@ -1,28 +0,0 @@
 -#!/bin/sh
 -
@@ -2525,9 +2573,9 @@
 -	sleep 1
 -done
 -
-diff -Naur x86-uclibc-orig/package/base-files/files/sbin/wifi x86-uclibc-torvm/package/base-files/files/sbin/wifi
---- x86-uclibc-orig/package/base-files/files/sbin/wifi	2008-02-03 06:48:15.292457000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/sbin/wifi	1970-01-01 00:00:00.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/sbin/wifi kamikaze-mod/package/base-files/files/sbin/wifi
+--- kamikaze-orig/package/base-files/files/sbin/wifi	2008-02-03 06:48:15.292457000 +0000
++++ kamikaze-mod/package/base-files/files/sbin/wifi	1970-01-01 00:00:00.000000000 +0000
 @@ -1,121 +0,0 @@
 -#!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
@@ -2650,9 +2698,9 @@
 -	detect) wifi_detect "$2";;
 -	*) wifi_updown "enable" "$2";;
 -esac
-diff -Naur x86-uclibc-orig/package/base-files/files/usr/share/udhcpc/default.script x86-uclibc-torvm/package/base-files/files/usr/share/udhcpc/default.script
---- x86-uclibc-orig/package/base-files/files/usr/share/udhcpc/default.script	2008-02-03 06:48:15.292457000 +0000
-+++ x86-uclibc-torvm/package/base-files/files/usr/share/udhcpc/default.script	2008-07-09 02:23:09.000000000 +0000
+diff -Naur kamikaze-orig/package/base-files/files/usr/share/udhcpc/default.script kamikaze-mod/package/base-files/files/usr/share/udhcpc/default.script
+--- kamikaze-orig/package/base-files/files/usr/share/udhcpc/default.script	2008-02-03 06:48:15.292457000 +0000
++++ kamikaze-mod/package/base-files/files/usr/share/udhcpc/default.script	2008-07-25 11:32:02.097534634 +0000
 @@ -1,33 +1,11 @@
  #!/bin/sh
  [ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1

Modified: torvm/trunk/build/win32/Makefile
===================================================================
--- torvm/trunk/build/win32/Makefile	2008-07-25 08:23:02 UTC (rev 16187)
+++ torvm/trunk/build/win32/Makefile	2008-07-25 11:17:31 UTC (rev 16188)
@@ -169,6 +169,7 @@
 	fi; \
 	cp files/autorun.inf files/install.bat $(ISODIR)/; \
 	cp files/hdd.img.gz $(ISODIR)/add/; \
+	cp files/run.bat $(ISODIR)/add/; \
 	gzip -d $(ISODIR)/add/hdd.img.gz; \
 	cp files/fstab $(ISODIR)/bin/; \
 	cp files/buildall.sh $(ISODIR)/dl/src; \

Modified: torvm/trunk/build/win32/files/autorun.inf
===================================================================
--- torvm/trunk/build/win32/files/autorun.inf	2008-07-25 08:23:02 UTC (rev 16187)
+++ torvm/trunk/build/win32/files/autorun.inf	2008-07-25 11:17:31 UTC (rev 16188)
@@ -1,2 +1,2 @@
-[autorun]
-open=install.bat
+[autorun]
+open=install.bat

Modified: torvm/trunk/build/win32/files/install.bat
===================================================================
--- torvm/trunk/build/win32/files/install.bat	2008-07-25 08:23:02 UTC (rev 16187)
+++ torvm/trunk/build/win32/files/install.bat	2008-07-25 11:17:31 UTC (rev 16188)
@@ -1,4 +1,3 @@
-REM
 set ISODRV=D:\
 set DDRV=C:\
 set DDIR=MinGW
@@ -30,16 +29,7 @@
 gzip -d *.gz
 cd /d %DDRV%
 cd %MDIR%\%MVER%
-bsdtar xvf dl\msysCORE-1.0.11-2007.01.19-1.tar
-bsdtar xvf dl\mingw-runtime-3.14.tar
-bsdtar xvf dl\bash-3.1-MSYS-1.0.11-1.tar
-bsdtar xvf dl\mingw32-make-3.81-20080326-3.tar
-bsdtar xvf dl\binutils-2.18.50-20080109-2.tar
-bsdtar xvf dl\diffutils-2.8.7-MSYS-1.0.11-1.tar
-bsdtar xvf dl\gcc-core-3.4.5-20060117-3.tar
-bsdtar xvf dl\gcc-g++-3.4.5-20060117-3.tar
-bsdtar xvf dl\libtool1.5-1.5.25a-1-bin.tar
-bsdtar xvf dl\w32api-3.11.tar
+for %%f in (dl\*.tar) do bsdtar xvf %%f
 cd /d %ISODRV%
 cd bin
 copy fstab %DDRV%%MDIR%\%MVER%\etc\

Added: torvm/trunk/build/win32/files/run.bat
===================================================================
--- torvm/trunk/build/win32/files/run.bat	                        (rev 0)
+++ torvm/trunk/build/win32/files/run.bat	2008-07-25 11:17:31 UTC (rev 16188)
@@ -0,0 +1,15 @@
+rem  Qemu Tor VM start script
+rem  Modify parameters for Qemu as desired.
+rem  Kernel parameters accepted via -append include:
+rem    TZ=<timezome>
+rem    PRIVIP=<tap32 IP address>
+rem    IP=<VM IP address>
+rem    MASK=<VM netmask>
+rem    GW=<default gateway>
+rem    MAC=<VM ethernet MAC address>
+rem
+SET MAC=00:11:22:33:44:55
+SET DEVICE="Local Area Connection"
+SET RAMSZ=32
+
+qemu.exe -name "Tor VM" -L . -kernel vmlinuz -append "quiet loglevel=1" -hda hdd.img -m %RAMSZ% -std-vga -net nic,vlan=0,model=pcnet,macaddr=%MAC% -net pcap,vlan=0,devicename="%DEVICE%"



More information about the tor-commits mailing list