[or-cvs] r18361: {torvm} Update basefiles patch for newer kamikaze revision. (torvm/trunk/build/kamikaze/patches)

coderman at seul.org coderman at seul.org
Sun Feb 1 10:11:14 UTC 2009


Author: coderman
Date: 2009-02-01 05:11:14 -0500 (Sun, 01 Feb 2009)
New Revision: 18361

Modified:
   torvm/trunk/build/kamikaze/patches/002-kamikaze-mod-basefiles.patch
Log:
Update basefiles patch for newer kamikaze revision.

Modified: torvm/trunk/build/kamikaze/patches/002-kamikaze-mod-basefiles.patch
===================================================================
--- torvm/trunk/build/kamikaze/patches/002-kamikaze-mod-basefiles.patch	2009-02-01 10:10:30 UTC (rev 18360)
+++ torvm/trunk/build/kamikaze/patches/002-kamikaze-mod-basefiles.patch	2009-02-01 10:11:14 UTC (rev 18361)
@@ -1,7 +1,7 @@
-diff -Naur orig-kamikaze/package/base-files/Makefile mod-basefiles-kamikaze/package/base-files/Makefile
---- orig-kamikaze/package/base-files/Makefile	2008-06-11 19:59:16.494753000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/Makefile	2008-10-03 00:31:58.158796852 +0000
-@@ -36,8 +36,8 @@
+diff -Naur a/package/base-files/Makefile b/package/base-files/Makefile
+--- a/package/base-files/Makefile	2009-01-26 19:46:12.339316000 +0000
++++ b/package/base-files/Makefile	2009-02-01 09:29:53.329466720 +0000
+@@ -39,8 +39,8 @@
    URL:=http://openwrt.org/
    VERSION:=$(PKG_RELEASE)-$(REVISION)
    $(call Config,network.lan.proto,string,static,LAN Protocol)
@@ -12,37 +12,338 @@
    $(call Config,network.lan.gateway,ip,,LAN Gateway)
    $(call Config,network.lan.dns,ip,,LAN DNS server)
  endef
-@@ -50,7 +50,6 @@
- /etc/passwd
- /etc/profile
- /etc/shells
--/etc/ipkg.conf
- /etc/sysctl.conf
- $(call $(TARGET)/conffiles)
- endef
-@@ -143,19 +142,14 @@
- 			$(CP) $(PLATFORM_SUBDIR)/base-files-$(PROFILE)/* $(1)/; \
- 		fi \
- 	)
--	$(SED) 's,$$$$R,$(REVISION),g' $(1)/etc/banner
--	$(SED) 's,$$$$S,$(BOARD),g' -e 's,$$$$A,$(ARCH),g' $(1)/etc/ipkg.conf
- 	mkdir -p $(1)/dev
- 	mkdir -p $(1)/etc/crontabs
--	mkdir -p $(1)/jffs
--	mkdir -p $(1)/lib/firmware
- 	mkdir -p $(1)/mnt
- 	mkdir -p $(1)/proc
- 	mkdir -p $(1)/tmp
- 	mkdir -p $(1)/usr/lib
- 	mkdir -p $(1)/usr/bin
- 	mkdir -p $(1)/sys
--	mkdir -p $(1)/www
- 	mkdir -p $(1)/root
- 	ln -sf /proc/mounts $(1)/etc/mtab
- 	rm -f $(1)/var
-diff -Naur orig-kamikaze/package/base-files/files/bin/entropy-update.sh mod-basefiles-kamikaze/package/base-files/files/bin/entropy-update.sh
---- orig-kamikaze/package/base-files/files/bin/entropy-update.sh	1970-01-01 00:00:00.000000000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/bin/entropy-update.sh	2008-10-03 00:31:58.161094180 +0000
+diff -Naur a/package/base-files/Makefile.orig b/package/base-files/Makefile.orig
+--- a/package/base-files/Makefile.orig	1970-01-01 00:00:00.000000000 +0000
++++ b/package/base-files/Makefile.orig	2009-01-26 19:46:12.339316000 +0000
+@@ -0,0 +1,269 @@
++#
++# Copyright (C) 2007 OpenWrt.org
++#
++# This is free software, licensed under the GNU General Public License v2.
++# See /LICENSE for more information.
++#
++# $Id: Makefile 14210 2009-01-26 19:46:12Z nbd $
++
++include $(TOPDIR)/rules.mk
++include $(INCLUDE_DIR)/kernel.mk
++
++PKG_NAME:=base-files
++PKG_RELEASE:=14
++
++PKG_FILE_DEPEND:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
++
++include $(INCLUDE_DIR)/package.mk
++
++ifneq ($(DUMP),1)
++  TARGET:=-$(BOARD)
++  ifneq ($(wildcard $(PLATFORM_DIR)/base-files-$(PROFILE) $(PLATFORM_SUBDIR)/base-files-$(PROFILE)),)
++    TARGET:=$(TARGET)-$(PROFILE)
++  endif
++  LIBGCC_VERSION:=$(GCC_VERSION)
++  ifeq ($(ARCH),x86_64)
++    LIB_SUFFIX:=64
++  endif
++else
++  LIBC_VERSION:=<LIBC_VERSION>
++  LIBGCC_VERSION:=<LIBGCC_VERSION>
++endif
++
++CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files)
++
++define Package/base-files$(TARGET)
++  SECTION:=base
++  CATEGORY:=Base system
++  TITLE:=Base filesystem for OpenWrt
++  URL:=http://openwrt.org/
++  VERSION:=$(PKG_RELEASE)-$(REVISION)
++  $(call Config,network.lan.proto,string,static,LAN Protocol)
++  $(call Config,network.lan.ipaddr,ip,192.168.1.1,LAN IP Address)
++  $(call Config,network.lan.netmask,netmask,255.255.255.0,LAN Network Mask)
++  $(call Config,network.lan.gateway,ip,,LAN Gateway)
++  $(call Config,network.lan.dns,ip,,LAN DNS server)
++endef
++
++define Package/base-files$(TARGET)/conffiles
++/etc/banner
++/etc/hosts
++/etc/inittab
++/etc/group
++/etc/passwd
++/etc/profile
++/etc/shells
++/etc/sysctl.conf
++$(call $(TARGET)/conffiles)
++endef
++
++define Package/base-files$(TARGET)/description
++ This package contains a base filesystem and system scripts for OpenWrt.
++endef
++
++define Package/gcc/Default
++  SECTION:=libs
++  CATEGORY:=Base system
++  DEPENDS:=@!NATIVE_TOOLCHAIN
++  URL:=http://gcc.gnu.org/
++  VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE)
++endef
++
++define Package/libgcc
++$(call Package/gcc/Default)
++  TITLE:=GCC support library
++  DEPENDS+=@!TARGET_avr32
++endef
++
++define Package/libssp
++$(call Package/gcc/Default)
++  DEPENDS+=@SSP_SUPPORT
++  TITLE:=GCC support library
++endef
++
++define Package/libstdcpp
++$(call Package/gcc/Default)
++  NAME:=libstdc++
++  TITLE:=GNU Standard C++ Library v3
++  DEPENDS+=@INSTALL_LIBSTDCPP
++endef
++
++define Package/libc/Default
++  SECTION:=libs
++  CATEGORY:=Base system
++  DEPENDS:=@!NATIVE_TOOLCHAIN
++  VERSION:=$(LIBC_VERSION)-$(PKG_RELEASE)
++  URL:=$(LIBC_URL)
++endef
++
++define Package/libc
++$(call Package/libc/Default)
++  TITLE:=C library
++endef
++
++define Package/libpthread
++$(call Package/libc/Default)
++  TITLE:=POSIX thread library
++  DEPENDS:= +librt
++endef
++
++define Package/librt
++$(call Package/libc/Default)
++  TITLE:=POSIX.1b RealTime extension library
++endef
++
++define Package/ldd
++$(call Package/uclibc/Default)
++  TITLE:=LDD trace utility
++endef
++
++define Package/ldconfig
++$(call Package/libc/Default)
++  TITLE:=Shared library path configuration
++endef
++
++
++define Build/Prepare
++	mkdir -p $(PKG_BUILD_DIR)
++endef
++
++define Build/Compile/Default
++endef
++
++define Build/Compile
++	$(call Build/Compile/Default)
++endef
++
++define Package/base-files$(TARGET)/install
++	$(CP) ./files/* $(1)/
++	if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \
++		$(CP) $(GENERIC_PLATFORM_DIR)/base-files/* $(1)/; \
++	fi
++	if [ -d $(PLATFORM_DIR)/base-files/. ]; then \
++		$(CP) $(PLATFORM_DIR)/base-files/* $(1)/; \
++	fi
++	if [ -d $(PLATFORM_DIR)/base-files-$(PROFILE)/. ]; then \
++		$(CP) $(PLATFORM_DIR)/base-files-$(PROFILE)/* $(1)/; \
++	fi
++	$(if $(filter-out $(PLATFORM_DIR),$(PLATFORM_SUBDIR)), \
++		if [ -d $(PLATFORM_SUBDIR)/base-files/. ]; then \
++			$(CP) $(PLATFORM_SUBDIR)/base-files/* $(1)/; \
++		fi; \
++		if [ -d $(PLATFORM_SUBDIR)/base-files-$(PROFILE)/. ]; then \
++			$(CP) $(PLATFORM_SUBDIR)/base-files-$(PROFILE)/* $(1)/; \
++		fi \
++	)
++# Form valid /etc/shadow entries, by copying the user:pw pairs
++# from /etc/passwd, and adding on pw change data
++	$(if $(CONFIG_BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS), \
++		cut -d ':' -f 1-2 $(1)/etc/passwd > $(1)/etc/shadow; \
++		$(SED) 's/$$$$/:13848:0:99999:7:::/' $(1)/etc/shadow \
++	)
++	$(SED) 's,$$$$R,$(REVISION),g' $(1)/etc/banner
++	mkdir -p $(1)/CONTROL
++	mkdir -p $(1)/dev
++	mkdir -p $(1)/etc/crontabs
++	mkdir -p $(1)/jffs
++	mkdir -p $(1)/lib/firmware
++	mkdir -p $(1)/mnt
++	mkdir -p $(1)/proc
++	mkdir -p $(1)/tmp
++	mkdir -p $(1)/usr/lib
++	mkdir -p $(1)/usr/bin
++	mkdir -p $(1)/sys
++	mkdir -p $(1)/www
++	mkdir -p $(1)/root
++	ln -sf /proc/mounts $(1)/etc/mtab
++	rm -f $(1)/var
++	ln -sf /tmp $(1)/var
++	mkdir -p $(1)/etc
++	ln -sf /tmp/resolv.conf /tmp/fstab /tmp/TZ $(1)/etc/
++	$(call Package/base-files/install-target,$(1))
++	for conffile in $(1)/etc/config/*; do \
++		if [ -f "$$$$conffile" ]; then \
++			grep "$$$$conffile" $(1)/CONTROL/conffiles || \
++				echo "$$$${conffile##$(1)}" >> $(1)/CONTROL/conffiles; \
++		fi \
++	done
++endef
++
++define Package/libgcc/install
++	$(INSTALL_DIR) $(1)/lib
++	$(CP) $(TOOLCHAIN_DIR)/lib$(LIB_SUFFIX)/libgcc_s.so.* $(1)/lib/
++endef
++
++define Package/libssp/install
++	$(INSTALL_DIR) $(1)/lib
++	$(CP) $(TOOLCHAIN_DIR)/lib$(LIB_SUFFIX)/libssp.so.* $(1)/lib/
++endef
++
++define Package/libstdcpp/install
++	$(INSTALL_DIR) $(1)/usr/lib
++	$(CP) $(TOOLCHAIN_DIR)/usr/lib$(LIB_SUFFIX)/libstdc++.so.* $(1)/usr/lib/
++endef
++
++use_libutil=$(if $(CONFIG_USE_GLIBC)$(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),libutil)
++use_libnsl=$(if $(CONFIG_USE_GLIBC)$(CONFIG_EGLIBC_OPTION_EGLIBC_NIS),libnsl)
++use_nsswitch=$(if $(CONFIG_USE_GLIBC)$(CONFIG_EGLIBC_OPTION_EGLIBC_NSSWITCH),libnss_dns libnss_files)
++
++define Package/glibc/install
++	$(INSTALL_DIR) $(1)/lib
++	$(CP) $(TOOLCHAIN_DIR)/lib/ld*.so.* $(1)/lib/
++	$(CP) $(TOOLCHAIN_DIR)/lib/ld-$(LIBC_VERSION).so $(1)/lib/
++	for file in libanl libc libcidn libcrypt libdl libm $(use_libnsl) $(use_nsswitch) libresolv $(use_libutil); do \
++		$(CP) $(TOOLCHAIN_DIR)/lib/$$$$file.so.* $(1)/lib/; \
++		$(CP) $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_VERSION).so $(1)/lib/; \
++	done
++endef
++
++define Package/eglibc/install
++$(call Package/glibc/install,$1)
++endef
++
++define Package/uClibc/install
++	$(INSTALL_DIR) $(1)/lib
++	for file in ld$(LIB_SUFFIX)-uClibc libc libcrypt libdl libm libnsl libresolv libuClibc libutil; do \
++		$(CP) $(TOOLCHAIN_DIR)/lib/$$$$file.so.* $(1)/lib/; \
++		$(CP) $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_VERSION).so $(1)/lib/; \
++	done
++endef
++
++define Package/libc/install
++$(call Package/$(LIBC)/install,$1)
++endef
++
++define Package/libpthread/install
++	$(INSTALL_DIR) $(1)/lib
++	$(CP) $(TOOLCHAIN_DIR)/lib/libpthread.so.* $(1)/lib/
++	$(CP) $(TOOLCHAIN_DIR)/lib/libpthread-$(LIBC_VERSION).so $(1)/lib/
++endef
++
++define Package/librt/install
++	$(INSTALL_DIR) $(1)/lib
++	$(CP) $(TOOLCHAIN_DIR)/lib/librt.so.* $(1)/lib/
++	$(CP) $(TOOLCHAIN_DIR)/lib/librt-$(LIBC_VERSION).so $(1)/lib/
++endef
++
++define Package/ldd/install
++	$(INSTALL_DIR) $(1)/usr/bin/
++	$(CP) $(TOOLCHAIN_DIR)/usr/bin/ldd $(1)/usr/bin/
++endef
++
++define Package/ldconfig/install
++	$(INSTALL_DIR) $(1)/sbin/
++	$(CP) $(TOOLCHAIN_DIR)/sbin/ldconfig $(1)/sbin/
++endef
++
++ifneq ($(DUMP),1)
++  -include $(PLATFORM_DIR)/base-files.mk
++endif
++
++$(eval $(call BuildPackage,base-files$(TARGET)))
++$(eval $(call BuildPackage,libc))
++$(eval $(call BuildPackage,libgcc))
++$(eval $(call BuildPackage,libssp))
++$(eval $(call BuildPackage,libstdcpp))
++$(eval $(call BuildPackage,libpthread))
++$(eval $(call BuildPackage,librt))
++$(eval $(call BuildPackage,ldd))
++$(eval $(call BuildPackage,ldconfig))
+diff -Naur a/package/base-files/Makefile.rej b/package/base-files/Makefile.rej
+--- a/package/base-files/Makefile.rej	1970-01-01 00:00:00.000000000 +0000
++++ b/package/base-files/Makefile.rej	2009-02-01 09:29:53.329466720 +0000
+@@ -0,0 +1,52 @@
++***************
++*** 53,59 ****
++  /etc/passwd
++  /etc/profile
++  /etc/shells
++- /etc/ipkg.conf
++  /etc/sysctl.conf
++  $(call $(TARGET)/conffiles)
++  endef
++--- 53,58 ----
++  /etc/passwd
++  /etc/profile
++  /etc/shells
++  /etc/sysctl.conf
++  $(call $(TARGET)/conffiles)
++  endef
++***************
++*** 146,164 ****
++  			$(CP) $(PLATFORM_SUBDIR)/base-files-$(PROFILE)/* $(1)/; \
++  		fi \
++  	)
++- 	$(SED) 's,$$$$R,$(REVISION),g' $(1)/etc/banner
++- 	$(SED) 's,$$$$S,$(BOARD),g' -e 's,$$$$A,$(ARCH),g' $(1)/etc/ipkg.conf
++  	mkdir -p $(1)/dev
++  	mkdir -p $(1)/etc/crontabs
++- 	mkdir -p $(1)/jffs
++- 	mkdir -p $(1)/lib/firmware
++  	mkdir -p $(1)/mnt
++  	mkdir -p $(1)/proc
++  	mkdir -p $(1)/tmp
++  	mkdir -p $(1)/usr/lib
++  	mkdir -p $(1)/usr/bin
++  	mkdir -p $(1)/sys
++- 	mkdir -p $(1)/www
++  	mkdir -p $(1)/root
++  	ln -sf /proc/mounts $(1)/etc/mtab
++  	rm -f $(1)/var
++--- 145,158 ----
++  			$(CP) $(PLATFORM_SUBDIR)/base-files-$(PROFILE)/* $(1)/; \
++  		fi \
++  	)
++  	mkdir -p $(1)/dev
++  	mkdir -p $(1)/etc/crontabs
++  	mkdir -p $(1)/mnt
++  	mkdir -p $(1)/proc
++  	mkdir -p $(1)/tmp
++  	mkdir -p $(1)/usr/lib
++  	mkdir -p $(1)/usr/bin
++  	mkdir -p $(1)/sys
++  	mkdir -p $(1)/root
++  	ln -sf /proc/mounts $(1)/etc/mtab
++  	rm -f $(1)/var
+diff -Naur a/package/base-files/files/bin/entropy-update.sh b/package/base-files/files/bin/entropy-update.sh
+--- a/package/base-files/files/bin/entropy-update.sh	1970-01-01 00:00:00.000000000 +0000
++++ b/package/base-files/files/bin/entropy-update.sh	2009-02-01 09:29:53.330466568 +0000
 @@ -0,0 +1,7 @@
 +#!/bin/sh
 +rndfile="$1"
@@ -51,9 +352,9 @@
 +  chmod 600 "$rndfile" >/dev/null 2>&1
 +  sleep 60 >/dev/null 2>&1
 +done
-diff -Naur orig-kamikaze/package/base-files/files/bin/firstboot mod-basefiles-kamikaze/package/base-files/files/bin/firstboot
---- orig-kamikaze/package/base-files/files/bin/firstboot	2007-07-11 20:46:25.691898000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/bin/firstboot	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/bin/firstboot b/package/base-files/files/bin/firstboot
+--- a/package/base-files/files/bin/firstboot	2008-08-16 06:35:14.914763000 +0000
++++ b/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 $
@@ -82,7 +383,7 @@
 -		case "$file" in
 -		./rom/note) ;; #nothing
 -		./etc/config*|\
--		./usr/lib/ipkg/info/*) cp -af $2/$file $file;;
+-		./usr/lib/opkg/info/*) cp -af $2/$file $file;;
 -		*) ln -sf /rom/${file#./*} $file;;
 -		esac
 -	done
@@ -181,9 +482,67 @@
 -	mount "$mtdpart" /jffs -t jffs2
 -	fopivot /jffs /rom 1
 -}
-diff -Naur orig-kamikaze/package/base-files/files/etc/banner mod-basefiles-kamikaze/package/base-files/files/etc/banner
---- orig-kamikaze/package/base-files/files/etc/banner	2005-12-20 15:03:08.038259000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/banner	2008-10-03 00:31:58.161094180 +0000
+diff -Naur a/package/base-files/files/bin/ipcalc.sh b/package/base-files/files/bin/ipcalc.sh
+--- a/package/base-files/files/bin/ipcalc.sh	2007-03-17 13:31:13.078736000 +0000
++++ b/package/base-files/files/bin/ipcalc.sh	1970-01-01 00:00:00.000000000 +0000
+@@ -1,32 +0,0 @@
+-#!/bin/sh
+-
+-awk -f /usr/lib/common.awk -f - $* <<EOF
+-BEGIN {
+-	ipaddr=ip2int(ARGV[1])
+-	netmask=ip2int(ARGV[2])
+-	network=and(ipaddr,netmask)
+-	broadcast=or(network,compl(netmask))
+-	
+-	start=or(network,and(ip2int(ARGV[3]),compl(netmask)))
+-	limit=network+1
+-	if (start<limit) start=limit
+-	
+-	end=start+ARGV[4]
+-	limit=or(network,compl(netmask))-1
+-	if (end>limit) end=limit
+-
+-	print "IP="int2ip(ipaddr)
+-	print "NETMASK="int2ip(netmask)
+-	print "BROADCAST="int2ip(broadcast)
+-	print "NETWORK="int2ip(network)
+-	print "PREFIX="32-bitcount(compl(netmask))
+-	
+-	# range calculations:
+-	# ipcalc <ip> <netmask> <start> <num>
+-	
+-	if (ARGC > 3) {
+-		print "START="int2ip(start)
+-		print "END="int2ip(end-1)
+-	}
+-}
+-EOF
+diff -Naur a/package/base-files/files/bin/login b/package/base-files/files/bin/login
+--- a/package/base-files/files/bin/login	2006-06-27 00:36:13.101592000 +0000
++++ b/package/base-files/files/bin/login	1970-01-01 00:00:00.000000000 +0000
+@@ -1,18 +0,0 @@
+-#!/bin/sh
+-# Copyright (C) 2006 OpenWrt.org
+-
+-grep '^root:[^!]' /etc/passwd >&- 2>&-
+-[ "$?" = "0" -a -z "$FAILSAFE" ]  &&  
+-{
+-    echo "Login failed."
+-    exit 0
+-} || {
+-cat << EOF
+- === IMPORTANT ============================
+-  Use 'passwd' to set your login password
+-  this will disable telnet and enable SSH
+- ------------------------------------------
+-EOF
+-}
+-
+-exec /bin/ash --login
+diff -Naur a/package/base-files/files/etc/banner b/package/base-files/files/etc/banner
+--- a/package/base-files/files/etc/banner	2005-12-20 15:03:08.038259000 +0000
++++ b/package/base-files/files/etc/banner	2009-02-01 09:30:07.138367448 +0000
 @@ -1,10 +1,2 @@
 -  _______                     ________        __
 - |       |.-----.-----.-----.|  |  |  |.----.|  |_
@@ -197,9 +556,9 @@
 - ---------------------------------------------------
 +Tor Virtual Machine BUILDDATE BUILDVER
 +
-diff -Naur orig-kamikaze/package/base-files/files/etc/config/fstab mod-basefiles-kamikaze/package/base-files/files/etc/config/fstab
---- orig-kamikaze/package/base-files/files/etc/config/fstab	2007-09-22 13:47:20.783817000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/config/fstab	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/etc/config/fstab b/package/base-files/files/etc/config/fstab
+--- a/package/base-files/files/etc/config/fstab	2007-09-22 13:47:20.783817000 +0000
++++ b/package/base-files/files/etc/config/fstab	1970-01-01 00:00:00.000000000 +0000
 @@ -1,10 +0,0 @@
 -config mount
 -	option target	/home
@@ -211,9 +570,9 @@
 -config swap
 -	option device	/dev/sda2
 -	option enabled	0
-diff -Naur orig-kamikaze/package/base-files/files/etc/config/network mod-basefiles-kamikaze/package/base-files/files/etc/config/network
---- orig-kamikaze/package/base-files/files/etc/config/network	2007-10-18 13:20:02.347557000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/config/network	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/etc/config/network b/package/base-files/files/etc/config/network
+--- a/package/base-files/files/etc/config/network	2007-10-18 13:20:02.347557000 +0000
++++ b/package/base-files/files/etc/config/network	1970-01-01 00:00:00.000000000 +0000
 @@ -1,14 +0,0 @@
 -# Copyright (C) 2006 OpenWrt.org
 -
@@ -229,16 +588,16 @@
 -	option proto	static
 -	option ipaddr	192.168.1.1
 -	option netmask	255.255.255.0
-diff -Naur orig-kamikaze/package/base-files/files/etc/config/system mod-basefiles-kamikaze/package/base-files/files/etc/config/system
---- orig-kamikaze/package/base-files/files/etc/config/system	2008-06-11 19:59:16.494753000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/config/system	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/etc/config/system b/package/base-files/files/etc/config/system
+--- a/package/base-files/files/etc/config/system	2008-06-11 19:59:16.494753000 +0000
++++ b/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 orig-kamikaze/package/base-files/files/etc/device_table.txt mod-basefiles-kamikaze/package/base-files/files/etc/device_table.txt
---- orig-kamikaze/package/base-files/files/etc/device_table.txt	1970-01-01 00:00:00.000000000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/device_table.txt	2008-10-03 00:31:58.161094180 +0000
+diff -Naur a/package/base-files/files/etc/device_table.txt b/package/base-files/files/etc/device_table.txt
+--- a/package/base-files/files/etc/device_table.txt	1970-01-01 00:00:00.000000000 +0000
++++ b/package/base-files/files/etc/device_table.txt	2009-02-01 09:30:07.194358936 +0000
 @@ -0,0 +1,44 @@
 +#<name>		<type>	<mode>	<uid>	<gid>	<major>	<minor>	<start>	<inc>	<count>
 +#/dev		d	755	0	0	-	-	-	-	-
@@ -284,23 +643,24 @@
 +/dev/sdh	b	640	0	0	8	113	1	1	15
 +/dev/sg	c	640	0	0	21	0	0	1	15
 +/dev/scd	b	640	0	0	11	0	0	1	15
-diff -Naur orig-kamikaze/package/base-files/files/etc/diag.sh mod-basefiles-kamikaze/package/base-files/files/etc/diag.sh
---- orig-kamikaze/package/base-files/files/etc/diag.sh	2007-05-10 19:19:23.337706000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/diag.sh	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/etc/diag.sh b/package/base-files/files/etc/diag.sh
+--- a/package/base-files/files/etc/diag.sh	2007-05-10 19:19:23.337706000 +0000
++++ b/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 orig-kamikaze/package/base-files/files/etc/functions.sh mod-basefiles-kamikaze/package/base-files/files/etc/functions.sh
---- orig-kamikaze/package/base-files/files/etc/functions.sh	2008-02-05 01:47:47.130132000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/functions.sh	1970-01-01 00:00:00.000000000 +0000
-@@ -1,211 +0,0 @@
+diff -Naur a/package/base-files/files/etc/functions.sh b/package/base-files/files/etc/functions.sh
+--- a/package/base-files/files/etc/functions.sh	2008-08-25 05:21:42.703430000 +0000
++++ b/package/base-files/files/etc/functions.sh	1970-01-01 00:00:00.000000000 +0000
+@@ -1,269 +0,0 @@
 -#!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
 -# Copyright (C) 2006 Fokus Fraunhofer <carsten.tittel at fokus.fraunhofer.de>
 -
 -alias debug=${DEBUG:-:}
+-alias mount='busybox mount'
 -
 -# newline
 -N="
@@ -309,6 +669,7 @@
 -_C=0
 -NO_EXPORT=1
 -LOAD_STATE=1
+-LIST_SEP=" "
 -
 -hotplug_dev() {
 -	env -i ACTION=$1 INTERFACE=$2 /sbin/hotplug-call net
@@ -322,6 +683,30 @@
 -	eval "export ${NO_EXPORT:+-n} -- \"$var=\${$var:+\${$var}\${value:+\$sep}}\$value\""
 -}
 -
+-list_contains() {
+-	local var="$1"
+-	local str="$2"
+-	local val
+-
+-	eval "val=\" \${$var} \""
+-	[ "${val%% $str *}" != "$val" ]
+-}
+-
+-list_remove() {
+-	local var="$1"
+-	local remove="$2"
+-	local val
+-
+-	eval "val=\" \${$var} \""
+-	val1="${val%% $remove *}"
+-	[ "$val1" = "$val" ] && return
+-	val2="${val##* $remove }"
+-	[ "$val2" = "$val" ] && return
+-	val="${val1## } ${val2%% }"
+-	val="${val%% }"
+-	eval "export ${NO_EXPORT:+-n} -- \"$var=\$val\""
+-}
+-
 -config_load() {
 -	[ -n "$IPKG_INSTROOT" ] && return 0
 -	uci_load "$@"
@@ -330,6 +715,7 @@
 -reset_cb() {
 -	config_cb() { return 0; }
 -	option_cb() { return 0; }
+-	list_cb() { return 0; }
 -}
 -reset_cb
 -
@@ -352,11 +738,24 @@
 -option () {
 -	local varname="$1"; shift
 -	local value="$*"
--	
+-
 -	export ${NO_EXPORT:+-n} "CONFIG_${CONFIG_SECTION}_${varname}=$value"
 -	[ -n "$NO_CALLBACK" ] || option_cb "$varname" "$*"
 -}
 -
+-list() {
+-	local varname="$1"; shift
+-	local value="$*"
+-	local len
+-
+-	config_get len "$CONFIG_SECTION" "${varname}_LENGTH" 
+-	len="$((${len:-0} + 1))"
+-	config_set "$CONFIG_SECTION" "${varname}_ITEM$len" "$value"
+-	config_set "$CONFIG_SECTION" "${varname}_LENGTH" "$len"
+-	append "CONFIG_${CONFIG_SECTION}_${varname}" "$value" "$LIST_SEP"
+-	list_cb "$varname" "$*"
+-}
+-
 -config_rename() {
 -	local OLD="$1"
 -	local NEW="$2"
@@ -382,8 +781,8 @@
 -config_clear() {
 -	local SECTION="$1"
 -	local oldvar
--	
--	export ${NO_EXPORT:+-n} CONFIG_SECTIONS="$(echo " $CONFIG_SECTIONS " | sed -e "s, $OLD , ,")"
+-
+-	list_remove CONFIG_SECTIONS "$SECTION"
 -	export ${NO_EXPORT:+-n} CONFIG_SECTIONS="${SECTION:+$CONFIG_SECTIONS}"
 -
 -	for oldvar in `set | grep ^CONFIG_${SECTION:+${SECTION}_} | \
@@ -436,6 +835,24 @@
 -	done
 -}
 -
+-config_list_foreach() {
+-	[ "$#" -ge 3 ] || return 0
+-	local section="$1"; shift
+-	local option="$1"; shift
+-	local function="$1"; shift
+-	local val
+-	local len
+-	local c=1
+-
+-	config_get len "${section}" "${option}_LENGTH"
+-	[ -z "$len" ] && return 0
+-	while [ $c -le "$len" ]; do
+-		config_get val "${section}" "${option}_ITEM$c"
+-		eval "$function \"\$val\" \"$@\""
+-		c="$(($c + 1))"
+-	done
+-}
+-
 -load_modules() {
 -	[ -d /etc/modules.d ] && {
 -		cd /etc/modules.d
@@ -507,17 +924,58 @@
 -)}
 -
 -[ -z "$IPKG_INSTROOT" -a -f /lib/config/uci.sh ] && . /lib/config/uci.sh
-diff -Naur orig-kamikaze/package/base-files/files/etc/hotplug.d/iface/00-netstate mod-basefiles-kamikaze/package/base-files/files/etc/hotplug.d/iface/00-netstate
---- orig-kamikaze/package/base-files/files/etc/hotplug.d/iface/00-netstate	2008-02-03 06:48:15.292457000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/hotplug.d/iface/00-netstate	1970-01-01 00:00:00.000000000 +0000
-@@ -1,3 +0,0 @@
+diff -Naur a/package/base-files/files/etc/hotplug.d/block/10-mount b/package/base-files/files/etc/hotplug.d/block/10-mount
+--- a/package/base-files/files/etc/hotplug.d/block/10-mount	2009-01-30 20:48:42.263830000 +0000
++++ b/package/base-files/files/etc/hotplug.d/block/10-mount	1970-01-01 00:00:00.000000000 +0000
+@@ -1,19 +0,0 @@
+-#!/bin/sh
+-
+-# Copyright (C) 2009 OpenWrt.org
+-
+-blkdev=`dirname $DEVPATH`
+-if [ `basename $blkdev` != "block" ]; then
+-
+-    device=`basename $DEVPATH`
+-    case "$ACTION" in
+-	add)
+-		mkdir -p /mnt/$device
+-		mount /dev/$device /mnt/$device
+-		;;
+-	remove)
+-		umount /dev/$device
+-		;;
+-    esac	
+-
+-fi
+diff -Naur a/package/base-files/files/etc/hotplug.d/ieee1394/10-ieee1394 b/package/base-files/files/etc/hotplug.d/ieee1394/10-ieee1394
+--- a/package/base-files/files/etc/hotplug.d/ieee1394/10-ieee1394	2009-01-30 20:48:42.263830000 +0000
++++ b/package/base-files/files/etc/hotplug.d/ieee1394/10-ieee1394	1970-01-01 00:00:00.000000000 +0000
+@@ -1,13 +0,0 @@
+-#!/bin/sh
+-
+-# Copyright (C) 2009 OpenWrt.org
+-
+-case "$ACTION" in
+-	add)
+-		# update LEDs
+-		;;
+-	remove)
+-		# update LEDs
+-		;;
+-esac	
+-		
+diff -Naur a/package/base-files/files/etc/hotplug.d/iface/00-netstate b/package/base-files/files/etc/hotplug.d/iface/00-netstate
+--- a/package/base-files/files/etc/hotplug.d/iface/00-netstate	2008-11-28 16:18:11.345415000 +0000
++++ b/package/base-files/files/etc/hotplug.d/iface/00-netstate	1970-01-01 00:00:00.000000000 +0000
+@@ -1,4 +0,0 @@
 -[ ifup = "$ACTION" ] && {
 -	uci_set_state network "$INTERFACE" up 1 
+-	[ -n "$DEVICE" ] && uci_set_state network "$INTERFACE" ifname "$DEVICE"
 -}
-diff -Naur orig-kamikaze/package/base-files/files/etc/hotplug.d/iface/10-routes mod-basefiles-kamikaze/package/base-files/files/etc/hotplug.d/iface/10-routes
---- orig-kamikaze/package/base-files/files/etc/hotplug.d/iface/10-routes	2008-06-06 18:49:23.308519000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/hotplug.d/iface/10-routes	1970-01-01 00:00:00.000000000 +0000
-@@ -1,67 +0,0 @@
+diff -Naur a/package/base-files/files/etc/hotplug.d/iface/10-routes b/package/base-files/files/etc/hotplug.d/iface/10-routes
+--- a/package/base-files/files/etc/hotplug.d/iface/10-routes	2008-12-22 02:21:25.213365000 +0000
++++ b/package/base-files/files/etc/hotplug.d/iface/10-routes	1970-01-01 00:00:00.000000000 +0000
+@@ -1,69 +0,0 @@
 -add_route() {
 -	local config="$1"
 -
@@ -547,7 +1005,8 @@
 -	dest="${netmask:+-net "$target" netmask "$netmask"}"
 -	dest="${dest:--host "$target"}"
 -	
--	/sbin/route add $dest gw "$gateway" ${dev:+dev "$dev"} ${metric:+ metric "$metric"}
+-	/sbin/route add $dest ${gateway:+gw "$gateway"} \
+-		${dev:+dev "$dev"} ${metric:+ metric "$metric"}
 -}
 -
 -add_route6() {
@@ -574,7 +1033,8 @@
 -		config_get gateway "$interface" gateway
 -	}
 -
--	/sbin/route -A inet6 add $target gw "$gateway" ${dev:+dev "$dev"} ${metric:+ metric "$metric"}
+-	/sbin/route -A inet6 add $target ${gateway:+gw "$gateway"} \
+-		${dev:+dev "$dev"} ${metric:+ metric "$metric"}
 -}
 -
 -case "$ACTION" in
@@ -585,10 +1045,10 @@
 -		config_foreach "add_route6" route6
 -	;;
 -esac
-diff -Naur orig-kamikaze/package/base-files/files/etc/hotplug.d/net/10-net mod-basefiles-kamikaze/package/base-files/files/etc/hotplug.d/net/10-net
---- orig-kamikaze/package/base-files/files/etc/hotplug.d/net/10-net	2007-03-04 04:41:46.644094000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/hotplug.d/net/10-net	1970-01-01 00:00:00.000000000 +0000
-@@ -1,40 +0,0 @@
+diff -Naur a/package/base-files/files/etc/hotplug.d/net/10-net b/package/base-files/files/etc/hotplug.d/net/10-net
+--- a/package/base-files/files/etc/hotplug.d/net/10-net	2008-07-30 22:39:56.068770000 +0000
++++ b/package/base-files/files/etc/hotplug.d/net/10-net	1970-01-01 00:00:00.000000000 +0000
+@@ -1,61 +0,0 @@
 -# Copyright (C) 2006 OpenWrt.org
 -
 -include /lib/network
@@ -621,6 +1081,24 @@
 -	done
 -}
 -
+-
+-delif() {
+-	scan_interfaces
+-
+-	# find all vlan configurations for this interface and nuke 'em
+-	for ifc in $interfaces; do
+-		config_get iftype "$ifc" type
+-		config_get ifs "$ifc" device
+-		confdevs="$(uci get network.$ifc.ifname)"
+-		for dev in $ifs; do
+-			[ "${dev%%\.*}" = "$INTERFACE" ] && {
+-				list_contains confdevs "$dev" || list_remove ifs "$dev"
+-			}
+-		done
+-		uci_set_state "network" "$ifc" device "$ifs"
+-	done
+-}
+-
 -case "$ACTION" in
 -	add|register)
 -		case "$PHYSDEVDRIVER" in
@@ -628,27 +1106,30 @@
 -		esac
 -		addif
 -	;;
+-	remove|unregister)
+-		delif
+-	;;
 -esac
-diff -Naur orig-kamikaze/package/base-files/files/etc/hotplug.d/usb/10-usb-storage mod-basefiles-kamikaze/package/base-files/files/etc/hotplug.d/usb/10-usb-storage
---- orig-kamikaze/package/base-files/files/etc/hotplug.d/usb/10-usb-storage	2007-06-20 22:05:15.338323000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/hotplug.d/usb/10-usb-storage	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/etc/hotplug.d/usb/10-usb b/package/base-files/files/etc/hotplug.d/usb/10-usb
+--- a/package/base-files/files/etc/hotplug.d/usb/10-usb	2009-01-30 20:48:42.263830000 +0000
++++ b/package/base-files/files/etc/hotplug.d/usb/10-usb	1970-01-01 00:00:00.000000000 +0000
 @@ -1,13 +0,0 @@
 -#!/bin/sh
 -
--# Copyright (C) 2006 OpenWrt.org
+-# Copyright (C) 2009 OpenWrt.org
 -
 -case "$ACTION" in
 -	add)
--		[ -n "${INTERFACE}" ] &&
--		[ "$(expr substr ${INTERFACE} 1 2)" == "8/" ]  && {
--			/sbin/usb-storage &
--		}
+-		# update LEDs
 -		;;
+-	remove)
+-		# update LEDs
+-		;;
 -esac	
 -		
-diff -Naur orig-kamikaze/package/base-files/files/etc/hotplug2-common.rules mod-basefiles-kamikaze/package/base-files/files/etc/hotplug2-common.rules
---- orig-kamikaze/package/base-files/files/etc/hotplug2-common.rules	2008-01-26 03:16:11.438222000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/hotplug2-common.rules	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/etc/hotplug2-common.rules b/package/base-files/files/etc/hotplug2-common.rules
+--- a/package/base-files/files/etc/hotplug2-common.rules	2008-01-26 03:16:11.438222000 +0000
++++ b/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) {
@@ -685,19 +1166,19 @@
 -	exec /sbin/hotplug-call firmware;
 -	next
 -}
-diff -Naur orig-kamikaze/package/base-files/files/etc/hotplug2-init.rules mod-basefiles-kamikaze/package/base-files/files/etc/hotplug2-init.rules
---- orig-kamikaze/package/base-files/files/etc/hotplug2-init.rules	2007-12-01 17:08:04.802538000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/hotplug2-init.rules	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/etc/hotplug2-init.rules b/package/base-files/files/etc/hotplug2-init.rules
+--- a/package/base-files/files/etc/hotplug2-init.rules	2007-12-01 17:08:04.802538000 +0000
++++ b/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 orig-kamikaze/package/base-files/files/etc/init.d/boot mod-basefiles-kamikaze/package/base-files/files/etc/init.d/boot
---- orig-kamikaze/package/base-files/files/etc/init.d/boot	2008-06-16 19:37:00.739972000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/init.d/boot	1970-01-01 00:00:00.000000000 +0000
-@@ -1,66 +0,0 @@
+diff -Naur a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot
+--- a/package/base-files/files/etc/init.d/boot	2009-01-06 21:53:45.361427000 +0000
++++ b/package/base-files/files/etc/init.d/boot	1970-01-01 00:00:00.000000000 +0000
+@@ -1,68 +0,0 @@
 -#!/bin/sh /etc/rc.common
 -# Copyright (C) 2006 OpenWrt.org
 -
@@ -742,12 +1223,14 @@
 -	mkdir -p /var/lock
 -	mkdir -p /var/state
 -	mkdir -p /tmp/.uci
--	chown 0700 /tmp/.uci
+-	chmod 0700 /tmp/.uci
 -	touch /var/log/wtmp
 -	touch /var/log/lastlog
+-	touch /tmp/resolv.conf.auto
 -	ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
 -	[ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
 -
+-	killall -q hotplug2
 -	[ -x /sbin/hotplug2 ] && /sbin/hotplug2 --override --persistent \
 -			--max-children 1 --no-coldplug &
 -
@@ -764,9 +1247,9 @@
 -
 -	load_modules /etc/modules.d/*
 -}
-diff -Naur orig-kamikaze/package/base-files/files/etc/init.d/done mod-basefiles-kamikaze/package/base-files/files/etc/init.d/done
---- orig-kamikaze/package/base-files/files/etc/init.d/done	2007-05-10 14:37:47.286148000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/init.d/done	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/etc/init.d/done b/package/base-files/files/etc/init.d/done
+--- a/package/base-files/files/etc/init.d/done	2007-05-10 14:37:47.286148000 +0000
++++ b/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
@@ -783,9 +1266,9 @@
 -	. /etc/diag.sh
 -	set_state done
 -}
-diff -Naur orig-kamikaze/package/base-files/files/etc/init.d/fstab mod-basefiles-kamikaze/package/base-files/files/etc/init.d/fstab
---- orig-kamikaze/package/base-files/files/etc/init.d/fstab	2008-05-20 19:02:19.166035000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/init.d/fstab	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/etc/init.d/fstab b/package/base-files/files/etc/init.d/fstab
+--- a/package/base-files/files/etc/init.d/fstab	2008-08-04 08:50:16.118952000 +0000
++++ b/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
@@ -799,9 +1282,9 @@
 -	config_get options "$cfg" options
 -	options="${options:-rw}"
 -	config_get device "$cfg" device
--	[ -n "device" ] || return 0
+-	[ -n "$device" ] || return 0
 -	config_get target "$cfg" target
--	[ -n "target" ] || return 0
+-	[ -n "$target" ] || return 0
 -	mkdir -p $target
 -	config_get_bool enabled "$cfg" "enabled" '1'
 -	[ "$enabled" -eq 0 ] && options="noauto,$options"
@@ -811,7 +1294,7 @@
 -do_swapon() {
 -	local cfg="$1"
 -	config_get device "$cfg" device
--	[ -n "device" ] || return 0
+-	[ -n "$device" ] || return 0
 -	config_get_bool enabled "$cfg" "enabled" '1'
 -	[ "$enabled" -gt 0 ] && {
 -		echo "$device	none	swap	${noauto}sw	0	0" >> /tmp/fstab
@@ -821,7 +1304,7 @@
 -do_unmount() {
 -	local cfg="$1"
 -	config_get target "$cfg" target
--	[ -n "target" ] || return 0
+-	[ -n "$target" ] || return 0
 -	config_get_bool enabled "$cfg" "enabled" '1'
 -	[ "$enabled" -gt 0 ] && {
 -		umount $target
@@ -831,7 +1314,7 @@
 -do_swapoff() {
 -	local cfg="$1"
 -	config_get device "$cfg" device
--	[ -n "device" ] || return 0
+-	[ -n "$device" ] || return 0
 -	config_get_bool enabled "$cfg" "enabled" '1'
 -	[ "$enabled" -gt 0 ] && type swapoff >/dev/null && {
 -		swapoff $device
@@ -844,7 +1327,7 @@
 -	config_foreach do_mount mount
 -	config_foreach do_swapon swap
 -	mount -a
--	swapon -a
+-	[ -x /sbin/swapon ] && swapon -a
 -}
 -
 -stop() {
@@ -853,9 +1336,65 @@
 -	config_foreach do_swapoff swap
 -}
 -
-diff -Naur orig-kamikaze/package/base-files/files/etc/init.d/network mod-basefiles-kamikaze/package/base-files/files/etc/init.d/network
---- orig-kamikaze/package/base-files/files/etc/init.d/network	2008-04-15 16:29:49.167688000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/init.d/network	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led
+--- a/package/base-files/files/etc/init.d/led	2008-09-13 00:08:39.328720000 +0000
++++ b/package/base-files/files/etc/init.d/led	1970-01-01 00:00:00.000000000 +0000
+@@ -1,52 +0,0 @@
+-#!/bin/sh /etc/rc.common
+-# (C) 2008 openwrt.org
+-
+-START=60
+-
+-load_led() {
+-	local name
+-	local sysfs
+-	local trigger
+-	local dev
+-	local mode
+-	local default
+-	local delayon
+-	local delayoff
+-
+-	config_get name $1 name
+-	config_get sysfs $1 sysfs
+-	config_get trigger $1 trigger
+-	config_get dev $1 dev
+-	config_get mode $1 mode
+-	config_get default $1 default
+-	config_get delayon $1 delayon
+-	config_get delayoff $1 delayoff
+-
+-	[ -e /sys/class/leds/${sysfs}/brightness ] && {
+-		logger "setting up led : ${name:-$sysfs}"
+-		[ -n "$default" ] && { 
+-			[ $default -eq 1 ] && 
+-				echo 1 >/sys/class/leds/${sysfs}/brightness 
+-			[ $default -eq 1 ] ||
+-				echo 0 >/sys/class/leds/${sysfs}/brightness
+-		}
+-		[ -z "$trigger" ] && trigger=none
+-		echo $trigger > /sys/class/leds/${sysfs}/trigger
+-		[ "$trigger" == "netdev" -a -n "$dev" ] && {
+-			[ -z "$mode" ] && mode=link
+-			echo $dev > /sys/class/leds/${sysfs}/device_name
+-			echo $mode > /sys/class/leds/${sysfs}/mode
+-		} 
+-		[ "$trigger" == "timer" ] && {
+-			[ -n "$delayon" ] && echo $delayon > /sys/class/leds/${sysfs}/delay_on
+-			[ -n "$delayoff" ] && echo $delayoff > /sys/class/leds/${sysfs}/delay_off
+-		}
+-	}
+-}
+-
+-start() {
+-	[ -e /sys/class/leds/ ] && {
+-		config_load system
+-		config_foreach load_led led
+-	}
+-}
+diff -Naur a/package/base-files/files/etc/init.d/network b/package/base-files/files/etc/init.d/network
+--- a/package/base-files/files/etc/init.d/network	2008-04-15 16:29:49.167688000 +0000
++++ b/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
@@ -890,9 +1429,9 @@
 -stop() {
 -	ifdown -a
 -}
-diff -Naur orig-kamikaze/package/base-files/files/etc/init.d/rcS mod-basefiles-kamikaze/package/base-files/files/etc/init.d/rcS
---- orig-kamikaze/package/base-files/files/etc/init.d/rcS	2007-11-28 02:36:14.270663000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/init.d/rcS	2008-10-03 00:31:58.174427646 +0000
+diff -Naur a/package/base-files/files/etc/init.d/rcS b/package/base-files/files/etc/init.d/rcS
+--- a/package/base-files/files/etc/init.d/rcS	2007-11-28 02:36:14.270663000 +0000
++++ b/package/base-files/files/etc/init.d/rcS	2009-02-01 09:30:27.451279416 +0000
 @@ -1,8 +1,2 @@
  #!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
@@ -903,9 +1442,9 @@
 -	done 
 -} | logger -s -p 6 -t '' &
 +exit 0
-diff -Naur orig-kamikaze/package/base-files/files/etc/init.d/sysctl mod-basefiles-kamikaze/package/base-files/files/etc/init.d/sysctl
---- orig-kamikaze/package/base-files/files/etc/init.d/sysctl	2007-05-10 10:07:38.965405000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/init.d/sysctl	2008-10-03 00:31:58.174427646 +0000
+diff -Naur a/package/base-files/files/etc/init.d/sysctl b/package/base-files/files/etc/init.d/sysctl
+--- a/package/base-files/files/etc/init.d/sysctl	2007-05-10 10:07:38.965405000 +0000
++++ b/package/base-files/files/etc/init.d/sysctl	2009-02-01 09:30:27.483274552 +0000
 @@ -1,7 +1,2 @@
 -#!/bin/sh /etc/rc.common
 -# Copyright (C) 2006 OpenWrt.org 
@@ -916,9 +1455,9 @@
 -}
 +#!/bin/sh
 +[ -f /etc/sysctl.conf ] && sysctl -p >&-
-diff -Naur orig-kamikaze/package/base-files/files/etc/init.d/umount mod-basefiles-kamikaze/package/base-files/files/etc/init.d/umount
---- orig-kamikaze/package/base-files/files/etc/init.d/umount	2007-05-10 10:45:04.317089000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/init.d/umount	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/etc/init.d/umount b/package/base-files/files/etc/init.d/umount
+--- a/package/base-files/files/etc/init.d/umount	2007-05-10 10:45:04.317089000 +0000
++++ b/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 
@@ -928,9 +1467,9 @@
 -	sync
 -	umount -a -r
 -}
-diff -Naur orig-kamikaze/package/base-files/files/etc/init.d/usb mod-basefiles-kamikaze/package/base-files/files/etc/init.d/usb
---- orig-kamikaze/package/base-files/files/etc/init.d/usb	2007-04-06 16:07:36.852022000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/init.d/usb	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/etc/init.d/usb b/package/base-files/files/etc/init.d/usb
+--- a/package/base-files/files/etc/init.d/usb	2007-04-06 16:07:36.852022000 +0000
++++ b/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 
@@ -941,9 +1480,9 @@
 -		/bin/mount -t usbfs none /proc/bus/usb
 -	}		
 -}
-diff -Naur orig-kamikaze/package/base-files/files/etc/init.d/watchdog mod-basefiles-kamikaze/package/base-files/files/etc/init.d/watchdog
---- orig-kamikaze/package/base-files/files/etc/init.d/watchdog	2008-04-03 21:01:16.263826000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/init.d/watchdog	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/etc/init.d/watchdog b/package/base-files/files/etc/init.d/watchdog
+--- a/package/base-files/files/etc/init.d/watchdog	2008-04-03 21:01:16.263826000 +0000
++++ b/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
@@ -952,30 +1491,27 @@
 -start() {
 -        [ -c /dev/watchdog ] && watchdog -t 5 /dev/watchdog
 -}
-diff -Naur orig-kamikaze/package/base-files/files/etc/inittab mod-basefiles-kamikaze/package/base-files/files/etc/inittab
---- orig-kamikaze/package/base-files/files/etc/inittab	2007-05-10 14:50:42.865525000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/inittab	2008-10-05 13:33:28.609119504 +0000
+diff -Naur a/package/base-files/files/etc/inittab b/package/base-files/files/etc/inittab
+--- a/package/base-files/files/etc/inittab	2007-05-10 14:50:42.865525000 +0000
++++ b/package/base-files/files/etc/inittab	2009-02-01 09:30:27.525268168 +0000
 @@ -1,5 +1,2 @@
  ::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 orig-kamikaze/package/base-files/files/etc/ipkg.conf mod-basefiles-kamikaze/package/base-files/files/etc/ipkg.conf
---- orig-kamikaze/package/base-files/files/etc/ipkg.conf	2008-02-29 02:41:39.429442000 +0000
-+++ mod-basefiles-kamikaze/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 orig-kamikaze/package/base-files/files/etc/preinit mod-basefiles-kamikaze/package/base-files/files/etc/preinit
---- orig-kamikaze/package/base-files/files/etc/preinit	2008-04-23 16:20:46.084166000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/preinit	2008-10-16 03:56:25.281916765 +0000
-@@ -1,92 +1,194 @@
+diff -Naur a/package/base-files/files/etc/preinit b/package/base-files/files/etc/preinit
+--- a/package/base-files/files/etc/preinit	2008-08-14 22:21:35.073308000 +0000
++++ b/package/base-files/files/etc/preinit	2009-02-01 09:43:52.954824264 +0000
+@@ -1,88 +1,198 @@
  #!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
-+# Copyright (C) 2008  The Tor Project, Inc.
++# Copyright (C) 2008-2009  The Tor Project, Inc.
 +# See LICENSE file for rights and terms.
++#
++# NOTE: This file is a full replacement of the original
++# OpenWRT preinit boot script.  This may not be apparent
++# when viewing the diff between these implementations.
 +
  export PATH=/bin:/sbin:/usr/bin:/usr/sbin
 -. /etc/diag.sh
@@ -1001,7 +1537,7 @@
  mount proc /proc -t proc
  mount sysfs /sys -t sysfs
  
--size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)?mt-l:s}' /proc/meminfo)
+-size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)&&(mt>l)?mt-l:s}' /proc/meminfo)
 -mount tmpfs /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777
 +syslogd >/dev/null 2>&1
 +# do we need it? klogd -c 1 >/dev/null 2>&1
@@ -1020,13 +1556,8 @@
 -elif [ -x /sbin/hotplug2 ]; then
 -	mount -t tmpfs tmpfs /dev -o size=512K
 -	mknod /dev/console c 5 1
--	if [ -n "$INITRAMFS" ]; then
--		/sbin/hotplug2 --coldplug --no-persistent --max_children 1
--		/sbin/hotplug2 --persistent --max_children 1 &
--	else
--		/sbin/hotplug2 --coldplug --set-rules-file /etc/hotplug2-init.rules
--		/sbin/hotplug2 --no-coldplug --persistent --set-rules-file /etc/hotplug2-init.rules &
--	fi
+-	/sbin/hotplug2 --coldplug --set-rules-file /etc/hotplug2-init.rules
+-	/sbin/hotplug2 --no-coldplug --persistent --set-rules-file /etc/hotplug2-init.rules &
 -	M0=/dev/ptmx
 -	M1=/dev/ptmx
 -	HOTPLUG=
@@ -1089,7 +1620,7 @@
 +  # launch process to periodically save entropy from pool for next boot (cannot assume clean shutdown)
 +  nohup /bin/sh /bin/entropy-update.sh "$rndstate" >/dev/null 2>&1 &
 +else
-+  # XXX MRP should we force reboot or halt instead?
++  # XXX should we force reboot or halt instead?
 +  echo 'ERROR: unable to mount persistent storage virtual disk!'
 +  echo '       Do not run Tor in this configuration.'
 +  sleep 3
@@ -1189,7 +1720,7 @@
 +      maxrt=$(expr $maxrt - 1)
 +    fi
 +  done
-+  # XXX MRP enforce MTU under 1500 to work around winpcap issue until resolved
++  # XXX enforce MTU under 1500 to work around winpcap issue until resolved
 +  ifconfig eth0 mtu 1482
 +fi
 +
@@ -1209,6 +1740,8 @@
 +fi
  
 -echo "- preinit -"
+-echo "Press CTRL-C for failsafe"
+-trap 'FAILSAFE=true' INT
 -trap 'FAILSAFE=true' USR1
 -[ -e /etc/preinit.arch ] && . /etc/preinit.arch
 -set_state preinit
@@ -1229,13 +1762,12 @@
 -
 -	echo "- init -"
 -	
--	killall hotplug2
 -	exec /sbin/init
 +# end if !NOINIT
  fi
-diff -Naur orig-kamikaze/package/base-files/files/etc/rc.common mod-basefiles-kamikaze/package/base-files/files/etc/rc.common
---- orig-kamikaze/package/base-files/files/etc/rc.common	2008-01-25 10:59:40.292163000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/rc.common	2008-10-03 00:31:58.174427646 +0000
+diff -Naur a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common
+--- a/package/base-files/files/etc/rc.common	2008-09-23 12:35:34.898984000 +0000
++++ b/package/base-files/files/etc/rc.common	2009-02-01 09:47:48.118074016 +0000
 @@ -1,92 +1,4 @@
  #!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
@@ -1277,8 +1809,8 @@
 -enable() {
 -	name="$(basename "${initscript}")"
 -	disable
--	[ "$START" ] && ln -s "/etc/init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
--	[ "$STOP"  ] && ln -s "/etc/init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
+-	[ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
+-	[ "$STOP"  ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
 -}
 -
 -enabled() {
@@ -1330,32 +1862,36 @@
 -	*) help;;
 -esac"
 +# forcibly disable the usual init process
-+# all start/stop activity is controlled by the TorVM controller.
++# all start/stop activity is controlled by the Tor VM controller (Vidalia).
 +exit 0
-diff -Naur orig-kamikaze/package/base-files/files/etc/sysctl.conf mod-basefiles-kamikaze/package/base-files/files/etc/sysctl.conf
---- orig-kamikaze/package/base-files/files/etc/sysctl.conf	2007-10-24 18:44:07.273843000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/etc/sysctl.conf	2008-10-03 00:31:58.174427646 +0000
-@@ -1,14 +1,10 @@
+diff -Naur a/package/base-files/files/etc/sysctl.conf b/package/base-files/files/etc/sysctl.conf
+--- a/package/base-files/files/etc/sysctl.conf	2009-01-30 14:13:09.991360000 +0000
++++ b/package/base-files/files/etc/sysctl.conf	2009-02-01 09:46:11.655738520 +0000
+@@ -1,16 +1,13 @@
  kernel.panic=3
 -net.ipv4.conf.default.arp_ignore=1
 -net.ipv4.conf.all.arp_ignore=1
  net.ipv4.ip_forward=1
  net.ipv4.icmp_echo_ignore_broadcasts=1
  net.ipv4.icmp_ignore_bogus_error_responses=1
+ net.ipv4.tcp_ecn=1 
 -net.ipv4.tcp_fin_timeout=30
 +net.ipv4.tcp_fin_timeout=10
  net.ipv4.tcp_keepalive_time=120
 -net.ipv4.tcp_syncookies=1
++net.ipv4.tcp_syncookies=0
  net.ipv4.tcp_timestamps=0
- net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=3600                    
--net.ipv4.netfilter.ip_conntrack_udp_timeout=60                                  
--net.ipv4.netfilter.ip_conntrack_udp_timeout_stream=180                          
--net.ipv6.conf.all.forwarding=1
+-net.ipv4.netfilter.ip_conntrack_max=16384
++net.ipv4.netfilter.ip_conntrack_max=65535
+ net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=3600
+-net.ipv4.netfilter.ip_conntrack_udp_timeout=60
+-net.ipv4.netfilter.ip_conntrack_udp_timeout_stream=180
+-# 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 orig-kamikaze/package/base-files/files/lib/config/parse_spec.awk mod-basefiles-kamikaze/package/base-files/files/lib/config/parse_spec.awk
---- orig-kamikaze/package/base-files/files/lib/config/parse_spec.awk	2007-03-04 04:41:46.644094000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/lib/config/parse_spec.awk	1970-01-01 00:00:00.000000000 +0000
++net.ipv4.netfilter.ip_conntrack_udp_timeout_stream=1800
+diff -Naur a/package/base-files/files/lib/config/parse_spec.awk b/package/base-files/files/lib/config/parse_spec.awk
+--- a/package/base-files/files/lib/config/parse_spec.awk	2007-03-04 04:41:46.644094000 +0000
++++ b/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
 -#
@@ -1612,9 +2148,9 @@
 -		section=""
 -	}
 -}
-diff -Naur orig-kamikaze/package/base-files/files/lib/config/specs/network.spec mod-basefiles-kamikaze/package/base-files/files/lib/config/specs/network.spec
---- orig-kamikaze/package/base-files/files/lib/config/specs/network.spec	2007-03-04 04:41:46.644094000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/lib/config/specs/network.spec	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/lib/config/specs/network.spec b/package/base-files/files/lib/config/specs/network.spec
+--- a/package/base-files/files/lib/config/specs/network.spec	2007-03-04 04:41:46.644094000 +0000
++++ b/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;
@@ -1623,9 +2159,9 @@
 -	gateway: ip;
 -	dns: ip;
 -}
-diff -Naur orig-kamikaze/package/base-files/files/lib/config/template.awk mod-basefiles-kamikaze/package/base-files/files/lib/config/template.awk
---- orig-kamikaze/package/base-files/files/lib/config/template.awk	2007-03-04 04:41:46.644094000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/lib/config/template.awk	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/lib/config/template.awk b/package/base-files/files/lib/config/template.awk
+--- a/package/base-files/files/lib/config/template.awk	2007-03-04 04:41:46.644094000 +0000
++++ b/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
 -
@@ -1669,9 +2205,9 @@
 -	if_open = 0
 -	noprint = 0
 -}
-diff -Naur orig-kamikaze/package/base-files/files/lib/config/validate.sh mod-basefiles-kamikaze/package/base-files/files/lib/config/validate.sh
---- orig-kamikaze/package/base-files/files/lib/config/validate.sh	2007-03-04 04:41:46.644094000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/lib/config/validate.sh	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/lib/config/validate.sh b/package/base-files/files/lib/config/validate.sh
+--- a/package/base-files/files/lib/config/validate.sh	2007-03-04 04:41:46.644094000 +0000
++++ b/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
 -#
@@ -1747,9 +2283,9 @@
 -
 -	return ${VALIDATE_RES:-0}
 -)}
-diff -Naur orig-kamikaze/package/base-files/files/lib/config/validate_config.awk mod-basefiles-kamikaze/package/base-files/files/lib/config/validate_config.awk
---- orig-kamikaze/package/base-files/files/lib/config/validate_config.awk	2007-03-04 04:41:46.644094000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/lib/config/validate_config.awk	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/lib/config/validate_config.awk b/package/base-files/files/lib/config/validate_config.awk
+--- a/package/base-files/files/lib/config/validate_config.awk	2007-03-04 04:41:46.644094000 +0000
++++ b/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
 -#
@@ -1856,9 +2392,9 @@
 -	return valid
 -}
 -
-diff -Naur orig-kamikaze/package/base-files/files/lib/config/validate_spec.awk mod-basefiles-kamikaze/package/base-files/files/lib/config/validate_spec.awk
---- orig-kamikaze/package/base-files/files/lib/config/validate_spec.awk	2007-03-04 04:41:46.644094000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/lib/config/validate_spec.awk	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/lib/config/validate_spec.awk b/package/base-files/files/lib/config/validate_spec.awk
+--- a/package/base-files/files/lib/config/validate_spec.awk	2007-03-04 04:41:46.644094000 +0000
++++ b/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
 -#
@@ -2031,10 +2567,10 @@
 -END {
 -	validate_config()
 -}
-diff -Naur orig-kamikaze/package/base-files/files/lib/network/config.sh mod-basefiles-kamikaze/package/base-files/files/lib/network/config.sh
---- orig-kamikaze/package/base-files/files/lib/network/config.sh	2008-04-07 16:02:50.405821000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/lib/network/config.sh	1970-01-01 00:00:00.000000000 +0000
-@@ -1,228 +0,0 @@
+diff -Naur a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
+--- a/package/base-files/files/lib/network/config.sh	2008-11-17 10:47:02.945064000 +0000
++++ b/package/base-files/files/lib/network/config.sh	1970-01-01 00:00:00.000000000 +0000
+@@ -1,298 +0,0 @@
 -#!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
 -
@@ -2098,9 +2634,21 @@
 -	[ "$1" = "$vif" ] || ifconfig "$1" >/dev/null 2>/dev/null || {
 -		ifconfig "$vif" up 2>/dev/null >/dev/null || add_vlan "$vif"
 -		$DEBUG vconfig add "$vif" "${1##*\.}"
+-		return 0
 -	}
+-	return 1
 -}
 -
+-# sort the device list, drop duplicates
+-sort_list() {
+-	local arg="$*"
+-	(
+-		for item in $arg; do
+-			echo "$item"
+-		done
+-	) | sort -u
+-}
+-
 -# Create the interface, if necessary.
 -# Return status 0 indicates that the setup_interface() call should continue
 -# Return status 1 means that everything is set up already.
@@ -2115,13 +2663,13 @@
 -	[ "br-$config" = "$iface" -o -e "$iface" ] && return 0;
 -	
 -	ifconfig "$iface" 2>/dev/null >/dev/null && {
--		# make sure the interface is removed from any existing bridge and brought down
--		ifconfig "$iface" down
+-		# make sure the interface is removed from any existing bridge and deconfigured 
+-		ifconfig "$iface" 0.0.0.0
 -		unbridge "$iface"
 -	}
 -
 -	# Setup VLAN interfaces
--	add_vlan "$iface"
+-	add_vlan "$iface" && return 1
 -	ifconfig "$iface" 2>/dev/null >/dev/null || return 0
 -
 -	# Setup bridging
@@ -2131,6 +2679,13 @@
 -		bridge)
 -			[ -x /usr/sbin/brctl ] && {
 -				ifconfig "br-$config" 2>/dev/null >/dev/null && {
+-					local newdevs=
+-
+-					config_get devices "$config" device
+-					for dev in $(sort_list "$devices" "$iface"); do
+-						append newdevs "$dev"
+-					done
+-					uci_set_state network "$config" device "$newdevs"
 -					$DEBUG brctl addif "br-$config" "$iface"
 -					# Bridge existed already. No further processing necesary
 -				} || {
@@ -2138,7 +2693,7 @@
 -					$DEBUG brctl setfd "br-$config" 0
 -					$DEBUG ifconfig "br-$config" up
 -					$DEBUG brctl addif "br-$config" "$iface"
--					$DEBUG brctl stp "br-$config" ${stp:-off}
+-					$DEBUG brctl stp "br-$config" ${stp:-0}
 -					# Creating the bridge here will have triggered a hotplug event, which will
 -					# result in another setup_interface() call, so we simply stop processing
 -					# the current event at this point.
@@ -2160,6 +2715,70 @@
 -	uci_set_state network "$config" device "$device"
 -}
 -
+-setup_interface_none() {
+-	env -i ACTION="ifup" INTERFACE="$2" DEVICE="$1" PROTO=none /sbin/hotplug-call "iface" &
+-}
+-
+-setup_interface_static() {
+-	local iface="$1"
+-	local config="$2"
+-
+-	config_get ipaddr "$config" ipaddr
+-	config_get netmask "$config" netmask
+-	config_get ip6addr "$config" ip6addr
+-	[ -z "$ipaddr" -o -z "$netmask" ] && [ -z "$ip6addr" ] && return 1
+-	
+-	config_get gateway "$config" gateway
+-	config_get ip6gw "$config" ip6gw
+-	config_get dns "$config" dns
+-	config_get bcast "$config" broadcast
+-	
+-	[ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" broadcast "${bcast:-+}"
+-	[ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" add "$ip6addr"
+-	[ -z "$gateway" ] || $DEBUG route add default gw "$gateway" dev "$iface"
+-	[ -z "$ip6gw" ] || $DEBUG route -A inet6 add default gw "$ip6gw" dev "$iface"
+-	[ -z "$dns" ] || {
+-		for ns in $dns; do
+-			grep "$ns" /tmp/resolv.conf.auto 2>/dev/null >/dev/null || {
+-				echo "nameserver $ns" >> /tmp/resolv.conf.auto
+-			}
+-		done
+-	}
+-
+-	env -i ACTION="ifup" INTERFACE="$config" DEVICE="$iface" PROTO=static /sbin/hotplug-call "iface" &
+-}
+-
+-setup_interface_alias() {
+-	local config="$1"
+-	local parent="$2"
+-	local iface="$3"
+-
+-	config_get cfg "$config" interface
+-	[ "$parent" == "$cfg" ] || return 0
+-
+-	# alias counter
+-	config_get ctr "$parent" alias_count
+-	ctr="$(($ctr + 1))"
+-	config_set "$parent" alias_count "$ctr"
+-
+-	# alias list
+-	config_get list "$parent" aliases
+-	append list "$config"
+-	config_set "$parent" aliases "$list"
+-
+-	set_interface_ifname "$config" "$iface:$ctr"
+-	config_get proto "$config" proto
+-	case "${proto:-static}" in
+-		static)
+-			setup_interface_static "$iface:$ctr" "$config"
+-		;;
+-		*) 
+-			echo "Unsupported type '$proto' for alias config '$config'"
+-			return 1
+-		;;
+-	esac
+-}
+-
 -setup_interface() {
 -	local iface="$1"
 -	local config="$2"
@@ -2186,59 +2805,41 @@
 -	config_get mtu "$config" mtu
 -	config_get macaddr "$config" macaddr
 -	grep "$iface:" /proc/net/dev > /dev/null && \
+-		$DEBUG ifconfig "$iface" down && \
 -		$DEBUG ifconfig "$iface" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} up
 -	set_interface_ifname "$config" "$iface"
 -
 -	pidfile="/var/run/$iface.pid"
 -	case "$proto" in
 -		static)
--			config_get ipaddr "$config" ipaddr
--			config_get netmask "$config" netmask
--			config_get ip6addr "$config" ip6addr
--			[ -z "$ipaddr" -o -z "$netmask" ] && [ -z "$ip6addr" ] && return 1
--			
--			config_get gateway "$config" gateway
--			config_get ip6gw "$config" ip6gw
--			config_get dns "$config" dns
--			config_get bcast "$config" broadcast
--			
--			[ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" broadcast "${bcast:-+}"
--			[ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" add "$ip6addr"
--			[ -z "$gateway" ] || $DEBUG route add default gw "$gateway"
--			[ -z "$ip6gw" ] || $DEBUG route -A inet6 add default gw "$ip6gw"
--			[ -z "$dns" ] || {
--				for ns in $dns; do
--					grep "$ns" /tmp/resolv.conf.auto 2>/dev/null >/dev/null || {
--						echo "nameserver $ns" >> /tmp/resolv.conf.auto
--					}
--				done
--			}
--
--			env -i ACTION="ifup" INTERFACE="$config" DEVICE="$iface" PROTO=static /sbin/hotplug-call "iface" &
+-			setup_interface_static "$iface" "$config"
 -		;;
 -		dhcp)
 -			# prevent udhcpc from starting more than once
 -			lock "/var/lock/dhcp-$iface"
 -			pid="$(cat "$pidfile" 2>/dev/null)"
--			[ -d "/proc/$pid" ] && grep udhcpc "/proc/${pid}/cmdline" >/dev/null 2>/dev/null && {
+-			if [ -d "/proc/$pid" ] && grep udhcpc "/proc/${pid}/cmdline" >/dev/null 2>/dev/null; then
 -				lock -u "/var/lock/dhcp-$iface"
--				return 0
--			}
+-			else
 -
--			config_get ipaddr "$config" ipaddr
--			config_get netmask "$config" netmask
--			config_get hostname "$config" hostname
--			config_get proto1 "$config" proto
--			config_get clientid "$config" clientid
+-				config_get ipaddr "$config" ipaddr
+-				config_get netmask "$config" netmask
+-				config_get hostname "$config" hostname
+-				config_get proto1 "$config" proto
+-				config_get clientid "$config" clientid
 -
--			[ -z "$ipaddr" ] || \
--				$DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
+-				[ -z "$ipaddr" ] || \
+-					$DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
 -
--			# don't stay running in background if dhcp is not the main proto on the interface (e.g. when using pptp)
--			[ ."$proto1" != ."$proto" ] && dhcpopts="-n -q"
--			$DEBUG eval udhcpc -t 0 -i "$iface" ${ipaddr:+-r $ipaddr} ${hostname:+-H $hostname} ${clientid:+-c $clientid} -b -p "$pidfile" ${dhcpopts:- -R &}
--			lock -u "/var/lock/dhcp-$iface"
+-				# don't stay running in background if dhcp is not the main proto on the interface (e.g. when using pptp)
+-				[ ."$proto1" != ."$proto" ] && dhcpopts="-n -q"
+-				$DEBUG eval udhcpc -t 0 -i "$iface" ${ipaddr:+-r $ipaddr} ${hostname:+-H $hostname} ${clientid:+-c $clientid} -b -p "$pidfile" ${dhcpopts:- -R &}
+-				lock -u "/var/lock/dhcp-$iface"
+-			fi
 -		;;
+-		none)
+-			setup_interface_none "$iface" "$config"
+-		;;
 -		*)
 -			if ( eval "type setup_interface_$proto" ) >/dev/null 2>/dev/null; then
 -				eval "setup_interface_$proto '$iface' '$config' '$proto'" 
@@ -2248,6 +2849,11 @@
 -			fi
 -		;;
 -	esac
+-	config_set "$config" aliases ""
+-	config_set "$config" alias_count 0
+-	config_foreach setup_interface_alias alias "$config" "$iface"
+-	config_get aliases "$config" aliases
+-	[ -z "$aliases" ] || uci_set_state network "$config" aliases "$aliases"
 -}
 -
 -unbridge() {
@@ -2263,10 +2869,10 @@
 -		done
 -	}
 -}
-diff -Naur orig-kamikaze/package/base-files/files/lib/upgrade/common.sh mod-basefiles-kamikaze/package/base-files/files/lib/upgrade/common.sh
---- orig-kamikaze/package/base-files/files/lib/upgrade/common.sh	2008-06-04 23:20:56.755507000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/lib/upgrade/common.sh	1970-01-01 00:00:00.000000000 +0000
-@@ -1,151 +0,0 @@
+diff -Naur a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
+--- a/package/base-files/files/lib/upgrade/common.sh	2008-09-25 11:31:35.208889000 +0000
++++ b/package/base-files/files/lib/upgrade/common.sh	1970-01-01 00:00:00.000000000 +0000
+@@ -1,165 +0,0 @@
 -#!/bin/sh
 -
 -RAM_ROOT=/tmp/root
@@ -2314,7 +2920,7 @@
 -}
 -
 -run_ramfs() { # <command> [...]
--	install_bin /bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount /sbin/pivot_root /usr/bin/wget /sbin/reboot /bin/sync /bin/dd /bin/grep /bin/cp /bin/mv /bin/tar /usr/bin/md5sum "/usr/bin/[" /bin/vi /bin/ls /bin/cat
+-	install_bin /bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount /sbin/pivot_root /usr/bin/wget /sbin/reboot /bin/sync /bin/dd /bin/grep /bin/cp /bin/mv /bin/tar /usr/bin/md5sum "/usr/bin/[" /bin/vi /bin/ls /bin/cat /usr/bin/awk /usr/bin/hexdump
 -	install_bin /sbin/mtd
 -	for file in $RAMFS_COPY_BIN; do
 -		install_bin $file
@@ -2382,7 +2988,7 @@
 -}
 -
 -get_magic_word() {
--	get_image "$1" | dd bs=2 count=1 2>/dev/null | hexdump | awk '$2 { print $2 }'
+-	get_image "$1" | dd bs=2 count=1 2>/dev/null | hexdump -C | awk '$2 { print $2 $3 }'
 -}
 -
 -refresh_mtd_partitions() {
@@ -2399,11 +3005,24 @@
 -	fi
 -}
 -
+-default_do_upgrade() {
+-	if [ "$SAVE_CONFIG" -eq 1 -a -z "$USE_REFRESH" ]; then
+-		get_image "$1" | mtd -j "$CONF_TAR" write - "${PART_NAME:-image}"
+-	else
+-		get_image "$1" | mtd write - "${PART_NAME:-image}"
+-	fi
+-	sync
+-}
+-
 -do_upgrade() {
 -	v "Performing system upgrade..."
--	platform_do_upgrade "$ARGV"
+-	if type 'platform_do_upgrade' >/dev/null 2>/dev/null; then
+-		platform_do_upgrade "$ARGV"
+-	else
+-		default_do_upgrade "$ARGV"
+-	fi
 -	
--	[ "$SAVE_CONFIG" -eq 1 ] && {
+-	[ "$SAVE_CONFIG" -eq 1 -a -n "$USE_REFRESH" ] && {
 -		v "Refreshing partitions"
 -		if type 'platform_refresh_partitions' >/dev/null 2>/dev/null; then
 -			platform_refresh_partitions
@@ -2416,18 +3035,19 @@
 -			jffs2_copy_config
 -		fi
 -	}
+-	[ -n "$DELAY" ] && sleep "$DELAY"
 -	ask_bool 1 "Reboot" && reboot
 -}
-diff -Naur orig-kamikaze/package/base-files/files/rom/note mod-basefiles-kamikaze/package/base-files/files/rom/note
---- orig-kamikaze/package/base-files/files/rom/note	2005-07-17 22:52:59.000000000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/rom/note	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/rom/note b/package/base-files/files/rom/note
+--- a/package/base-files/files/rom/note	2005-07-17 22:52:59.000000000 +0000
++++ b/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 orig-kamikaze/package/base-files/files/sbin/hotplug-call mod-basefiles-kamikaze/package/base-files/files/sbin/hotplug-call
---- orig-kamikaze/package/base-files/files/sbin/hotplug-call	2007-06-15 16:07:09.574671000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/sbin/hotplug-call	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/sbin/hotplug-call b/package/base-files/files/sbin/hotplug-call
+--- a/package/base-files/files/sbin/hotplug-call	2007-06-15 16:07:09.574671000 +0000
++++ b/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
@@ -2457,16 +3077,17 @@
 -		[ -f $script ] && . $script
 -	); done
 -}
-diff -Naur orig-kamikaze/package/base-files/files/sbin/ifdown mod-basefiles-kamikaze/package/base-files/files/sbin/ifdown
---- orig-kamikaze/package/base-files/files/sbin/ifdown	2008-02-03 06:48:15.292457000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/sbin/ifdown	1970-01-01 00:00:00.000000000 +0000
-@@ -1,66 +0,0 @@
+diff -Naur a/package/base-files/files/sbin/ifdown b/package/base-files/files/sbin/ifdown
+--- a/package/base-files/files/sbin/ifdown	2008-10-29 20:31:14.226470000 +0000
++++ b/package/base-files/files/sbin/ifdown	1970-01-01 00:00:00.000000000 +0000
+@@ -1,72 +0,0 @@
 -#!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
 -
 -. /etc/functions.sh
 -[ $# = 0 ] && { echo "  $0 <group>"; exit; }
 -[ "x$1" = "x-a" ] && {
+-	[ -e "/tmp/resolv.conf.auto" ] && rm /tmp/resolv.conf.auto
 -	config_cb() {
 -		[ interface != "$1" -o -z "$2" ] || eval "$0 $2"
 -	}
@@ -2474,9 +3095,6 @@
 -	exit
 -}
 -
--# remove the interface's network state
--uci_revert_state network "$1"
--
 -include /lib/network
 -scan_interfaces
 -
@@ -2527,26 +3145,75 @@
 -config_get iftype "$cfg" type
 -[ "bridge" = "$iftype" ] && brctl delbr "$ifname" >/dev/null 2>/dev/null
 -
-diff -Naur orig-kamikaze/package/base-files/files/sbin/ifup mod-basefiles-kamikaze/package/base-files/files/sbin/ifup
---- orig-kamikaze/package/base-files/files/sbin/ifup	2006-10-24 23:59:08.851426000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/sbin/ifup	1970-01-01 00:00:00.000000000 +0000
-@@ -1,11 +0,0 @@
+-# remove the interface's network state
+-uci_revert_state network "$1"
+-
+-# revert aliases state as well
+-config_get aliases "$1" aliases
+-for config in $aliases; do
+-	uci_revert_state network "$config"
+-done
+diff -Naur a/package/base-files/files/sbin/ifup b/package/base-files/files/sbin/ifup
+--- a/package/base-files/files/sbin/ifup	2008-11-28 16:13:23.311140000 +0000
++++ b/package/base-files/files/sbin/ifup	1970-01-01 00:00:00.000000000 +0000
+@@ -1,23 +0,0 @@
 -#!/bin/sh
 -# Copyright (C) 2006 OpenWrt.org
 -
--. /sbin/ifdown "$@"
+-/sbin/ifdown "$@"
 -
--config_get iftype "$1" type
+-. /etc/functions.sh
+-[ $# = 0 ] && { echo "  $0 <group>"; exit; }
+-[ "x$1" = "x-a" ] && {
+-	[ -e "/tmp/resolv.conf.auto" ] && rm /tmp/resolv.conf.auto
+-	config_cb() {
+-		[ interface != "$1" -o -z "$2" ] || eval "$0 $2"
+-	}
+-	config_load network
+-	exit
+-}
+-
+-include /lib/network
+-scan_interfaces
+-
 -config_get ifname "$1" device
--
 -for dev in $ifname; do
 -	setup_interface "$dev" "$1"
 -done
-diff -Naur orig-kamikaze/package/base-files/files/sbin/mount_root mod-basefiles-kamikaze/package/base-files/files/sbin/mount_root
---- orig-kamikaze/package/base-files/files/sbin/mount_root	2007-05-31 12:09:08.638373000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/sbin/mount_root	1970-01-01 00:00:00.000000000 +0000
+diff -Naur a/package/base-files/files/sbin/led.sh b/package/base-files/files/sbin/led.sh
+--- a/package/base-files/files/sbin/led.sh	2008-09-13 00:08:39.328720000 +0000
++++ b/package/base-files/files/sbin/led.sh	1970-01-01 00:00:00.000000000 +0000
 @@ -1,25 +0,0 @@
 -#!/bin/sh
+-# (C) 2008 openwrt.org
+-
+-. /etc/functions.sh
+-ACTION=$1
+-NAME=$2
+-do_led() {
+-	local name
+-	local sysfs
+-	config_get name $1 name
+-	config_get sysfs $1 sysfs
+-	[ "$name" == "$NAME" -o "$sysfs" = "$NAME" -a -e "/sys/class/leds/${sysfs}" ] && {
+-		[ "$ACTION" == "set" ] &&
+-			echo 1 >/sys/class/leds/${sysfs}/brightness \
+-			|| echo 0 >/sys/class/leds/${sysfs}/brightness
+-		exit 0
+-	}
+-}
+-
+-[ "$1" == "clear" -o "$1" == "set" ] &&
+-	[ -n "$2" ] &&{
+-		config_load system
+-		config_foreach do_led
+-		exit 1
+-	}
+diff -Naur a/package/base-files/files/sbin/mount_root b/package/base-files/files/sbin/mount_root
+--- a/package/base-files/files/sbin/mount_root	2007-05-31 12:09:08.638373000 +0000
++++ b/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
 -. /etc/functions.sh
 -
@@ -2571,10 +3238,10 @@
 -	mtd unlock rootfs
 -	mount -o remount,rw /dev/root /
 -}
-diff -Naur orig-kamikaze/package/base-files/files/sbin/sysupgrade mod-basefiles-kamikaze/package/base-files/files/sbin/sysupgrade
---- orig-kamikaze/package/base-files/files/sbin/sysupgrade	2007-08-21 18:23:57.703561000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/sbin/sysupgrade	1970-01-01 00:00:00.000000000 +0000
-@@ -1,92 +0,0 @@
+diff -Naur a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
+--- a/package/base-files/files/sbin/sysupgrade	2008-09-28 19:45:59.928625000 +0000
++++ b/package/base-files/files/sbin/sysupgrade	1970-01-01 00:00:00.000000000 +0000
+@@ -1,111 +0,0 @@
 -#!/bin/sh
 -. /etc/functions.sh
 -
@@ -2584,13 +3251,18 @@
 -export INTERACTIVE=0
 -export VERBOSE=1
 -export SAVE_CONFIG=1
+-export DELAY=
+-export CONF_IMAGE=
 -
 -# parse options
 -while [ -n "$1" ]; do 
 -	case "$1" in
 -		-i) export INTERACTIVE=1;;
+-		-d) export DELAY="$2"; shift;;
 -		-v) export VERBOSE="$(($VERBOSE + 1))";;
 -		-q) export VERBOSE="$(($VERBOSE - 1))";;
+-		-n) export SAVE_CONFIG=0;;
+-		-f) export CONF_IMAGE="$2"; shift;;
 -		-*)
 -			echo "Invalid option: $1"
 -			exit 1
@@ -2611,9 +3283,12 @@
 -Usage: $0 [options] <image file or URL>
 -
 -Options:
--	-i	interactive mode
--	-v	more verbose
--	-q	less verbose
+-	-d <delay>   add a delay before rebooting
+-	-f <config>  restore configuration from .tar.gz (file or url)
+-	-i           interactive mode
+-	-n	     do not save configuration over reflash
+-	-q           less verbose
+-	-v           more verbose
 -
 -EOF
 -	exit 1
@@ -2621,7 +3296,7 @@
 -
 -add_uci_conffiles() {
 -	local file="$1"
--	find /etc/config > "$file"
+-	find /etc/config /etc/passwd /etc/group /etc/dropbear /etc/firewall.user > "$file"
 -	return 0
 -}
 -
@@ -2657,7 +3332,18 @@
 -	}
 -done
 -
--if ask_bool $SAVE_CONFIG "Keep config files over reflash"; then
+-if [ -n "$CONF_IMAGE" ]; then
+-	case "$(get_magic_word "$CONF_IMAGE")" in
+-		# .gz files
+-		1f8b) ;;
+-		*)
+-			echo "Invalid config file. Please use only .tar.gz files"
+-			exit 1
+-		;;
+-	esac
+-	get_image "$CONF_IMAGE" > "$CONF_TAR"
+-	export SAVE_CONFIG=1
+-elif ask_bool $SAVE_CONFIG "Keep config files over reflash"; then
 -	do_save_conffiles
 -	export SAVE_CONFIG=1
 -else
@@ -2667,43 +3353,11 @@
 -
 -v "Switching to ramdisk..."
 -run_ramfs '. /etc/functions.sh; include /lib/upgrade; do_upgrade'
-diff -Naur orig-kamikaze/package/base-files/files/sbin/usb-storage mod-basefiles-kamikaze/package/base-files/files/sbin/usb-storage
---- orig-kamikaze/package/base-files/files/sbin/usb-storage	2007-11-04 15:12:08.860897000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/sbin/usb-storage	1970-01-01 00:00:00.000000000 +0000
-@@ -1,28 +0,0 @@
+diff -Naur a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
+--- a/package/base-files/files/sbin/wifi	2008-10-29 17:26:49.127150000 +0000
++++ b/package/base-files/files/sbin/wifi	1970-01-01 00:00:00.000000000 +0000
+@@ -1,124 +0,0 @@
 -#!/bin/sh
--
--# Copyright (C) 2007 OpenWrt.org
--
--logger "usb device is mass storage"
--i=0
--while [ $i -le 10 ]; do
--	logger "waiting on usb drive $i ..."
--	i=$(($i+1))
--	cd /sys${DEVPATH}
--	for blk in `find host* -type d 2>/dev/null`; do
--		cd /sys/${DEVPATH}/${blk}
--		BLK=$(find block* -type l 2>/dev/null)
--		[ -n "${BLK}" ] && {
--			cd /sys${DEVPATH}/${blk}/${BLK}
--			ls /dev/ > /tmp/d
--			sleep 2
--			for node in `find sd* -type d 2>/dev/null| grep -v "/"`; do
--				echo "mounting /dev/${node} on /mnt/usbdrive"
--				mkdir -p /mnt/usbdrive
--				mount /dev/${node} /mnt/usbdrive
--				exit 0
--			done
--		}
--	done
--	sleep 1
--done
--
-diff -Naur orig-kamikaze/package/base-files/files/sbin/wifi mod-basefiles-kamikaze/package/base-files/files/sbin/wifi
---- orig-kamikaze/package/base-files/files/sbin/wifi	2008-02-03 06:48:15.292457000 +0000
-+++ mod-basefiles-kamikaze/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
 -
 -. /etc/functions.sh
@@ -2772,6 +3426,7 @@
 -	local iface="$1"
 -	local config="$2"
 -
+-	[ -f "/var/run/$iface.pid" ] && kill "$(cat /var/run/${iface}.pid)" 2>/dev/null
 -	include /lib/network
 -	scan_interfaces
 -	setup_interface "$1" "$2"
@@ -2788,6 +3443,8 @@
 -	local cfg="$1"
 -	local vifs vif vifstr
 -
+-	[ -f "/var/run/wifi-${cfg}.pid" ] &&
+-		kill "$(cat "/var/run/wifi-${cfg}.pid")"
 -	uci_revert_state wireless "$cfg"
 -	config_get vifs "$cfg" vifs
 -	for vif in $vifs; do
@@ -2824,9 +3481,81 @@
 -	detect) wifi_detect "$2";;
 -	*) wifi_updown "enable" "$2";;
 -esac
-diff -Naur orig-kamikaze/package/base-files/files/usr/share/udhcpc/default.script mod-basefiles-kamikaze/package/base-files/files/usr/share/udhcpc/default.script
---- orig-kamikaze/package/base-files/files/usr/share/udhcpc/default.script	2008-02-03 06:48:15.292457000 +0000
-+++ mod-basefiles-kamikaze/package/base-files/files/usr/share/udhcpc/default.script	2008-10-03 00:31:58.177760879 +0000
+diff -Naur a/package/base-files/files/usr/lib/common.awk b/package/base-files/files/usr/lib/common.awk
+--- a/package/base-files/files/usr/lib/common.awk	2007-03-04 04:41:46.644094000 +0000
++++ b/package/base-files/files/usr/lib/common.awk	1970-01-01 00:00:00.000000000 +0000
+@@ -1,68 +0,0 @@
+-# Copyright (C) 2006 OpenWrt.org
+-
+-function portstr(type, str) {
+-	gsub(/-/, ":", str)
+-	if (insmod_mport != 1) {
+-		print "insmod ipt_multiport >&- 2>&-"
+-		insmod_mport = 1
+-	}
+-	if (type == "src") return " -m multiport --sports " str
+-	else return " -m multiport --dports " str
+-}
+-
+-function str2ipt(str) {
+-	str2data(str)
+-	_cmd = ""
+-	if (_l["src"] != "") _cmd = _cmd " -s " _l["src"]
+-	if (_l["dest"] != "") _cmd = _cmd " -d " _l["dest"]
+-	if (_l["proto"] != "") {
+-		_cmd = _cmd " -p " _l["proto"]
+-	}
+-	# scripts need to check for proto="" and emit two rules in that case
+-	if ((_l["proto"] == "") || (_l["proto"] == "tcp") || (_l["proto"] == "udp")) {
+-		if (_l["sport"] != "") _cmd = _cmd portstr("src", _l["sport"])
+-		if (_l["dport"] != "") _cmd = _cmd portstr("dest", _l["dport"])
+-	}
+-	if (_l["layer7"] != "") {
+-		if (insmod_l7 != 1) {
+-			print "insmod ipt_layer7 >&- 2>&-"
+-			insmod_l7 = 1
+-		}
+-		_cmd = _cmd " -m layer7 --l7proto " _l["layer7"]
+-	}
+-	return _cmd
+-}
+-
+-function str2data(str) {
+-	delete _l
+-	_n = split(str, _o, "[\t ]")
+-	for (_i = 1; _i <= _n; _i++) {
+-		_n2 = split(_o[_i], _c, "=")
+-		if (_n2 == 2) _l[_c[1]] = _c[2]
+-	}
+-}
+-
+-function bitcount(c) {
+-	c=and(rshift(c, 1),0x55555555)+and(c,0x55555555)
+-	c=and(rshift(c, 2),0x33333333)+and(c,0x33333333)
+-	c=and(rshift(c, 4),0x0f0f0f0f)+and(c,0x0f0f0f0f)
+-	c=and(rshift(c, 8),0x00ff00ff)+and(c,0x00ff00ff)
+-	c=and(rshift(c,16),0x0000ffff)+and(c,0x0000ffff)
+-	return c
+-}
+-
+-function validate_netmask(nm) {
+-	return and(-nm,compl(nm))
+-}
+-
+-function ip2int(ip) {
+-	for (ret=0,n=split(ip,a,"\."),x=1;x<=n;x++) ret=or(lshift(ret,8),a[x]) 
+-	return ret
+-}
+-
+-function int2ip(ip,ret,x) {
+-	ret=and(ip,255)
+-	ip=rshift(ip,8)
+-	for(;x<3;ret=and(ip,255)"."ret,ip=rshift(ip,8),x++);
+-	return ret
+-}
+diff -Naur a/package/base-files/files/usr/share/udhcpc/default.script b/package/base-files/files/usr/share/udhcpc/default.script
+--- a/package/base-files/files/usr/share/udhcpc/default.script	2008-09-23 17:29:22.613179000 +0000
++++ b/package/base-files/files/usr/share/udhcpc/default.script	2009-02-01 09:33:35.367711776 +0000
 @@ -1,33 +1,11 @@
  #!/bin/sh
  [ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1
@@ -2861,11 +3590,15 @@
  	;;
  	renew|bound)
  		ifconfig $interface $ip \
-@@ -56,8 +34,6 @@
+@@ -56,12 +34,6 @@
  			mv "${RESOLV_CONF}.tmp" "$RESOLV_CONF"
  		}
  		
--		hotplug_event ifup
+-		if [ "$1" = "renew" ]; then
+-			hotplug_event update
+-		else
+-			hotplug_event ifup
+-		fi
 -		
  		# user rules
  		[ -f /etc/udhcpc.user ] && . /etc/udhcpc.user



More information about the tor-commits mailing list