This commit was manufactured by cvs2svn to create branch 'v20040509'. v20040509
authorOpenWrt Development <openwrt-devel@lists.openwrt.org>
Tue, 25 May 2004 04:32:27 +0000 (04:32 +0000)
committerJo-Philipp Wich <jo@mein.io>
Tue, 25 May 2004 04:32:27 +0000 (04:32 +0000)
SVN-Revision: 31

36 files changed:
CVSROOT/checkoutlist [deleted file]
CVSROOT/commitinfo [deleted file]
CVSROOT/config [deleted file]
CVSROOT/cvswrappers [deleted file]
CVSROOT/editinfo [deleted file]
CVSROOT/loginfo [deleted file]
CVSROOT/modules [deleted file]
CVSROOT/notify [deleted file]
CVSROOT/rcsinfo [deleted file]
CVSROOT/taginfo [deleted file]
CVSROOT/verifymsg [deleted file]
root/bin/alldone [deleted file]
root/bin/firstboot [deleted file]
root/bin/ipkg [deleted file]
root/bin/login [deleted file]
root/etc/functions.sh [deleted file]
root/etc/init.d/S10boot [deleted file]
root/etc/init.d/S40network [deleted file]
root/etc/init.d/S45firewall [deleted file]
root/etc/init.d/S50services [deleted file]
root/etc/init.d/S99done [deleted file]
root/etc/init.d/rcS [deleted file]
root/etc/inittab [deleted file]
root/etc/ipkg.conf [deleted file]
root/etc/nvram.overrides [deleted file]
root/etc/preinit [deleted file]
root/etc/profile [deleted file]
root/etc/sysctl.conf [deleted file]
root/etc/udhcpd.conf [deleted file]
root/sbin/hotplug [deleted file]
root/usr/local/jffs_mount_point_placeholder [deleted file]
root/usr/share/udhcpc/default.bound [deleted file]
root/usr/share/udhcpc/default.deconfig [deleted file]
root/usr/share/udhcpc/default.renew [deleted file]
root/usr/share/udhcpc/default.script [deleted file]
root/www/index.html [deleted file]

diff --git a/CVSROOT/checkoutlist b/CVSROOT/checkoutlist
deleted file mode 100644 (file)
index b04b350..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# The "checkoutlist" file is used to support additional version controlled
-# administrative files in $CVSROOT/CVSROOT, such as template files.
-#
-# The first entry on a line is a filename which will be checked out from
-# the corresponding RCS file in the $CVSROOT/CVSROOT directory.
-# The remainder of the line is an error message to use if the file cannot
-# be checked out.
-#
-# File format:
-#
-#      [<whitespace>]<filename><whitespace><error message><end-of-line>
-#
-# comment lines begin with '#'
diff --git a/CVSROOT/commitinfo b/CVSROOT/commitinfo
deleted file mode 100644 (file)
index b19e7b7..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-# The "commitinfo" file is used to control pre-commit checks.
-# The filter on the right is invoked with the repository and a list 
-# of files to check.  A non-zero exit of the filter program will 
-# cause the commit to be aborted.
-#
-# The first entry on a line is a regular expression which is tested
-# against the directory that the change is being committed to, relative
-# to the $CVSROOT.  For the first match that is found, then the remainder
-# of the line is the name of the filter to run.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name "ALL" appears as a regular expression it is always used
-# in addition to the first matching regex or "DEFAULT".
diff --git a/CVSROOT/config b/CVSROOT/config
deleted file mode 100644 (file)
index ff43ec0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# Set this to "no" if pserver shouldn't check system users/passwords
-#SystemAuth=no
-
-# Put CVS lock files in this directory rather than directly in the repository.
-#LockDir=/var/lock/cvs
-
-# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top
-# level of the new working directory when using the `cvs checkout'
-# command.
-#TopLevelAdmin=no
-
-# Set `LogHistory' to `all' or `TOFEWGCMAR' to log all transactions to the
-# history file, or a subset as needed (ie `TMAR' logs all write operations)
-#LogHistory=TOFEWGCMAR
diff --git a/CVSROOT/cvswrappers b/CVSROOT/cvswrappers
deleted file mode 100644 (file)
index 0accaf1..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# This file affects handling of files based on their names.
-#
-# The -t/-f options allow one to treat directories of files
-# as a single file, or to transform a file in other ways on
-# its way in and out of CVS.
-#
-# The -m option specifies whether CVS attempts to merge files.
-#
-# The -k option specifies keyword expansion (e.g. -kb for binary).
-#
-# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)
-#
-#  wildcard    [option value][option value]...
-#
-#  where option is one of
-#  -f          from cvs filter         value: path to filter
-#  -t          to cvs filter           value: path to filter
-#  -m          update methodology      value: MERGE or COPY
-#  -k          expansion mode          value: b, o, kkv, &c
-#
-#  and value is a single-quote delimited value.
-# For example:
-#*.gif -k 'b'
diff --git a/CVSROOT/editinfo b/CVSROOT/editinfo
deleted file mode 100644 (file)
index d78886c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# The "editinfo" file is used to allow verification of logging
-# information.  It works best when a template (as specified in the
-# rcsinfo file) is provided for the logging procedure.  Given a
-# template with locations for, a bug-id number, a list of people who
-# reviewed the code before it can be checked in, and an external
-# process to catalog the differences that were code reviewed, the
-# following test can be applied to the code:
-#
-#   Making sure that the entered bug-id number is correct.
-#   Validating that the code that was reviewed is indeed the code being
-#       checked in (using the bug-id number or a seperate review
-#       number to identify this particular code set.).
-#
-# If any of the above test failed, then the commit would be aborted.
-#
-# Actions such as mailing a copy of the report to each reviewer are
-# better handled by an entry in the loginfo file.
-#
-# One thing that should be noted is the the ALL keyword is not
-# supported.  There can be only one entry that matches a given
-# repository.
diff --git a/CVSROOT/loginfo b/CVSROOT/loginfo
deleted file mode 100644 (file)
index 5a59f0a..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# The "loginfo" file controls where "cvs commit" log information
-# is sent.  The first entry on a line is a regular expression which must match
-# the directory that the change is being made to, relative to the
-# $CVSROOT.  If a match is found, then the remainder of the line is a filter
-# program that should expect log information on its standard input.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name ALL appears as a regular expression it is always used
-# in addition to the first matching regex or DEFAULT.
-#
-# You may specify a format string as part of the
-# filter.  The string is composed of a `%' followed
-# by a single format character, or followed by a set of format
-# characters surrounded by `{' and `}' as separators.  The format
-# characters are:
-#
-#   s = file name
-#   V = old version number (pre-checkin)
-#   v = new version number (post-checkin)
-#
-# For example:
-#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog
-# or
-#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
diff --git a/CVSROOT/modules b/CVSROOT/modules
deleted file mode 100644 (file)
index cb9e9ef..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# Three different line formats are valid:
-#      key     -a    aliases...
-#      key [options] directory
-#      key [options] directory files...
-#
-# Where "options" are composed of:
-#      -i prog         Run "prog" on "cvs commit" from top-level of module.
-#      -o prog         Run "prog" on "cvs checkout" of module.
-#      -e prog         Run "prog" on "cvs export" of module.
-#      -t prog         Run "prog" on "cvs rtag" of module.
-#      -u prog         Run "prog" on "cvs update" of module.
-#      -d dir          Place module in directory "dir" instead of module name.
-#      -l              Top-level directory only -- do not recurse.
-#
-# NOTE:  If you change any of the "Run" options above, you'll have to
-# release and re-checkout any working directories of these modules.
-#
-# And "directory" is a path to a directory relative to $CVSROOT.
-#
-# The "-a" option specifies an alias.  An alias is interpreted as if
-# everything on the right of the "-a" had been typed on the command line.
-#
-# You can encode a module within a module by using the special '&'
-# character to interpose another module into the current module.  This
-# can be useful for creating a module that consists of many directories
-# spread out over the entire source repository.
diff --git a/CVSROOT/notify b/CVSROOT/notify
deleted file mode 100644 (file)
index 34f0bc2..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-# The "notify" file controls where notifications from watches set by
-# "cvs watch add" or "cvs edit" are sent.  The first entry on a line is
-# a regular expression which is tested against the directory that the
-# change is being made to, relative to the $CVSROOT.  If it matches,
-# then the remainder of the line is a filter program that should contain
-# one occurrence of %s for the user to notify, and information on its
-# standard input.
-#
-# "ALL" or "DEFAULT" can be used in place of the regular expression.
-#
-# For example:
-#ALL mail %s -s "CVS notification"
diff --git a/CVSROOT/rcsinfo b/CVSROOT/rcsinfo
deleted file mode 100644 (file)
index 49e59f4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# The "rcsinfo" file is used to control templates with which the editor
-# is invoked on commit and import.
-#
-# The first entry on a line is a regular expression which is tested
-# against the directory that the change is being made to, relative to the
-# $CVSROOT.  For the first match that is found, then the remainder of the
-# line is the name of the file that contains the template.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name "ALL" appears as a regular expression it is always used
-# in addition to the first matching regex or "DEFAULT".
diff --git a/CVSROOT/taginfo b/CVSROOT/taginfo
deleted file mode 100644 (file)
index 274a46d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# The "taginfo" file is used to control pre-tag checks.
-# The filter on the right is invoked with the following arguments:
-#
-# $1 -- tagname
-# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d
-# $3 -- repository
-# $4->  file revision [file revision ...]
-#
-# A non-zero exit of the filter program will cause the tag to be aborted.
-#
-# The first entry on a line is a regular expression which is tested
-# against the directory that the change is being committed to, relative
-# to the $CVSROOT.  For the first match that is found, then the remainder
-# of the line is the name of the filter to run.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name "ALL" appears as a regular expression it is always used
-# in addition to the first matching regex or "DEFAULT".
diff --git a/CVSROOT/verifymsg b/CVSROOT/verifymsg
deleted file mode 100644 (file)
index 86f747c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# The "verifymsg" file is used to allow verification of logging
-# information.  It works best when a template (as specified in the
-# rcsinfo file) is provided for the logging procedure.  Given a
-# template with locations for, a bug-id number, a list of people who
-# reviewed the code before it can be checked in, and an external
-# process to catalog the differences that were code reviewed, the
-# following test can be applied to the code:
-#
-#   Making sure that the entered bug-id number is correct.
-#   Validating that the code that was reviewed is indeed the code being
-#       checked in (using the bug-id number or a seperate review
-#       number to identify this particular code set.).
-#
-# If any of the above test failed, then the commit would be aborted.
-#
-# Actions such as mailing a copy of the report to each reviewer are
-# better handled by an entry in the loginfo file.
-#
-# One thing that should be noted is the the ALL keyword is not
-# supported.  There can be only one entry that matches a given
-# repository.
diff --git a/root/bin/alldone b/root/bin/alldone
deleted file mode 100755 (executable)
index 2aee693..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-/usr/bin/killall5 -9
-umount -ar
diff --git a/root/bin/firstboot b/root/bin/firstboot
deleted file mode 100755 (executable)
index b484e1a..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-# $Id$
-
-exec 2>/dev/null
-
-umount /jffs 
-if [ -z "$(mount | grep jffs2)" ]; then
-       mtd erase OpenWrt
-       mount -t jffs2 /dev/mtdblock/4 /jffs
-       mount /dev/mtdblock/2 /rom -o ro
-       cd /jffs
-else
-       echo "firstboot has already been run"
-       echo "fixing symlinks instead"
-       cd /
-fi
-
-{
-       cd /rom
-       find . -type d
-       cd -
-} | xargs mkdir
-
-for file in $(cd /rom; find *  -type f; find *  -type l;)
-do {
-       ln -sf  /rom/$file $file
-} done
-
-touch /tmp/resolv.conf
-ln -s /tmp/resolv.conf /etc/resolv.conf
-
-umount /rom
-mount none /jffs/proc -t proc
-pivot_root /jffs /jffs/rom
-mount none /dev  -t devfs
-mount none /tmp  -t ramfs
-umount /rom/proc
-umount /rom/tmp
-umount /rom/dev
diff --git a/root/bin/ipkg b/root/bin/ipkg
deleted file mode 100755 (executable)
index b5c2ce7..0000000
+++ /dev/null
@@ -1,1173 +0,0 @@
-#!/bin/sh
-# ipkg - the itsy package management system
-#
-# Copyright (C) 2001 Carl D. Worth
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-set -e
-
-# By default do not do globbing. Any command wanting globbing should
-# explicitly enable it first and disable it afterwards.
-set -o noglob
-
-ipkg_srcs() {
-       local srcre="$1"
-       sed -ne "s/^src[[:space:]]\+$srcre[[:space:]]\+//p" < $IPKG_CONF
-}
-
-ipkg_src_names() {
-       sed -ne "s/^src[[:space:]]\+\([^[:space:]]\+\).*/\1/p" < $IPKG_CONF
-}
-
-ipkg_src_byname() {
-       local src="$1"
-       ipkg_srcs $src | head -1
-}
-
-ipkg_dests() {
-       local destre="`echo $1 | ipkg_protect_slashes`"
-       sed -ne "/^dest[[:space:]]\+$destre/{
-s/^dest[[:space:]]\+[^[:space:]]\+[[:space:]]\+//
-s/^/`echo $IPKG_OFFLINE_ROOT | ipkg_protect_slashes`/
-p
-}" < $IPKG_CONF
-}
-
-ipkg_dest_names() {
-       sed -ne "s/^dest[[:space:]]\+\([^[:space:]]\+\).*/\1/p" < $IPKG_CONF
-}
-
-ipkg_dests_all() {
-       ipkg_dests '.*'
-}
-
-ipkg_state_dirs() {
-       ipkg_dests_all | sed "s|\$|/$IPKG_DIR_PREFIX|"
-}
-
-ipkg_dest_default() {
-       ipkg_dests_all | head -1
-}
-
-ipkg_dest_default_name() {
-       ipkg_dest_names | head -1
-}
-
-ipkg_dest_byname() {
-       local dest="$1"
-       ipkg_dests $dest | head -1
-}
-
-ipkg_option() {
-       local option="$1"
-       sed -ne "s/^option[[:space:]]\+$option[[:space:]]\+//p" < $IPKG_CONF
-}
-
-ipkg_load_configuration() {
-       if [ -z "$IPKG_CONF_DIR" ]; then
-               IPKG_CONF_DIR=/etc
-       fi
-
-       IPKG_CONF="$IPKG_CONF_DIR/ipkg.conf"
-
-       if [ -z "$IPKG_OFFLINE_ROOT" ]; then
-           IPKG_OFFLINE_ROOT="`ipkg_option offline_root`"
-       fi
-       # Export IPKG_OFFLINE_ROOT for use by update-alternatives
-       export IPKG_OFFLINE_ROOT
-       if [ -n "$DEST_NAME" ]; then
-               IPKG_ROOT="`ipkg_dest_byname $DEST_NAME`"
-               if [ -z "$IPKG_ROOT" ]; then
-                       if [ -d "$IPKG_OFFLINE_ROOT$DEST_NAME" ]; then
-                               IPKG_ROOT="$IPKG_OFFLINE_ROOT$DEST_NAME";
-                       else
-                               echo "ipkg: invalid destination specification: $DEST_NAME
-Valid destinations are directories or one of the dest names from $IPKG_CONF:" >&2
-                               ipkg_dest_names >&2
-                               return 1
-                       fi
-               fi
-       else
-               IPKG_ROOT="`ipkg_dest_default`"
-       fi
-
-       # Global ipkg state directories
-       IPKG_DIR_PREFIX=usr/lib/ipkg
-       IPKG_LISTS_DIR=$IPKG_OFFLINE_ROOT/$IPKG_DIR_PREFIX/lists
-       IPKG_PENDING_DIR=$IPKG_OFFLINE_ROOT/$IPKG_DIR_PREFIX/pending
-       IPKG_TMP=$IPKG_ROOT/tmp/ipkg
-
-       # Destination specific ipkg meta-data directory
-       IPKG_STATE_DIR=$IPKG_ROOT/$IPKG_DIR_PREFIX
-
-       # Proxy Support
-       IPKG_PROXY_USERNAME="`ipkg_option proxy_username`"
-       IPKG_PROXY_PASSWORD="`ipkg_option proxy_password`"
-       IPKG_HTTP_PROXY="`ipkg_option http_proxy`"
-       IPKG_FTP_PROXY="`ipkg_option ftp_proxy`"
-       IPKG_NO_PROXY="`ipkg_option no_proxy`"
-       if [ -n "$IPKG_HTTP_PROXY" ]; then 
-               export http_proxy="$IPKG_HTTP_PROXY"
-       fi
-
-       if [ -n "$IPKG_FTP_PROXY" ]; then 
-               export ftp_proxy="$IPKG_FTP_PROXY"
-       fi
-
-       if [ -n "$IPKG_NO_PROXY" ]; then 
-               export no_proxy="$IPKG_NO_PROXY"
-       fi
-
-       IPKG_STATUS_FIELDS='\(Package\|Status\|Essential\|Version\|Conffiles\|Root\)'
-}
-
-ipkg_usage() {
-       [ $# -gt 0 ] && echo "ipkg: $*"
-       echo "
-usage: ipkg [options...] sub-command [arguments...]
-where sub-command is one of:
-
-Package Manipulation:
-       update                  Update list of available packages
-       upgrade                 Upgrade all installed packages to latest version
-       install <pkg>           Download and install <pkg> (and dependencies)
-       install <file.ipk>      Install package <file.ipk>
-       install <file.deb>      Install package <file.deb>
-       remove <pkg>            Remove package <pkg>
-
-Informational Commands:
-       list                    List available packages and descriptions
-       files <pkg>             List all files belonging to <pkg>
-       search <file>           Search for a packaging providing <file>
-       info [pkg [<field>]]    Display all/some info fields for <pkg> or all
-       status [pkg [<field>]]  Display all/some status fields for <pkg> or all
-       depends <pkg>           Print uninstalled package dependencies for <pkg>
-
-Options:
-       -d <dest_name>          Use <dest_name> as the the root directory for
-       -dest <dest_name>       package installation, removal, upgrading.
-                               <dest_name> should be a defined dest name from the
-                               configuration file, (but can also be a directory
-                               name in a pinch).
-        -o <offline_root>       Use <offline_root> as the root for offline installation.
-        -offline <offline_root>                                
-
-Force Options (use when ipkg is too smart for its own good):
-       -force-depends          Make dependency checks warnings instead of errors
-       -force-defaults         Use default options for questions asked by ipkg.
-                                (no prompts). Note that this will not prevent
-                                package installation scripts from prompting.
-" >&2
-       exit 1
-}
-
-ipkg_dir_part() {
-       local dir="`echo $1 | sed -ne 's/\(.*\/\).*/\1/p'`"
-       if [ -z "$dir" ]; then
-               dir="./"
-       fi
-       echo $dir
-}
-
-ipkg_file_part() {
-       echo $1 | sed 's/.*\///'
-}
-
-ipkg_protect_slashes() {
-       sed -e 's/\//\\\//g'
-}
-
-ipkg_download() {
-       local src="$1"
-       local dest="$2"
-
-       local src_file="`ipkg_file_part $src`"
-       local dest_dir="`ipkg_dir_part $dest`"
-       if [ -z "$dest_dir" ]; then
-               dest_dir="$IPKG_TMP"
-       fi
-
-       local dest_file="`ipkg_file_part $dest`"
-       if [ -z "$dest_file" ]; then
-               dest_file="$src_file"
-       fi
-
-       # Proxy support
-       local proxyuser=""
-       local proxypassword=""
-       local proxyoption=""
-               
-       if [ -n "$IPKG_PROXY_USERNAME" ]; then
-               proxyuser="--proxy-user=\"$IPKG_PROXY_USERNAME\""
-               proxypassword="--proxy-passwd=\"$IPKG_PROXY_PASSWORD\""
-       fi
-
-       if [ -n "$IPKG_PROXY_HTTP" -o -n "$IPKG_PROXY_FTP" ]; then
-               proxyoption="--proxy=on"
-       fi
-
-       echo "Downloading $src ..."
-       rm -f $IPKG_TMP/$src_file
-       case "$src" in
-       http://* | ftp://*)
-               if ! wget --passive-ftp $proxyoption $proxyuser $proxypassword -P $IPKG_TMP $src; then
-                       echo "ipkg_download: ERROR: Failed to retrieve $src, returning $err"
-                       return 1
-               fi
-               mv $IPKG_TMP/$src_file $dest_dir/$dest_file 2>/dev/null
-               ;;
-       file:/* )
-               ln -s `echo $src | sed 's/^file://'` $dest_dir/$dest_file 2>/dev/null
-               ;;
-       *)
-       echo "DEBUG: $src"
-               ;;
-       esac
-
-       echo "Done."
-       return 0
-}
-
-ipkg_update() {
-       if [ ! -e "$IPKG_LISTS_DIR" ]; then
-               mkdir -p $IPKG_LISTS_DIR
-       fi
-
-       local err=
-       for src_name in `ipkg_src_names`; do
-               local src="`ipkg_src_byname $src_name`"
-               if ! ipkg_download $src/Packages $IPKG_LISTS_DIR/$src_name; then
-                       echo "ipkg_update: Error downloading $src/Packages to $IPKG_LISTS_DIR/$src_name" >&2
-                       err=t
-               else
-                       echo "Updated list of available packages in $IPKG_LISTS_DIR/$src_name"
-               fi
-       done
-
-       [ -n "$err" ] && return 1
-
-       return 0
-}
-
-ipkg_list() {
-       for src in `ipkg_src_names`; do
-               if ipkg_require_list $src; then 
-# black magic...
-sed -ne "
-/^Package:/{
-s/^Package:[[:space:]]*\<\([a-z0-9.+-]*$1[a-z0-9.+-]*\).*/\1/
-h
-}
-/^Description:/{
-s/^Description:[[:space:]]*\(.*\)/\1/
-H
-g
-s/\\
-/ - /
-p
-}
-" $IPKG_LISTS_DIR/$src
-               fi
-       done
-}
-
-ipkg_extract_paragraph() {
-       local pkg="$1"
-       sed -ne "/Package:[[:space:]]*$pkg[[:space:]]*\$/,/^\$/p"
-}
-
-ipkg_extract_field() {
-       local field="$1"
-# blacker magic...
-       sed -ne "
-: TOP
-/^$field:/{
-p
-n
-b FIELD
-}
-d
-: FIELD
-/^$/b TOP
-/^[^[:space:]]/b TOP
-p
-n
-b FIELD
-"
-}
-
-ipkg_extract_value() {
-       sed -e "s/^[^:]*:[[:space:]]*//"
-}
-
-ipkg_require_list() {
-       [ $# -lt 1 ] && return 1
-       local src="$1"
-       if [ ! -f "$IPKG_LISTS_DIR/$src" ]; then
-               echo "ERROR: File not found: $IPKG_LISTS_DIR/$src" >&2
-               echo "       You probably want to run \`ipkg update'" >&2
-               return 1
-       fi
-       return 0
-}
-
-ipkg_info() {
-       for src in `ipkg_src_names`; do
-               if ipkg_require_list $src; then
-                       case $# in
-                       0)
-                               cat $IPKG_LISTS_DIR/$src
-                               ;;      
-                       1)
-                               ipkg_extract_paragraph $1 < $IPKG_LISTS_DIR/$src
-                               ;;
-                       *)
-                               ipkg_extract_paragraph $1 < $IPKG_LISTS_DIR/$src | ipkg_extract_field $2
-                               ;;
-                       esac
-               fi
-       done
-}
-
-ipkg_status_sd() {
-       [ $# -lt 1 ] && return 0
-       sd="$1"
-       shift
-       if [ -f $sd/status ]; then
-               case $# in
-               0)
-                       cat $sd/status
-                       ;;
-               1)
-                       ipkg_extract_paragraph $1 < $sd/status
-                       ;;
-               *)
-                       ipkg_extract_paragraph $1 < $sd/status | ipkg_extract_field $2
-                       ;;
-               esac
-       fi
-       return 0
-}
-
-ipkg_status_all() {
-       for sd in `ipkg_state_dirs`; do
-               ipkg_status_sd $sd $*
-       done
-}
-
-ipkg_status() {
-       if [ -n "$DEST_NAME" ]; then
-               ipkg_status_sd $IPKG_STATE_DIR $*
-       else
-               ipkg_status_all $*
-       fi
-}
-
-ipkg_status_matching_sd() {
-       local sd="$1"
-       local re="$2"
-       if [ -f $sd/status ]; then
-               sed -ne "
-: TOP
-/^Package:/{
-s/^Package:[[:space:]]*//
-s/[[:space:]]*$//
-h
-}
-/$re/{
-g
-p
-b NEXT
-}
-d
-: NEXT
-/^$/b TOP
-n
-b NEXT
-" < $sd/status
-       fi
-       return 0
-}
-
-ipkg_status_matching_all() {
-       for sd in `ipkg_state_dirs`; do
-               ipkg_status_matching_sd $sd $*
-       done
-}
-
-ipkg_status_matching() {
-       if [ -n "$DEST_NAME" ]; then
-               ipkg_status_matching_sd $IPKG_STATE_DIR $*
-       else
-               ipkg_status_matching_all $*
-       fi
-}
-
-ipkg_status_installed_sd() {
-       local sd="$1"
-       local pkg="$2"
-       ipkg_status_sd $sd $pkg Status | grep -q "Status: install ok installed"
-}
-
-ipkg_status_installed_all() {
-       local ret=1
-       for sd in `ipkg_state_dirs`; do
-               if `ipkg_status_installed_sd $sd $*`; then
-                       ret=0
-               fi
-       done
-       return $ret
-}
-
-ipkg_status_mentioned_sd() {
-       local sd="$1"
-       local pkg="$2"
-       [ -n "`ipkg_status_sd $sd $pkg Status`" ]
-}
-
-ipkg_files() {
-       local pkg="$1"
-       if [ -n "$DEST_NAME" ]; then
-               dests=$IPKG_ROOT
-       else
-               dests="`ipkg_dests_all`"
-       fi
-       for dest in $dests; do
-               if [ -f $dest/$IPKG_DIR_PREFIX/info/$pkg.list ]; then
-                       dest_sed="`echo $dest | ipkg_protect_slashes`"
-                       sed -e "s/^/$dest_sed/" < $dest/$IPKG_DIR_PREFIX/info/$pkg.list
-               fi
-       done
-}
-
-ipkg_search() {
-       local pattern="$1"
-
-       for dest_name in `ipkg_dest_names`; do
-               dest="`ipkg_dest_byname $dest_name`"
-               dest_sed="`echo $dest | ipkg_protect_slashes`"
-
-               set +o noglob
-               local list_files="`ls -1 $dest/$IPKG_DIR_PREFIX/info/*.list 2>/dev/null`"
-               set -o noglob
-               for file in $list_files; do
-                       if sed "s/^/$dest_sed/" $file | grep -q $pattern; then
-                               local pkg="`echo $file | sed "s/^.*\/\(.*\)\.list/\1/"`"
-                               [ "$dest_name" != `ipkg_dest_default_name` ] && pkg="$pkg ($dest_name)"
-                               sed "s/^/$dest_sed/" $file | grep $pattern | sed "s/^/$pkg: /"
-                       fi
-               done
-       done
-}
-
-ipkg_status_remove_sd() {
-       local sd="$1"
-       local pkg="$2"
-
-       if [ ! -f $sd/status ]; then
-               mkdir -p $sd
-               touch $sd/status
-       fi
-       sed -ne "/Package:[[:space:]]*$pkg[[:space:]]*\$/,/^\$/!p" < $sd/status > $sd/status.new
-       mv $sd/status.new $sd/status
-}
-
-ipkg_status_remove_all() {
-       for sd in `ipkg_state_dirs`; do
-               ipkg_status_remove_sd $sd $*
-       done
-}
-
-ipkg_status_remove() {
-       if [ -n "$DEST_NAME" ]; then
-               ipkg_status_remove_sd $IPKG_STATE_DIR $*
-       else
-               ipkg_status_remove_all $*
-       fi
-}
-
-ipkg_status_update_sd() {
-       local sd="$1"
-       local pkg="$2"
-
-       ipkg_status_remove_sd $sd $pkg
-       ipkg_extract_field "$IPKG_STATUS_FIELDS" >> $sd/status
-       echo "" >> $sd/status
-}
-
-ipkg_status_update() {
-       ipkg_status_update_sd $IPKG_STATE_DIR $*
-}
-
-ipkg_unsatisfied_dependences() {
-    local pkg=$1
-    local deps="`ipkg_get_depends $pkg`"
-    local remaining_deps=
-    for dep in $deps; do
-       local installed="`ipkg_get_installed $dep`"
-       if [ "$installed" != "installed" ] ; then
-           remaining_deps="$remaining_deps $dep"
-       fi
-    done
-    ## echo "ipkg_unsatisfied_dependences pkg=$pkg $remaining_deps" > /dev/console
-    echo $remaining_deps
-}
-
-ipkg_safe_pkg_name() {
-       local pkg=$1
-       local spkg="`echo pkg_$pkg | sed -e y/-+./___/`"
-       echo $spkg
-}
-
-ipkg_set_depends() {
-       local pkg=$1; shift 
-       local new_deps="$*"
-       pkg="`ipkg_safe_pkg_name $pkg`"
-       ## setvar ${pkg}_depends "$new_deps"
-       echo $new_deps > /tmp/ipkg/${pkg}.depends
-}
-
-ipkg_get_depends() {
-       local pkg=$1
-       pkg="`ipkg_safe_pkg_name $pkg`"
-       cat /tmp/ipkg/${pkg}.depends
-       ## eval "echo \$${pkg}_depends"
-}
-
-ipkg_set_installed() {
-       local pkg=$1
-       pkg="`ipkg_safe_pkg_name $pkg`"
-       echo installed > /tmp/ipkg/${pkg}.installed
-       ## setvar ${pkg}_installed "installed"
-}
-
-ipkg_set_uninstalled() {
-       local pkg=$1
-       pkg="`ipkg_safe_pkg_name $pkg`"
-       ### echo ipkg_set_uninstalled $pkg > /dev/console
-       echo uninstalled > /tmp/ipkg/${pkg}.installed
-       ## setvar ${pkg}_installed "uninstalled"
-}
-
-ipkg_get_installed() {
-       local pkg=$1
-       pkg="`ipkg_safe_pkg_name $pkg`"
-       if [ -f /tmp/ipkg/${pkg}.installed ]; then
-               cat /tmp/ipkg/${pkg}.installed
-       fi
-       ## eval "echo \$${pkg}_installed"
-}
-
-ipkg_depends() {
-       local new_pkgs="$*"
-       local all_deps=
-       local installed_pkgs="`ipkg_status_matching_all 'Status:.*[[:space:]]installed'`"
-       for pkg in $installed_pkgs; do
-           ipkg_set_installed $pkg
-       done
-       while [ -n "$new_pkgs" ]; do
-               all_deps="$all_deps $new_pkgs"
-               local new_deps=
-               for pkg in $new_pkgs; do
-                       if echo $pkg | grep -q '[^a-z0-9.+-]'; then
-                               echo "ipkg_depends: ERROR: Package name $pkg contains illegal characters (should be [a-z0-9.+-])" >&2
-                               return 1
-                       fi
-                       # TODO: Fix this. For now I am ignoring versions and alternations in dependencies.
-                       new_deps="$new_deps "`ipkg_info $pkg '\(Pre-\)\?Depends' | ipkg_extract_value | sed -e 's/([^)]*)//g
-s/\(|[[:space:]]*[a-z0-9.+-]\+[[:space:]]*\)\+//g
-s/,/ /g
-s/ \+/ /g'`
-                       ipkg_set_depends $pkg $new_deps
-               done
-
-               new_deps=`echo $new_deps | sed -e 's/[[:space:]]\+/\\
-/g' | sort | uniq`
-
-               local maybe_new_pkgs=
-               for pkg in $new_deps; do
-                       if ! echo $installed_pkgs | grep -q "\<$pkg\>"; then
-                               maybe_new_pkgs="$maybe_new_pkgs $pkg"
-                       fi
-               done
-
-               new_pkgs=
-               for pkg in $maybe_new_pkgs; do
-                       if ! echo $all_deps | grep -q "\<$pkg\>"; then
-                               if [ -z "`ipkg_info $pkg`" ]; then
-                                       echo "ipkg_depends: Warning: $pkg mentioned in dependency but no package found in $IPKG_LISTS_DIR" >&2
-                                       ipkg_set_installed $pkg
-                               else
-                                       new_pkgs="$new_pkgs $pkg"
-                                       ipkg_set_uninstalled $pkg
-                               fi
-                       else
-                               ipkg_set_uninstalled $pkg
-                       fi
-               done
-       done
-
-       echo $all_deps
-}
-
-ipkg_get_install_dest() {
-       local dest="$1"
-       shift
-       local sd=$dest/$IPKG_DIR_PREFIX
-       local info_dir=$sd/info
-
-        local requested_pkgs="$*"
-       local pkgs="`ipkg_depends $*`"
-
-       mkdir -p $info_dir
-       for pkg in $pkgs; do
-               if ! ipkg_status_mentioned_sd $sd $pkg; then
-                       echo "Package: $pkg
-Status: install ok not-installed" | ipkg_status_update_sd $sd $pkg
-               fi
-       done
-        ## mark the packages that we were directly requested to install as uninstalled
-        for pkg in $requested_pkgs; do ipkg_set_uninstalled $pkg; done
-
-       local new_pkgs=
-       local pkgs_installed=0
-       while [ -n "pkgs" ]; do
-               curcheck=0
-               ## echo "pkgs to install: {$pkgs}" > /dev/console
-               for pkg in $pkgs; do
-                       curcheck="`expr $curcheck + 1`"
-                       local is_installed="`ipkg_get_installed $pkg`"
-                       if [ "$is_installed" = "installed" ]; then
-                               echo "$pkg is installed" > /dev/console
-                               continue
-                       fi
-
-                       local remaining_deps="`ipkg_unsatisfied_dependences $pkg`"
-                       if [ -n "$remaining_deps" ]; then
-                               new_pkgs="$new_pkgs $pkg"
-                               ### echo "Dependences not satisfied for $pkg: $remaining_deps"
-                               if [ $curcheck -ne `echo  $pkgs|wc -w` ]; then
-                                       continue
-                               fi
-                       fi
-
-                       local filename=
-                       for src in `ipkg_src_names`; do
-                               if ipkg_require_list $src; then
-                                       filename="`ipkg_extract_paragraph $pkg < $IPKG_LISTS_DIR/$src | ipkg_extract_field Filename | ipkg_extract_value`"
-                                       [ -n "$filename" ] && break
-                               fi
-                       done
-
-                       if [ -z "$filename" ]; then
-                               echo "ipkg_get_install: ERROR: Cannot find package $pkg in $IPKG_LISTS_DIR"
-                               echo "ipkg_get_install:        Check the spelling and maybe run \`ipkg update'."
-                               ipkg_status_remove_sd $sd $pkg
-                               return 1;
-                       fi
-
-                       [ -e "$IPKG_TMP" ] || mkdir -p $IPKG_TMP
-
-                       echo ""
-                       local tmp_pkg_file="$IPKG_TMP/"`ipkg_file_part $filename`
-                       if ! ipkg_download `ipkg_src_byname $src`/$filename $tmp_pkg_file; then
-                               echo "ipkg_get_install: Perhaps you need to run \`ipkg update'?"
-                               return 1
-                       fi
-
-                       if ! ipkg_install_file_dest $dest $tmp_pkg_file; then
-                               echo "ipkg_get_install: ERROR: Failed to install $tmp_pkg_file"
-                               echo "ipkg_get_install: I'll leave it there for you to try a manual installation"
-                               return 1
-                       fi
-
-                       ipkg_set_installed $pkg
-                       pkgs_installed="`expr $pkgs_installed + 1`"
-                       rm $tmp_pkg_file
-               done
-               ### echo "Installed $pkgs_installed package(s) this round"
-               if [ $pkgs_installed -eq 0 ]; then
-                       if [ -z "$new_pkgs" ]; then
-                           break
-                       fi
-               fi
-               pkgs_installed=0
-               pkgs="$new_pkgs"
-               new_pkgs=
-               curcheck=0
-        done
-}
-
-ipkg_get_install() {
-       ipkg_get_install_dest $IPKG_ROOT $*
-}
-
-ipkg_install_file_dest() {
-       local dest="$1"
-       local filename="$2"
-       local sd=$dest/$IPKG_DIR_PREFIX
-       local info_dir=$sd/info
-
-       if [ ! -f "$filename" ]; then
-               echo "ipkg_install_file: ERROR: File $filename not found"
-               return 1
-       fi
-
-       local pkg="`ipkg_file_part $filename | sed 's/\([a-z0-9.+-]\+\)_.*/\1/'`"
-       local ext="`echo $filename | sed 's/.*\.//'`"
-       local pkg_extract_stdout
-       if [ "$ext" = "ipk" ]; then
-               pkg_extract_stdout="tar -xzOf"
-       elif [ "$ext" = "deb" ]; then
-               pkg_extract_stdout="ar p"
-       else
-               echo "ipkg_install_file: ERROR: File $filename has unknown extension $ext (not .ipk or .deb)"
-               return 1
-       fi
-
-       # Check dependencies
-       local depends="`ipkg_depends $pkg | sed -e "s/\<$pkg\>//"`"
-
-       # Don't worry about deps that are scheduled for installation
-       local missing_deps=
-       for dep in $depends; do
-               if ! ipkg_status_all $dep | grep -q 'Status:[[:space:]]install'; then
-                       missing_deps="$missing_deps $dep"
-               fi
-       done
-
-       if [ ! -z "$missing_deps" ]; then
-               if [ -n "$FORCE_DEPENDS" ]; then
-                       echo "ipkg_install_file: Warning: $pkg depends on the following uninstalled programs: $missing_deps"
-               else
-                       echo "ipkg_install_file: ERROR: $pkg depends on the following uninstalled programs:
-       $missing_deps"
-                       echo "ipkg_install_file: You may want to use \`ipkg install' to install these."
-                       return 1
-               fi
-       fi
-
-       mkdir -p $IPKG_TMP/$pkg/control
-       mkdir -p $IPKG_TMP/$pkg/data
-       mkdir -p $info_dir
-
-       if ! $pkg_extract_stdout $filename ./control.tar.gz | (cd $IPKG_TMP/$pkg/control; tar -xzf - ) ; then
-               echo "ipkg_install_file: ERROR unpacking control.tar.gz from $filename"
-               return 1
-       fi
-
-       if [ -n "$IPKG_OFFLINE_ROOT" ]; then
-               if grep -q '^InstallsOffline:[[:space:]]*no' $IPKG_TMP/$pkg/control/control; then
-                       echo "*** Warning: Package $pkg may not be installed in offline mode"
-                       echo "*** Warning: Scheduling $filename for pending installation (installing into $IPKG_PENDING_DIR)"
-                       echo "Package: $pkg
-Status: install ok pending" | ipkg_status_update_sd $sd $pkg
-                       mkdir -p $IPKG_PENDING_DIR
-                       cp $filename $IPKG_PENDING_DIR
-                       rm -r $IPKG_TMP/$pkg/control
-                       rm -r $IPKG_TMP/$pkg/data
-                       rmdir $IPKG_TMP/$pkg
-                       return 0
-               fi
-       fi
-
-
-       echo -n "Unpacking $pkg..."
-       set +o noglob
-       for file in $IPKG_TMP/$pkg/control/*; do
-               local base_file="`ipkg_file_part $file`"
-               mv $file $info_dir/$pkg.$base_file
-       done
-       set -o noglob
-       rm -r $IPKG_TMP/$pkg/control
-
-       if ! $pkg_extract_stdout $filename ./data.tar.gz | (cd $IPKG_TMP/$pkg/data; tar -xzf - ) ; then
-               echo "ipkg_install_file: ERROR unpacking data.tar.gz from $filename"
-               return 1
-       fi
-       echo "Done."
-
-       echo -n "Configuring $pkg..."
-       export PKG_ROOT=$dest
-       if [ -x "$info_dir/$pkg.preinst" ]; then
-               if ! $info_dir/$pkg.preinst install; then
-                       echo "$info_dir/$pkg.preinst failed. Aborting installation of $pkg"
-                       rm -rf $IPKG_TMP/$pkg/data
-                       rmdir $IPKG_TMP/$pkg
-                       return 1
-               fi
-       fi
-
-       local old_conffiles="`ipkg_status_sd $sd $pkg Conffiles | ipkg_extract_value`"
-       local new_conffiles=
-       if [ -f "$info_dir/$pkg.conffiles" ]; then
-               for conffile in `cat $info_dir/$pkg.conffiles`; do
-                       if [ -f "$dest/$conffile" ] && ! echo " $old_conffiles " | grep -q " $conffile "`md5sum $dest/$conffile | sed 's/ .*//'`; then
-                               local use_maintainers_conffile=
-                               if [ -z "$FORCE_DEFAULTS" ]; then
-                                       while true; do
-                                               echo -n "Configuration file \`$conffile'
- ==> File on system created by you or by a script.
- ==> File also in package provided by package maintainer.
-   What would you like to do about it ?  Your options are:
-    Y or I  : install the package maintainer's version
-    N or O  : keep your currently-installed version
-      D     : show the differences between the versions (if diff is installed)
- The default action is to keep your current version.
-*** `ipkg_file_part $conffile` (Y/I/N/O/D) [default=N] ? "
-                                               read response
-                                               case "$response" in
-                                               [YyIi] | [Yy][Ee][Ss])
-                                                       use_maintainers_conffile=t
-                                                       break
-                                               ;;
-                                               [Dd])
-                                                       echo "
-diff -u $dest/$conffile $IPKG_TMP/$pkg/data/$conffile"
-                                                       diff -u $dest/$conffile $IPKG_TMP/$pkg/data/$conffile || true
-                                                       echo "[Press ENTER to continue]"
-                                                       read junk
-                                               ;;
-                                               *)
-                                                       break
-                                               ;;
-                                               esac
-                                       done
-                               fi
-                               if [ -n "$use_maintainers_conffile" ]; then
-                                       local md5sum="`md5sum $IPKG_TMP/$pkg/data/$conffile | sed 's/ .*//'`"
-                                       new_conffiles="$new_conffiles $conffile $md5sum"
-                               else
-                                       new_conffiles="$new_conffiles $conffile <custom>"
-                                       rm $IPKG_TMP/$pkg/data/$conffile
-                               fi
-                       else
-                               md5sum="`md5sum $IPKG_TMP/$pkg/data/$conffile | sed 's/ .*//'`"
-                               new_conffiles="$new_conffiles $conffile $md5sum"
-                       fi
-               done
-       fi
-
-       local owd="`pwd`"
-       (cd $IPKG_TMP/$pkg/data/; tar cf - . | (cd $owd; cd $dest; tar xf -))
-       rm -rf $IPKG_TMP/$pkg/data
-       rmdir $IPKG_TMP/$pkg
-       $pkg_extract_stdout $filename ./data.tar.gz | tar tzf - | sed -e 's/^\.//' > $info_dir/$pkg.list
-
-       if [ -x "$info_dir/$pkg.postinst" ]; then
-               $info_dir/$pkg.postinst configure
-       fi
-
-       if [ -n "$new_conffiles" ]; then
-               new_conffiles='Conffiles: '`echo $new_conffiles | ipkg_protect_slashes`
-       fi
-       local sed_safe_root="`echo $dest | sed -e "s/^${IPKG_OFFLINE_ROOT}//" | ipkg_protect_slashes`"
-       sed -e "s/\(Package:.*\)/\1\\
-Status: install ok installed\\
-Root: ${sed_safe_root}\\
-${new_conffiles}/" $info_dir/$pkg.control | ipkg_status_update_sd $sd $pkg
-
-       rm -f $info_dir/$pkg.control
-       rm -f $info_dir/$pkg.conffiles
-       rm -f $info_dir/$pkg.preinst
-       rm -f $info_dir/$pkg.postinst
-
-       echo "Done."
-}
-
-ipkg_install_file() {
-       ipkg_install_file_dest $IPKG_ROOT $*
-}
-
-ipkg_install() {
-
-       while [ $# -gt 0 ]; do
-               local pkg="$1"
-               shift
-       
-               case "$pkg" in
-               http://* | ftp://*)
-                       local tmp_pkg_file="$IPKG_TMP/"`ipkg_file_part $pkg`
-                       if ipkg_download $pkg $tmp_pkg_file; then
-                               ipkg_install_file $tmp_pkg_file
-                               rm $tmp_pkg_file
-                       fi
-                       ;;
-               file:/*.ipk  | file://*.deb)
-                               local ipkg_filename="`echo $pkg|sed 's/^file://'`"
-                               ipkg_install_file $ipkg_filename
-                       ;;
-               *.ipk  | *.deb)
-                       if [ -f "$pkg" ]; then
-                               ipkg_install_file $pkg
-                       else
-                               echo "File not found $pkg" >&2
-                       fi
-                       ;;
-               *)
-                       ipkg_get_install $pkg || true
-                       ;;
-               esac
-       done
-}
-
-ipkg_install_pending() {
-       [ -n "$IPKG_OFFLINE_ROOT" ] && return 0
-
-       if [ -d "$IPKG_PENDING_DIR" ]; then
-               set +o noglob
-               local pending="`ls -1d $IPKG_PENDING_DIR/*.ipk 2> /dev/null`" || true
-               set -o noglob
-               if [ -n "$pending" ]; then
-                       echo "The following packages in $IPKG_PENDING_DIR will now be installed:"
-                       echo $pending
-                       for filename in $pending; do
-                               if ipkg_install_file $filename; then
-                                       rm $filename
-                               fi
-                       done
-               fi
-       fi
-       return 0
-}
-
-ipkg_install_wanted() {
-       local wanted="`ipkg_status_matching 'Status:[[:space:]]*install.*not-installed'`"
-
-       if [ -n "$wanted" ]; then
-               echo "The following package were previously requested but have not been installed:"
-               echo $wanted
-
-               if [ -n "$FORCE_DEFAULTS" ]; then
-                       echo "Installing them now."
-               else
-                       echo -n "Install them now [Y/n] ? "
-                       read response
-                       case "$response" in
-                       [Nn] | [Nn][Oo])
-                               return 0
-                               ;;
-                       esac
-               fi
-
-               ipkg_install $wanted
-       fi
-
-       return 0
-}
-
-ipkg_upgrade_pkg() {
-       local pkg="$1"
-       local avail_ver="`ipkg_info $pkg Version | ipkg_extract_value | head -1`"
-
-       is_installed=
-       for dest_name in `ipkg_dest_names`; do
-               local dest="`ipkg_dest_byname $dest_name`"
-               local sd=$dest/$IPKG_DIR_PREFIX
-               local inst_ver="`ipkg_status_sd $sd $pkg Version | ipkg_extract_value`"
-               if [ -n "$inst_ver" ]; then
-                       is_installed=t
-
-                       if [ -z "$avail_ver" ]; then
-                               echo "Assuming locally installed package $pkg ($inst_ver) is up to date"
-                               return 0
-                       fi
-
-                       if [ "$avail_ver" = "$inst_ver" ]; then 
-                               echo "Package $pkg ($inst_ver) installed in $dest_name is up to date"
-                       elif [ "$avail_ver" -gt "$inst_ver" ]; then
-                               echo "Upgrading $pkg ($dest_name) from $inst_ver to $avail_ver"
-                               ipkg_get_install_dest $dest $pkg
-                       else
-                               echo "Not downgrading package $pkg from $inst_ver to $avail_ver"
-                       fi
-               fi
-       done
-
-       if [ -z "$is_installed" ]; then
-               echo "Package $pkg does not appear to be installed"
-               return 0
-       fi
-
-}
-
-ipkg_upgrade() {
-       if [ $# -lt 1 ]; then
-               local pkgs="`ipkg_status_matching 'Status:.*[[:space:]]installed'`"
-       else
-               pkgs="$*"
-       fi
-       
-       for pkg in $pkgs; do
-               ipkg_upgrade_pkg $pkg
-       done
-}
-
-ipkg_remove_pkg_dest() {
-       local dest="$1"
-       local pkg="$2"
-       local sd=$dest/$IPKG_DIR_PREFIX
-       local info_dir=$sd/info
-
-       if ! ipkg_status_installed_sd $sd $pkg; then
-               echo "ipkg_remove: Package $pkg does not appear to be installed in $dest"
-               if ipkg_status_mentioned_sd $sd $pkg; then
-                       echo "Purging mention of $pkg from the ipkg database"
-                       ipkg_status_remove_sd $sd $pkg
-               fi
-               return 1
-       fi
-
-       echo "ipkg_remove: Removing $pkg... "
-
-       local files="`cat $info_dir/$pkg.list`"
-
-       export PKG_ROOT=$dest
-       if [ -x "$info_dir/$pkg.prerm" ]; then
-               $info_dir/$pkg.prerm remove
-       fi
-
-       local conffiles="`ipkg_status_sd $sd $pkg Conffiles | ipkg_extract_value`"
-
-       local dirs_to_remove=
-       for file in $files; do
-               if [ -d "$dest/$file" ]; then
-                       dirs_to_remove="$dirs_to_remove $dest/$file"
-               else
-                       if echo " $conffiles " | grep -q " $file "; then
-                               if echo " $conffiles " | grep -q " $file "`md5sum $dest/$file | sed 's/ .*//'`; then
-                                       rm -f $dest/$file
-                               fi
-                       else
-                               rm -f $dest/$file
-                       fi
-               fi
-       done
-
-       local removed_a_dir=t
-       while [ -n "$removed_a_dir" ]; do
-               removed_a_dir=
-               local new_dirs_to_remove=
-               for dir in $dirs_to_remove; do
-                       if rmdir $dir >/dev/null 2>&1; then
-                               removed_a_dir=t
-                       else
-                               new_dirs_to_remove="$new_dirs_to_remove $dir"
-                       fi
-               done
-               dirs_to_remove="$new_dirs_to_remove"
-       done
-
-       if [ -n "$dirs_to_remove" ]; then
-               echo "ipkg_remove: Warning: Not removing the following directories since they are not empty:" >&2
-               echo "$dirs_to_remove" | sed -e 's/\/[/]\+/\//g' >&2
-       fi
-
-       if [ -x "$info_dir/$pkg.postrm" ]; then
-               $info_dir/$pkg.postrm remove
-       fi
-
-       ipkg_status_remove_sd $sd $pkg
-       set +o noglob
-       rm -f $info_dir/$pkg.*
-       set -o noglob
-
-       echo "Done."
-}
-
-ipkg_remove_pkg() {
-       local pkg="$1"
-       for dest in `ipkg_dests_all`; do
-               local sd=$dest/$IPKG_DIR_PREFIX
-               if ipkg_status_mentioned_sd $sd $pkg; then
-                       ipkg_remove_pkg_dest $dest $pkg
-               fi
-       done
-}
-
-ipkg_remove() {
-       while [ $# -gt 0 ]; do
-               local pkg="$1"
-               shift
-               if [ -n "$DEST_NAME" ]; then
-                       ipkg_remove_pkg_dest $IPKG_ROOT $pkg
-               else
-                       ipkg_remove_pkg $pkg
-               fi
-       done
-}
-
-###########
-# ipkg main
-###########
-
-# Parse options
-while [ $# -gt 0 ]; do
-       arg="$1"
-       case $arg in
-       -d | -dest)
-               [ $# -gt 1 ] || ipkg_usage "option $arg requires an argument"
-               DEST_NAME="$2"
-               shift
-               ;;
-       -o | -offline)
-               [ $# -gt 1 ] || ipkg_usage "option $arg requires an argument"
-               IPKG_OFFLINE_ROOT="$2"
-               shift
-               ;;
-       -force-depends)
-               FORCE_DEPENDS=t
-               ;;
-       -force-defaults)
-               FORCE_DEFAULTS=t
-               ;;
-       -*)
-               ipkg_usage "unknown option $arg"
-               ;;
-       *)
-               break
-               ;;
-       esac
-       shift
-done
-
-[ $# -lt 1 ] && ipkg_usage "ipkg must have one sub-command argument"
-cmd="$1"
-shift
-
-ipkg_load_configuration
-mkdir -p /tmp/ipkg
-
-case "$cmd" in
-update|upgrade|list|info|status|install_pending)
-       ;;
-install|depends|remove|files|search)
-       [ $# -lt 1 ] && ipkg_usage "ERROR: the \`\`$cmd'' command requires an argument"
-       ;;
-*)
-       echo "ERROR: unknown sub-command \`$cmd'"
-       ipkg_usage
-       ;;
-esac
-
-# Only install pending if we have an interactive sub-command
-case "$cmd" in
-upgrade|install)
-       ipkg_install_pending
-       ipkg_install_wanted
-       ;;
-esac
-
-ipkg_$cmd $*
-for a in `ls $IPKG_TMP`; do
-       rm -rf $IPKG_TMP/$a
-done
diff --git a/root/bin/login b/root/bin/login
deleted file mode 100755 (executable)
index 7520824..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec ash --login
diff --git a/root/etc/functions.sh b/root/etc/functions.sh
deleted file mode 100755 (executable)
index 4e96ad7..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/bin/sh
-
-debug () {
- [ -z "$DEBUG" ] || echo $1
-}
-
-# allow env to override nvram 
-nvram_get () {
- eval "echo \${$1:-\$(nvram get $1)}"
-}
-. /etc/nvram.overrides
-
-# valid interface?
-if_valid () (
-  [ "${1%%[0-9]}" = "vlan" ] && {
-    i=${1#vlan} 
-    hwname=$(nvram_get vlan${i}hwname)
-    hwaddr=$(nvram_get ${hwname}macaddr)
-    [ -z "$hwaddr" ] && return 1
-
-    vif=$(ifconfig -a | awk '{IGNORECASE=1} /^eth.*'$hwaddr'/ {print $1; exit}')
-    debug "# vlan$i: $hwname $hwaddr => $vif"
-
-    $DEBUG ifconfig $vif up
-    $DEBUG vconfig add $vif $i 2>/dev/null
-  }
-  ifconfig "$1" >/dev/null 2>&1 || [ "${1%%[0-9]}" = "br" ] 
-  return $?
-)
-
-wifi () (
-  debug "### wifi $1 ###"
-  if=$(awk 'gsub(":","") {print $1}' /proc/net/wireless)
-  $DEBUG wlconf $if $1 
-)
-
-ifup () (
-  type=$1
-  debug "### ifup $type ###"
-  
-  if=$(nvram_get ${type}_ifname)
-  if [ "${if%%[0-9]}" = "ppp" ]; then
-    if=$(nvram_get pppoe_ifname) 
-  fi
-  
-  if_valid $if || return
-  
-  $DEBUG ifconfig $if down
-  if [ "${if%%[0-9]}" = "br" ]; then
-    stp=$(nvram_get ${type}_stp)
-    $DEBUG brctl delbr $if
-    $DEBUG brctl addbr $if
-    $DEBUG brctl setfd $if 0
-    $DEBUG brctl stp $if $stp
-    if_list=$(nvram_get ${type}_ifnames)
-    for sif in $if_list; do {
-      if_valid $sif || continue
-      $DEBUG ifconfig $sif 0.0.0.0 up
-      $DEBUG brctl addif $if $sif 
-    } done
-  fi
-
-  if_mac=$(nvram_get ${type}_hwaddr)
-  [ -z "$if_mac" ] || $DEBUG ifconfig $if hw ether $if_mac
-  if_proto=$(nvram_get ${type}_proto)
-  case "$if_proto" in
-    static)
-      if_ip=$(nvram_get ${type}_ipaddr)
-      if_netmask=$(nvram_get ${type}_netmask)
-      if_gateway=$(nvram_get ${type}_gateway)
-      
-      ipcalc -s "$if_ip"      || return 
-      ipcalc -s "$if_netmask" || return 
-      $DEBUG ifconfig $if $if_ip netmask $if_netmask up
-
-      ipcalc -s "$if_gateway" || return 
-      $DEBUG route add default gw $if_gateway
-
-      [ -f /etc/resolv.conf ] && return
-
-      debug "# --- creating /etc/resolv.conf ---"
-      for dns in $(nvram_get ${type}_dns); do {
-       echo "nameserver $dns" >> /etc/resolv.conf
-      } done
-    ;;
-    dhcp)
-      pidfile=/tmp/dhcp-${type}.pid
-      if [ -f $pidfile ]; then
-        $DEBUG kill $(cat $pidfile)
-      fi
-      cmd="udhcpc -i $if -b -p $pidfile &"
-      ${DEBUG:-eval} $cmd
-    ;;
-    pppoe)
-      if_username=$(nvram_get ppp_username)
-      if_password=$(nvram_get ppp_passwd)
-      if_redial=$(nvram_get ppp_redialperiod)
-      if_idletime=$(nvram_get ppp_idletime)
-      
-      $DEBUG ifconfig $if 0.0.0.0 up
-      
-      $DEBUG /sbin/pppoecd $if -u $if_username -p $if_password -i 0 -I $if_redial -T $if_idletime -k
-    ;;
-    *)
-      echo "### WARNING $if: $if_proto is not supported"
-    ;;
-  esac
-)
-
-ifdown () (                                                                       
-  type=$1
-  debug "### ifdown $type ###"
-  if=$(nvram_get ${type}_ifname)                                                
-  if_valid $if || return                                                        
-  $DEBUG ifdown $if
-)
diff --git a/root/etc/init.d/S10boot b/root/etc/init.d/S10boot
deleted file mode 100755 (executable)
index 45b9dd2..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-sysctl -p
-echo "S" > /proc/jffs2_bbc
-
-# networking stub
-[ "$(nvram get il0macaddr)" = "00:90:4c:5f:00:2a" ] && {
-  # force unique mac
-  nvram set il0macaddr=$(nvram get et0macaddr|
-  awk -F ":" '{for(x=6,y=2;x;x--){y+=int("0x"$x);$x=sprintf("%02x",y%256);y/=256}gsub(" ",":");print$0}')
-}
-
-insmod et
-insmod wl
-
-ifconfig lo 127.0.0.1 up
-ifconfig eth0 promisc
-
-HOSTNAME=$(nvram get wan_hostname)
-DOMAINNAME=${HOSTNAME##*.}
-HOSTNAME=${HOSTNAME%%.*}
-
-echo ${HOSTNAME:=OpenWrt} > /proc/sys/kernel/hostname
-echo ${DOMAINNAME:=lan}   > /proc/sys/kernel/domainname
-
-vconfig set_name_type VLAN_PLUS_VID_NO_PAD
diff --git a/root/etc/init.d/S40network b/root/etc/init.d/S40network
deleted file mode 100755 (executable)
index 4264705..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-. /etc/functions.sh
-case "$1" in
-  start|restart)
-    ifup lan
-    ifup wan
-    ifup wifi
-    wifi up
-    ;;
-esac
diff --git a/root/etc/init.d/S45firewall b/root/etc/init.d/S45firewall
deleted file mode 100755 (executable)
index 40ac81a..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-. /etc/functions.sh
-
-WAN=$(nvram_get wan_ifname)
-
-IPT=/usr/sbin/iptables
-
-for T in filter nat mangle ; do
-  $IPT -t $T -F
-  $IPT -t $T -X
-done
-
-$IPT -t filter -A INPUT -m state --state INVALID -j DROP
-$IPT -t filter -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
-$IPT -t filter -A INPUT -p icmp -j ACCEPT 
-$IPT -t filter -A INPUT -i $WAN -p tcp -j REJECT --reject-with tcp-reset 
-$IPT -t filter -A INPUT -i $WAN -j REJECT --reject-with icmp-port-unreachable 
-$IPT -t filter -A FORWARD -m state --state INVALID -j DROP 
-$IPT -t filter -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT 
-$IPT -t filter -A FORWARD -i $WAN -m state --state NEW,INVALID -j DROP
-
-$IPT -t nat -A POSTROUTING -o $WAN -j MASQUERADE
diff --git a/root/etc/init.d/S50services b/root/etc/init.d/S50services
deleted file mode 100755 (executable)
index 4b24e42..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-/usr/sbin/telnetd -l /bin/login
-/usr/sbin/httpd -p 80 -h /www -r WRT54G Router
-/usr/sbin/udhcpd /etc/udhcpd.conf
-#dnsmasq started from /etc/inittab
diff --git a/root/etc/init.d/S99done b/root/etc/init.d/S99done
deleted file mode 100755 (executable)
index c521181..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-# turn off DMZ led
-echo "0x00" > /proc/sys/diag
diff --git a/root/etc/init.d/rcS b/root/etc/init.d/rcS
deleted file mode 100755 (executable)
index 9510e94..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# Start all init scripts in /etc/init.d
-# executing them in numerical order.
-#
-for i in /etc/init.d/S??* ;do
-
-     # Ignore dangling symlinks (if any).
-     [ ! -f "$i" ] && continue
-
-     case "$i" in
-        *.sh)
-            # Source shell script for speed.
-            (
-                trap - INT QUIT TSTP
-                set start
-                . $i
-            )
-            ;;
-        *)
-            # No sh extension, so fork subprocess.
-            $i start
-            ;;
-    esac
-done
diff --git a/root/etc/inittab b/root/etc/inittab
deleted file mode 100644 (file)
index 6d8c87e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-::sysinit:/etc/init.d/rcS
-::shutdown:/bin/alldone
-::respawn:/usr/sbin/dnsmasq -d -l /tmp/udhcpd.leases -s lan
diff --git a/root/etc/ipkg.conf b/root/etc/ipkg.conf
deleted file mode 100644 (file)
index c3581d7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-src openwrt http://openwrt.ksilebo.net/ipkg
-dest root /
-dest ram /tmp
diff --git a/root/etc/nvram.overrides b/root/etc/nvram.overrides
deleted file mode 100644 (file)
index 45097fc..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# NVRAM overrides
-# This file handles the NVRAM quirks of various hardware
-
-# linksys bug has lan doing dhcp; force static
-lan_proto="static"
-
-# failsafe if reset is held
-[ "$FAILSAFE" = "true" ] && {
-  echo "### FAILSAFE MODE ####"
-  lan_ifname="br0"
-  lan_ifnames="vlan0 vlan2 eth1 eth2 eth3"
-  lan_ipaddr="192.168.1.1"
-  lan_netmask="255.255.255.0"
-  lan_hwaddr="00:0B:AD:0A:DD:00"
-  wan_ifname="none"
-  wifi_ifname="none"
-}
-
-# hacks for 1.x hardware
-[ "$(nvram get boardnum)"  = "42" ] && \
-[ "$(nvram get boardtype)" = "bcm94710dev" ] && {
-  debug "### 1.x hardware hack ###"
-  vlan1hwname="et0"
-  vlan2hwname="et0"
-
-  # we remap old device names to new
-  # it's recommended that you continue to
-  # use the old names to preserve backwards
-  # compatibility
-  remap () {
-    eval $1=\"$(nvram_get $1 | awk 'gsub("eth0","vlan2") gsub("eth1","vlan1")')\"
-  }
-
-  remap lan_ifname
-  remap lan_ifnames
-  remap wifi_ifname
-  remap wifi_ifnames
-  remap wan_ifname
-  remap wan_ifnames
-  remap pppoe_ifname
-}
-
-[ -z "$(nvram_get lan_ifname)" ] && {
-  lan_ifname="br0"
-  lan_ifnames="vlan0 vlan2 eth1 eth2 eth3"
-}
diff --git a/root/etc/preinit b/root/etc/preinit
deleted file mode 100755 (executable)
index 25fedc1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-mount none /proc -t proc
-insmod diag
-echo 0x01 > /proc/sys/diag
-sleep 1
-if /sbin/resetmon ; then
-  mtd unlock mtd4
-  mount -t jffs2 /dev/mtdblock/4 /jffs
-  pivot_root /jffs /jffs/rom
-  mount none /dev -t devfs
-  mount none /proc -t proc
-  umount rom/proc
-  umount rom/dev
-else
-  export FAILSAFE=true
-fi
-mount none /tmp -t ramfs
-exec /sbin/init
diff --git a/root/etc/profile b/root/etc/profile
deleted file mode 100644 (file)
index 66e8b93..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin
-export PS1='\u@\h:\w\$ '
diff --git a/root/etc/sysctl.conf b/root/etc/sysctl.conf
deleted file mode 100644 (file)
index 8552a4b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-kernel.panic = 3
-net.ipv4.ip_forward = 1
-net.ipv4.icmp_echo_ignore_broadcasts = 1
-net.ipv4.icmp_ignore_bogus_error_responses = 1
-net.ipv4.tcp_fin_timeout = 30
-net.ipv4.tcp_keepalive_time = 120
-net.ipv4.tcp_timestamps = 0
diff --git a/root/etc/udhcpd.conf b/root/etc/udhcpd.conf
deleted file mode 100644 (file)
index a82eb37..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-max_leases 200
-start 192.168.1.20
-end 192.168.1.250
-interface br0
-lease_file /tmp/udhcpd.leases
-domain lan
-pidfile /tmp/udhcpd.pid
-option dns 192.168.1.1
-option subnet 255.255.255.0
-option router 192.168.1.1
-lease 7200
-
diff --git a/root/sbin/hotplug b/root/sbin/hotplug
deleted file mode 100755 (executable)
index 74134e8..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/ash
-# $Id$
-[ "${INTERFACE%%[0-9]*}" = "wds" ] && { 
-       ifconfig $INTERFACE 0.0.0.0 up
-       /usr/sbin/brctl addif br0 $INTERFACE
-}
diff --git a/root/usr/local/jffs_mount_point_placeholder b/root/usr/local/jffs_mount_point_placeholder
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/root/usr/share/udhcpc/default.bound b/root/usr/share/udhcpc/default.bound
deleted file mode 100755 (executable)
index f2b9b40..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-# Sample udhcpc renew script
-
-RESOLV_CONF="/tmp/resolv.conf"
-
-if test -n "$broadcast"; then
-       BROADCAST="broadcast $broadcast"
-fi
-
-if test -n "$subnet"; then
-       NETMASK="netmask $subnet"
-fi
-
-/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
-
-if test -n "$router"; then
-       echo "deleting routers"
-       while /sbin/route del default gw 0.0.0.0 dev $interface
-       do :
-       done
-
-       for i in $router
-       do
-               /sbin/route add default gw $i dev $interface
-       done
-fi
-
-echo -n > $RESOLV_CONF
-
-if test -n "$domain"; then
-       echo domain $domain >> $RESOLV_CONF
-fi
-
-for i in $dns; do
-       echo adding dns $i
-       echo nameserver $i >> $RESOLV_CONF
-done
diff --git a/root/usr/share/udhcpc/default.deconfig b/root/usr/share/udhcpc/default.deconfig
deleted file mode 100755 (executable)
index b221bcf..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-# Sample udhcpc deconfig script
-
-/sbin/ifconfig $interface 0.0.0.0
diff --git a/root/usr/share/udhcpc/default.renew b/root/usr/share/udhcpc/default.renew
deleted file mode 100755 (executable)
index f2b9b40..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-# Sample udhcpc renew script
-
-RESOLV_CONF="/tmp/resolv.conf"
-
-if test -n "$broadcast"; then
-       BROADCAST="broadcast $broadcast"
-fi
-
-if test -n "$subnet"; then
-       NETMASK="netmask $subnet"
-fi
-
-/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
-
-if test -n "$router"; then
-       echo "deleting routers"
-       while /sbin/route del default gw 0.0.0.0 dev $interface
-       do :
-       done
-
-       for i in $router
-       do
-               /sbin/route add default gw $i dev $interface
-       done
-fi
-
-echo -n > $RESOLV_CONF
-
-if test -n "$domain"; then
-       echo domain $domain >> $RESOLV_CONF
-fi
-
-for i in $dns; do
-       echo adding dns $i
-       echo nameserver $i >> $RESOLV_CONF
-done
diff --git a/root/usr/share/udhcpc/default.script b/root/usr/share/udhcpc/default.script
deleted file mode 100755 (executable)
index f5920ba..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-# Currently, we only dispatch according to command.  However, a more
-# elaborate system might dispatch by command and interface or do some
-# common initialization first, especially if more dhcp event notifications
-# are added.
-
-exec /usr/share/udhcpc/default.$1
diff --git a/root/www/index.html b/root/www/index.html
deleted file mode 100644 (file)
index 575d242..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<HTML>
-<HEAD><TITLE>OpenWrt</TITLE></HEAD>
-<BODY>
-No webpages currently available
-<br>- perhaps you need to install a package?
-</BODY>
-</HTML>