summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2004-08-07 12:01:08 +0000
committerPhil Blundell <philb@gnu.org>2004-08-07 12:01:08 +0000
commit145cc721a2791c3e032ef18d1f96daa7f5350691 (patch)
tree0ca2e31bf2252b9b4164acda4f24b1efedb8d882
parentdf056f9c1d74ecf3334aec3502b0ee304be350e9 (diff)
Merge bk://openembedded@openembedded.bkbits.net/packages
into workhouse.nexus.co.uk:/home/pb/oe/oe-packages 2004/08/07 13:00:51+01:00 nexus.co.uk!pb update busybox back to 1.00-rc2; add McQueen patch for modprobe BKrev: 4114c484p-qOmdVHZV0prZBT4vb2jg
-rw-r--r--busybox/busybox-1.00-rc2/add-getkey-applet.patch133
-rw-r--r--busybox/busybox-1.00-rc2/awk.patch10
-rw-r--r--busybox/busybox-1.00-rc2/bb-iproute-iftunnel.patch36
-rw-r--r--busybox/busybox-1.00-rc2/busybox-1.00-pre10-fuser.patch649
-rw-r--r--busybox/busybox-1.00-rc2/busybox-1.00-rc2-cvs-modprobe-for-all.patch (renamed from busybox/busybox-1.00-rc1/busybox-1.00-rc2-modprobe.patch)0
-rw-r--r--busybox/busybox-1.00-rc2/busybox-suidinstall.patch20
-rw-r--r--busybox/busybox-1.00-rc2/console.patch13
-rw-r--r--busybox/busybox-1.00-rc2/defconfig473
-rw-r--r--busybox/busybox-1.00-rc2/dhcp-retrytime.patch46
-rw-r--r--busybox/busybox-1.00-rc2/hwclock.sh74
-rw-r--r--busybox/busybox-1.00-rc2/postinst25
-rw-r--r--busybox/busybox-1.00-rc2/prerm10
-rw-r--r--busybox/busybox-1.00-rc2/rc2-cvs20040807.patch (renamed from busybox/busybox-1.00-rc1/cvs20040731.patch)0
-rw-r--r--busybox/busybox-1.00-rc2/silence-hwclock.patch15
-rw-r--r--busybox/busybox-1.00-rc2/syslog34
-rw-r--r--busybox/busybox-1.00-rc2/tar.patch22
-rw-r--r--busybox/busybox_1.00-rc2.oe49
17 files changed, 1609 insertions, 0 deletions
diff --git a/busybox/busybox-1.00-rc2/add-getkey-applet.patch b/busybox/busybox-1.00-rc2/add-getkey-applet.patch
new file mode 100644
index 0000000000..fb68133556
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/add-getkey-applet.patch
@@ -0,0 +1,133 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- /dev/null 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.00-pre10/console-tools/getkey.c 2004-06-11 22:22:54.402329312 +0200
+@@ -0,0 +1,70 @@
++/* vi: set sw=4 ts=4: */
++/*
++ * getkey.c - Michael 'Mickey' Lauer
++ *
++ * Version 0.1
++ *
++ * A simple keygrapper. Displays a configurable message and waits a dedicated number
++ * of seconds for a keypress. Sets the exit code accordingly (SUCCESS on keypress).
++ */
++#include <stdio.h>
++#include <fcntl.h>
++#include <memory.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <sys/types.h>
++#include <errno.h>
++#include <sys/ioctl.h>
++#include <sys/kd.h>
++#include "busybox.h"
++
++extern int getkey_main(int argc, char **argv)
++{
++ int status = EXIT_FAILURE;
++
++ if ( argc < 2 ) {
++ bb_show_usage();
++ }
++
++ //bb_printf( "DEBUG: time = '%s'\n", argv[1] );
++ //bb_printf( "DEBUG: mesg = '%s'\n", argv[2] );
++
++ struct termios orig;
++ struct termios attr;
++
++ tcgetattr(STDIN_FILENO, &orig);
++ attr = orig;
++ attr.c_cc[VMIN] = 0;
++ attr.c_cc[VTIME] = 0;
++ attr.c_iflag |= INLCR;
++ attr.c_oflag |= OPOST|ONLCR;
++ attr.c_cflag &= ~PARENB;
++ attr.c_lflag &= ~(ICANON/*|ECHO*/);
++ tcsetattr(STDIN_FILENO,TCSANOW,&attr);
++
++ fd_set rfds;
++ struct timeval tv;
++ int retval;
++
++ FD_ZERO(&rfds);
++ FD_SET(0, &rfds);
++
++ tv.tv_sec = atoi( argv[1] );
++ tv.tv_usec = 0;
++
++ if ( argc == 3 )
++ {
++ bb_printf( argv[2], tv.tv_sec );
++ bb_printf( "\n" );
++ fflush(stdout);
++ }
++ retval = select(1, &rfds, NULL, NULL, &tv);
++ if (retval)
++ {
++ status = EXIT_SUCCESS;
++ }
++
++ tcsetattr(STDIN_FILENO,TCSANOW,&orig);
++ return status;
++};
++
+--- busybox-1.00-pre10/console-tools/Makefile.in~getkey 2004-03-15 09:28:17.000000000 +0100
++++ busybox-1.00-pre10/console-tools/Makefile.in 2004-06-10 16:31:03.000000000 +0200
+@@ -27,6 +27,7 @@
+ CONSOLETOOLS_DIR-$(CONFIG_CLEAR) += clear.o
+ CONSOLETOOLS_DIR-$(CONFIG_DEALLOCVT) += deallocvt.o
+ CONSOLETOOLS_DIR-$(CONFIG_DUMPKMAP) += dumpkmap.o
++CONSOLETOOLS_DIR-$(CONFIG_GETKEY) += getkey.o
+ CONSOLETOOLS_DIR-$(CONFIG_LOADFONT) += loadfont.o
+ CONSOLETOOLS_DIR-$(CONFIG_LOADKMAP) += loadkmap.o
+ CONSOLETOOLS_DIR-$(CONFIG_OPENVT) += openvt.o
+--- busybox-1.00-pre10/console-tools/Config.in~getkey 2003-12-20 08:07:22.000000000 +0100
++++ busybox-1.00-pre10/console-tools/Config.in 2004-06-10 16:34:39.000000000 +0200
+@@ -31,6 +31,14 @@
+ This program dumps the kernel's keyboard translation table to
+ stdout, in binary format. You can then use loadkmap to load it.
+
++config CONFIG_GETKEY
++ bool "getkey"
++ default n
++ help
++ This program displays a configurable message and waits
++ a dedicated number of seconds for a keypress. It sets
++ the exit code accordingly, i.e. SUCCESS if there was a keypress.
++
+ config CONFIG_LOADFONT
+ bool "loadfont"
+ default n
+--- busybox-1.00-pre10/include/applets.h~getkey 2004-04-06 18:59:43.000000000 +0200
++++ busybox-1.00-pre10/include/applets.h 2004-06-10 16:40:23.000000000 +0200
+@@ -223,6 +223,9 @@
+ #ifdef CONFIG_FTPPUT
+ APPLET(ftpput, ftpgetput_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
+ #endif
++#ifdef CONFIG_GETKEY
++ APPLET(getkey, getkey_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
++#endif
+ #ifdef CONFIG_GETOPT
+ APPLET(getopt, getopt_main, _BB_DIR_BIN, _BB_SUID_NEVER)
+ #endif
+--- busybox-1.00-pre10/include/usage.h~getkey 2004-04-13 21:27:20.000000000 +0200
++++ busybox-1.00-pre10/include/usage.h 2004-06-11 22:23:29.593979368 +0200
+@@ -729,6 +729,13 @@
+ "\t-p, --password Password to be used\n" \
+ "\t-P, --port Port number to be used"
+
++#define getkey_trivial_usage \
++ "time [message]"
++#define getkey_full_usage \
++ "Display a message and wait for a keypress."
++#define getkey_example_usage \
++ "$ getkey 5 'Press a key within %d seconds to interrupt autoboot.'"
++
+ #define getopt_trivial_usage \
+ "[OPTIONS]..."
+ #define getopt_full_usage \
diff --git a/busybox/busybox-1.00-rc2/awk.patch b/busybox/busybox-1.00-rc2/awk.patch
new file mode 100644
index 0000000000..9342dada82
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/awk.patch
@@ -0,0 +1,10 @@
+--- editors/awk.c~ 2004-03-15 08:28:31.000000000 +0000
++++ editors/awk.c 2004-07-05 19:16:14.000000000 +0100
+@@ -1211,6 +1211,7 @@
+
+ if (c & TC_GRPSTART) {
+ while(next_token(TC_GRPSEQ | TC_GRPTERM) != TC_GRPTERM) {
++ if (t.tclass & TC_NEWLINE) continue;
+ rollback_token();
+ chain_group();
+ }
diff --git a/busybox/busybox-1.00-rc2/bb-iproute-iftunnel.patch b/busybox/busybox-1.00-rc2/bb-iproute-iftunnel.patch
new file mode 100644
index 0000000000..93b3ea07dd
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/bb-iproute-iftunnel.patch
@@ -0,0 +1,36 @@
+diff -Nur include/linux-new/if_tunnel.h include/linux/if_tunnel.h
+--- ./include/linux/if_tunnel.h 1970-01-01 01:00:00.000000000 +0100
++++ ./include/linux/if_tunnel.h 2004-05-06 14:36:38.000000000 +0200
+@@ -0,0 +1,32 @@
++#ifndef _IF_TUNNEL_H_
++#define _IF_TUNNEL_H_
++
++#include <net/if.h>
++#include <asm/types.h>
++
++#define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0)
++#define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1)
++#define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2)
++#define SIOCCHGTUNNEL (SIOCDEVPRIVATE + 3)
++
++#define GRE_CSUM __constant_htons(0x8000)
++#define GRE_ROUTING __constant_htons(0x4000)
++#define GRE_KEY __constant_htons(0x2000)
++#define GRE_SEQ __constant_htons(0x1000)
++#define GRE_STRICT __constant_htons(0x0800)
++#define GRE_REC __constant_htons(0x0700)
++#define GRE_FLAGS __constant_htons(0x00F8)
++#define GRE_VERSION __constant_htons(0x0007)
++
++struct ip_tunnel_parm
++{
++ char name[IFNAMSIZ];
++ int link;
++ __u16 i_flags;
++ __u16 o_flags;
++ __u32 i_key;
++ __u32 o_key;
++ struct iphdr iph;
++};
++
++#endif /* _IF_TUNNEL_H_ */
diff --git a/busybox/busybox-1.00-rc2/busybox-1.00-pre10-fuser.patch b/busybox/busybox-1.00-rc2/busybox-1.00-pre10-fuser.patch
new file mode 100644
index 0000000000..3bae1a8458
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/busybox-1.00-pre10-fuser.patch
@@ -0,0 +1,649 @@
+diff -urN busybox-1.00-pre10.orig/include/applets.h busybox-1.00-pre10/include/applets.h
+--- busybox-1.00-pre10.orig/include/applets.h 2004-04-06 11:59:43.000000000 -0500
++++ busybox-1.00-pre10/include/applets.h 2004-04-13 12:46:08.000000000 -0500
+@@ -223,6 +223,9 @@
+ #ifdef CONFIG_FTPPUT
+ APPLET(ftpput, ftpgetput_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
+ #endif
++#ifdef CONFIG_FUSER
++ APPLET(fuser, fuser_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
++#endif
+ #ifdef CONFIG_GETOPT
+ APPLET(getopt, getopt_main, _BB_DIR_BIN, _BB_SUID_NEVER)
+ #endif
+@@ -355,6 +358,9 @@
+ #ifdef CONFIG_LS
+ APPLET(ls, ls_main, _BB_DIR_BIN, _BB_SUID_NEVER)
+ #endif
++#ifdef CONFIG_FEATURE_FUSER_LSOF
++ APPLET(lsof, lsof_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
++#endif
+ #ifdef CONFIG_LSMOD
+ APPLET(lsmod, lsmod_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
+ #endif
+diff -urN busybox-1.00-pre10.orig/include/usage.h busybox-1.00-pre10/include/usage.h
+--- busybox-1.00-pre10.orig/include/usage.h 2004-04-06 12:52:02.000000000 -0500
++++ busybox-1.00-pre10/include/usage.h 2004-04-13 16:10:45.000000000 -0500
+@@ -729,6 +729,17 @@
+ "\t-p, --password Password to be used\n" \
+ "\t-P, --port Port number to be used"
+
++#define fuser_trivial_usage \
++ "[options] file OR port/proto"
++#define fuser_full_usage \
++ "Options:\n" \
++ "\t-m Show all processes on the same mounted fs\n" \
++ "\t-k Kill all processes that match.\n" \
++ "\t-s Don't print or kill anything.\n" \
++ "\t-4 When using port/proto only search IPv4 space\n" \
++ "\t-6 When using port/proto only search IPv6 space\n" \
++ "\t-SIGNAL When used with -k, this signal will be used to kill\n"
++
+ #define getopt_trivial_usage \
+ "[OPTIONS]..."
+ #define getopt_full_usage \
+@@ -1536,6 +1547,13 @@
+ USAGE_SELINUX("\t-k\tprint security context\n") \
+ USAGE_SELINUX("\t-K\tprint security context in long format\n")
+
++#define lsof_trivial_usage \
++ "[filelist]"
++#define lsof_full_usage \
++ "List open files with associated process information.\n" \
++ "Specify a filename or list of filenames to only see information\n " \
++ "about those files."
++
+ #define lsmod_trivial_usage \
+ ""
+ #define lsmod_full_usage \
+diff -urN busybox-1.00-pre10.orig/procps/Config.in busybox-1.00-pre10/procps/Config.in
+--- busybox-1.00-pre10.orig/procps/Config.in 2003-12-24 00:02:11.000000000 -0600
++++ busybox-1.00-pre10/procps/Config.in 2004-04-13 16:13:25.000000000 -0500
+@@ -13,6 +13,24 @@
+ memory in the system, as well as the buffers used by the kernel.
+ The shared memory column should be ignored; it is obsolete.
+
++config CONFIG_FUSER
++ bool "fuser"
++ default n
++ help
++ fuser lists all PIDs (Process IDs) that currently have a given
++ file open. fuser can also list all PIDs that have a given network
++ (TCP or UDP) port open.
++
++config CONFIG_FEATURE_FUSER_LSOF
++ bool " lsof"
++ default n
++ depends on CONFIG_FUSER
++ help
++ lsof shows open files with associated process information. If
++ invoked without any parameters it lists ALL open file handles
++ on the system. It also accepts a filename or list of filenames as
++ input to narrow the output to only those files.
++
+ config CONFIG_KILL
+ bool "kill"
+ default n
+@@ -78,5 +96,6 @@
+ help
+ sysctl - configure kernel parameters at runtime
+
++
+ endmenu
+
+diff -urN busybox-1.00-pre10.orig/procps/Makefile.in busybox-1.00-pre10/procps/Makefile.in
+--- busybox-1.00-pre10.orig/procps/Makefile.in 2004-03-15 02:29:03.000000000 -0600
++++ busybox-1.00-pre10/procps/Makefile.in 2004-04-13 11:36:54.000000000 -0500
+@@ -31,6 +31,7 @@
+ PROCPS-$(CONFIG_SYSCTL) += sysctl.o
+ PROCPS-$(CONFIG_TOP) += top.o
+ PROCPS-$(CONFIG_UPTIME) += uptime.o
++PROCPS-$(CONFIG_FUSER) += fuser.o
+
+ libraries-y+=$(PROCPS_DIR)$(PROCPS_AR)
+
+diff -urN busybox-1.00-pre10.orig/procps/fuser.c busybox-1.00-pre10/procps/fuser.c
+--- busybox-1.00-pre10.orig/procps/fuser.c 1969-12-31 18:00:00.000000000 -0600
++++ busybox-1.00-pre10/procps/fuser.c 2004-04-13 16:03:56.000000000 -0500
+@@ -0,0 +1,541 @@
++/*
++ * tiny fuser implementation
++ *
++ * Copyright 2004 Tony J. White
++ *
++ * May be distributed under the conditions of the
++ * GNU Library General Public License
++ */
++
++/* this define is needed for asprintf() */
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <string.h>
++#include <limits.h>
++#include <dirent.h>
++#include <signal.h>
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <sys/stat.h>
++#include <sys/socket.h>
++#include "busybox.h"
++
++#define FUSER_PROC_DIR "/proc"
++#define FUSER_MAX_LINE 255
++
++#define FUSER_OPT_MOUNT 1
++#define FUSER_OPT_KILL 2
++#define FUSER_OPT_SILENT 4
++#define FUSER_OPT_IP6 8
++#define FUSER_OPT_IP4 16
++#define FUSER_OPT_SHOWALL 32
++
++typedef struct inode_list {
++ ino_t inode;
++ dev_t dev;
++ struct inode_list *next;
++} inode_list;
++
++typedef struct pid_list {
++ pid_t pid;
++ ino_t inode;
++ dev_t dev;
++ char *filename;
++ struct pid_list *next;
++} pid_list;
++
++static int fuser_option(char *option)
++{
++ int opt = 0;
++
++ if(!(strlen(option))) return 0;
++ if(option[0] != '-') return 0;
++ *++option;
++ while(*option != '\0') {
++ if(*option == 'm') opt |= FUSER_OPT_MOUNT;
++ else if(*option == 'k') opt |= FUSER_OPT_KILL;
++ else if(*option == 's') opt |= FUSER_OPT_SILENT;
++ else if(*option == '6') opt |= FUSER_OPT_IP6;
++ else if(*option == '4') opt |= FUSER_OPT_IP4;
++ else {
++ bb_error_msg_and_die(
++ "Unsupported option '%c'", *option);
++ }
++ *++option;
++ }
++ return opt;
++}
++
++static int fuser_file_to_dev_inode(const char *filename,
++ dev_t *dev, ino_t *inode)
++{
++ struct stat f_stat;
++ if((stat(filename, &f_stat)) < 0) return 0;
++ memcpy(inode, &f_stat.st_ino, sizeof(ino_t));
++ memcpy(dev, &f_stat.st_dev, sizeof(dev_t));
++ return 1;
++}
++
++static int fuser_find_socket_dev(dev_t *dev) {
++ int fd = socket(PF_INET, SOCK_DGRAM,0);
++ struct stat buf;
++
++ if (fd >= 0 && (fstat(fd, &buf)) == 0) {
++ memcpy(dev, &buf.st_dev, sizeof(dev_t));
++ close(fd);
++ return 1;
++ }
++ return 0;
++}
++
++static int fuser_parse_net_arg(const char *filename,
++ const char **proto, int *port)
++{
++ int tport;
++ char path[PATH_MAX+1], tproto[5];
++
++ if((sscanf(filename, "%d/%4s", &tport, &tproto[0])) != 2) return 0;
++ strncpy(path, FUSER_PROC_DIR, sizeof(FUSER_PROC_DIR));
++ strncat(path, "/net/", 5);
++ strncat(path, tproto, strlen(tproto));
++ if((access(path, R_OK)) != 0) return 0;
++ *proto = bb_xstrndup(tproto, strlen(tproto));
++ memcpy(port, &tport, sizeof(int));
++ return 1;
++}
++
++static int fuser_add_pid(pid_list *plist, pid_t pid,
++ dev_t dev, ino_t inode, const char *filename)
++{
++ pid_list *curr = NULL, *last = NULL;
++
++ if(plist->pid == 0) {
++ plist->pid = pid;
++ plist->dev = dev;
++ plist->inode = inode;
++ plist->filename = bb_xstrndup(filename, strlen(filename));
++ return 1;
++ }
++ curr = plist;
++ while(curr != NULL) {
++ if(curr->pid == pid && curr->dev == dev && curr->inode == inode)
++ return 1;
++ last = curr;
++ curr = curr->next;
++ }
++ curr = xmalloc(sizeof(pid_list));
++ last->next = curr;
++ curr->pid = pid;
++ curr->dev = dev;
++ curr->inode = inode;
++ curr->filename = bb_xstrndup(filename, strlen(filename));
++ curr->next = NULL;
++ return 1;
++}
++
++static int fuser_add_inode(inode_list *ilist, dev_t dev, ino_t inode)
++{
++ inode_list *curr = NULL, *last = NULL;
++
++ if(!ilist->inode && !ilist->dev) {
++ ilist->dev = dev;
++ ilist->inode = inode;
++ }
++ curr = ilist;
++ while(curr != NULL) {
++ if(curr->inode == inode && curr->dev == dev) return 1;
++ last = curr;
++ curr = curr->next;
++ }
++ curr = xmalloc(sizeof(inode_list));
++ last->next = curr;
++ curr->dev = dev;
++ curr->inode = inode;
++ curr->next = NULL;
++ return 1;
++}
++
++static int fuser_clear_pid_list(pid_list *plist)
++{
++ pid_list *curr, *next;
++ curr = next = plist->next;
++ while(curr != NULL) {
++ next = curr->next;
++ free(curr);
++ curr = next;
++ }
++ plist->pid = 0;
++ plist->next = NULL;
++ return 1;
++}
++
++static int fuser_clear_inode_list(inode_list *ilist)
++{
++ inode_list *curr, *next;
++ curr = next = ilist->next;
++ while(curr != NULL) {
++ next = curr->next;
++ free(curr);
++ curr = next;
++ }
++ ilist->dev = 0;
++ ilist->inode = 0;
++ ilist->next = NULL;
++ return 1;
++}
++
++
++static int fuser_scan_proc_net(int opts, const char *proto,
++ int port, inode_list *ilist)
++{
++ char path[PATH_MAX+1], line[FUSER_MAX_LINE+1];
++ char addr[128];
++ ino_t tmp_inode;
++ dev_t tmp_dev;
++ int tmp_port;
++ FILE *f;
++
++ if(!fuser_find_socket_dev(&tmp_dev)) tmp_dev = 0;
++
++ strncpy(path, FUSER_PROC_DIR, sizeof(FUSER_PROC_DIR));
++ strncat(path, "/net/", 5);
++ strncat(path, proto, strlen(proto));
++
++ if (!(f = fopen(path, "r"))) return 0;
++ while(fgets(line, FUSER_MAX_LINE, f)) {
++ if(sscanf(line,
++ "%*d: %64[0-9A-Fa-f]:%x %*x:%*x %*x %*x:%*x "
++ "%*x:%*x %*x %*d %*d %lu",
++ &addr[0], &tmp_port, &tmp_inode) == 3) {
++ if((strlen(addr) == 8) &&
++ (opts & FUSER_OPT_IP6)) continue;
++ else if((strlen(addr) > 8) &&
++ (opts & FUSER_OPT_IP4)) continue;
++ if(tmp_port == port) {
++ fuser_add_inode(ilist, tmp_dev, tmp_inode);
++ }
++ }
++
++ }
++ fclose(f);
++ return 1;
++}
++
++static int fuser_search_dev_inode(int opts, inode_list *ilist,
++ dev_t dev, ino_t inode)
++{
++ inode_list *curr;
++ curr = ilist;
++
++ while(curr) {
++ if((opts & FUSER_OPT_MOUNT) && curr->dev == dev)
++ return 1;
++ if(curr->inode == inode && curr->dev == dev)
++ return 1;
++ curr = curr->next;
++ }
++ return 0;
++}
++
++static int fuser_scan_pid_maps(int opts, const char *fname, pid_t pid,
++ inode_list *ilist, pid_list *plist)
++{
++ FILE *file;
++ char line[FUSER_MAX_LINE + 1];
++ int major, minor;
++ ino_t inode;
++ dev_t dev;
++ char filename[FUSER_MAX_LINE];
++
++ if (!(file = fopen(fname, "r"))) return 0;
++ while (fgets(line, FUSER_MAX_LINE, file)) {
++ if(sscanf(line, "%*s %*s %*s %x:%x %ld%*[ \t]%s",
++ &major, &minor, &inode, &filename[0]) < 3) continue;
++ if(major == 0 && minor == 0 && inode == 0) continue;
++ dev = makedev(major, minor);
++ if((opts & FUSER_OPT_SHOWALL)
++ || fuser_search_dev_inode(opts, ilist, dev, inode)) {
++ fuser_add_pid(plist, pid, dev, inode, filename);
++ }
++ }
++ fclose(file);
++ return 1;
++}
++
++static int fuser_scan_link(int opts, const char *lname, pid_t pid,
++ inode_list *ilist, pid_list *plist)
++{
++ ino_t inode;
++ dev_t dev;
++
++ if(!fuser_file_to_dev_inode(lname, &dev, &inode)) return 0;
++
++ if((opts & FUSER_OPT_SHOWALL)
++ || fuser_search_dev_inode(opts, ilist, dev, inode))
++ fuser_add_pid(plist, pid, dev, inode, xreadlink(lname));
++ return 1;
++}
++
++static int fuser_scan_dir_links(int opts, const char *dname, pid_t pid,
++ inode_list *ilist, pid_list *plist)
++{
++ DIR *d;
++ struct dirent *de;
++ char *lname;
++
++ if((d = opendir(dname))) {
++ while((de = readdir(d)) != NULL) {
++ if(!(strcmp(de->d_name, "."))) continue;
++ if(!(strcmp(de->d_name, ".."))) continue;
++ if(asprintf(&lname, "%s/%s", dname, de->d_name) < 0) {
++ free(lname);
++ continue;
++ }
++ fuser_scan_link(opts, lname, pid, ilist, plist);
++ free(lname);
++ }
++ closedir(d);
++ }
++ else return 0;
++ return 1;
++
++}
++
++static int fuser_scan_proc_pids(int opts, inode_list *ilist, pid_list *plist)
++{
++ struct dirent **de;
++ pid_t pid;
++ char *dname;
++ int n = 0, i = 0;
++
++ n = scandir(FUSER_PROC_DIR, &de, 0, versionsort);
++ if(n < 0)
++ bb_perror_msg_and_die("could not open procfs dir %s",
++ FUSER_PROC_DIR);
++ for(i=0; i<n; i++) {
++ pid = (pid_t)atoi(de[i]->d_name);
++ if(!pid) continue;
++ if(asprintf(&dname, "%s/%d/", FUSER_PROC_DIR, pid) < 0) {
++ free(dname);
++ continue;
++ }
++ if(chdir(dname) < 0) {
++ free(dname);
++ continue;
++ }
++ free(dname);
++ fuser_scan_link(opts, "cwd", pid, ilist, plist);
++ fuser_scan_link(opts, "exe", pid, ilist, plist);
++ fuser_scan_link(opts, "root", pid, ilist, plist);
++ fuser_scan_dir_links(opts, "fd", pid, ilist, plist);
++ fuser_scan_dir_links(opts, "lib", pid, ilist, plist);
++ fuser_scan_dir_links(opts, "mmap", pid, ilist, plist);
++ fuser_scan_pid_maps(opts, "maps", pid, ilist, plist);
++ }
++ return 1;
++}
++
++static int fuser_print_pid_list(pid_list *plist) {
++ pid_list *curr;
++ curr = plist;
++
++ if(plist == NULL) return 0;
++ while(curr != NULL) {
++ if(curr->pid > 0) printf("%d ", curr->pid);
++ curr = curr->next;
++ }
++ printf("\n");
++ return 1;
++}
++
++static int fuser_kill_pid_list(pid_list *plist, int sig) {
++ pid_list *curr;
++ curr = plist;
++ pid_t mypid = getpid();
++ int success = 1;
++
++ if(plist == NULL) return 0;
++ while(curr != NULL) {
++ if(curr->pid > 0 && curr->pid != mypid) {
++ if (kill(curr->pid, sig) != 0) {
++ bb_perror_msg(
++ "Could not kill pid '%d'", curr->pid);
++ success = 0;
++ }
++ }
++ curr = curr->next;
++ }
++ return success;
++}
++
++extern int fuser_main(int argc, char **argv) {
++ int port, i, optn;
++ int* fni; /* file name indexes of argv */
++ int fnic = 0; /* file name index count */
++ const char *proto;
++ static int opt = 0; /* FUSER_OPT_ */
++ dev_t dev;
++ ino_t inode;
++ pid_list *pids;
++ inode_list *inodes;
++ int killsig = SIGTERM;
++ int success = 1;
++
++ fni = xmalloc(sizeof(int));
++ for(i=1;i<argc;i++) {
++ optn = fuser_option(argv[i]);
++ if(optn) opt |= optn;
++ else if(argv[i][0] == '-') {
++ if(!(u_signal_names(argv[i]+1, &killsig, 0)))
++ killsig = SIGTERM;
++ }
++ else {
++ fni = xrealloc(fni, sizeof(int) * (fnic+2));
++ fni[fnic++] = i;
++ }
++ }
++ if(!fnic) return 1;
++ pids = xmalloc(sizeof(pid_list));
++ inodes = xmalloc(sizeof(inode_list));
++ for(i=0;i<fnic;i++) {
++ if(fuser_parse_net_arg(argv[fni[i]], &proto, &port)) {
++ fuser_scan_proc_net(opt, proto, port, inodes);
++ }
++ else {
++ if(!fuser_file_to_dev_inode(
++ argv[fni[i]], &dev, &inode)) {
++ bb_perror_msg_and_die(
++ "Could not open '%s'", argv[fni[i]]);
++ }
++ fuser_add_inode(inodes, dev, inode);
++ }
++ success = fuser_scan_proc_pids(opt, inodes, pids);
++ /* if the first pid in the list is 0, none have been found */
++ if(pids->pid == 0) success = 0;
++ if(!success) break;
++ if(opt & FUSER_OPT_KILL) {
++ success = fuser_kill_pid_list(pids, killsig);
++ }
++ else if(!(opt & FUSER_OPT_SILENT)) {
++ printf("%s: ", argv[fni[i]]);
++ success = fuser_print_pid_list(pids);
++ }
++ fuser_clear_pid_list(pids);
++ fuser_clear_inode_list(inodes);
++ }
++ /* return 0 on (success == 1) 1 otherwise */
++ return (success != 1);
++}
++
++#ifdef CONFIG_FEATURE_FUSER_LSOF
++
++static int lsof_option(char *option)
++{
++ if(!(strlen(option))) return 0;
++ if(option[0] != '-') return 0;
++ /* see fuser_option() for an example on how to add options
++ currently none are supported */
++ bb_error_msg_and_die("Unsupported option '%c'", *option);
++ return 0;
++}
++
++static int lsof_print_pid_list(pid_list *plist) {
++ pid_list *curr;
++ procps_status_t *ps, *ps_tmp;
++ int nps = 0, n = 0;
++ char *devstr;
++
++ curr = plist;
++ if(plist == NULL) return 0;
++ ps = xmalloc(sizeof(procps_status_t));
++#ifdef CONFIG_SELINUX
++ while ((ps_tmp = procps_scan(0, 0, NULL) ) != 0) {
++#else
++ while ((ps_tmp = procps_scan(0)) != 0) {
++#endif
++ n = nps;
++ ps = xrealloc(ps, (++nps)*sizeof(procps_status_t));
++ memcpy(ps + n, ps_tmp, sizeof(procps_status_t));
++ }
++
++ if(curr != NULL) {
++ printf("COMMAND PID USER DEVICE NODE NAME\n");
++ }
++ while(curr != NULL) {
++ if(curr->pid > 0) {
++ for(n = 0; n < nps; n++) {
++ ps_tmp = ps + n;
++ if(ps_tmp->pid == curr->pid) {
++ printf("%-9.9s ", ps_tmp->short_cmd);
++ printf("%6d ", curr->pid);
++ printf("%7.7s ", ps_tmp->user);
++ }
++ }
++ asprintf(&devstr, "%d,%d",
++ major(curr->dev), minor(curr->dev));
++ printf("%6.6s", devstr);
++ free(devstr);
++ printf("%10ld ", curr->inode);
++ printf("%s\n", curr->filename);
++ }
++ curr = curr->next;
++ }
++ printf("\n");
++ return 1;
++}
++
++extern int lsof_main(int argc, char **argv) {
++ int i, optn;
++ int* fni; /* file name indexes of argv */
++ int fnic = 0; /* file name index count */
++ static int opt = 0; /* FUSER_OPT_ */
++ dev_t dev;
++ ino_t inode;
++ pid_list *pids;
++ inode_list *inodes;
++ int success = 1;
++
++ fni = xmalloc(sizeof(int));
++ for(i=1;i<argc;i++) {
++ optn = lsof_option(argv[i]);
++ if(optn) opt |= optn;
++ else {
++ fni = xrealloc(fni, sizeof(int) * (fnic+2));
++ fni[fnic++] = i;
++ }
++ }
++ pids = xmalloc(sizeof(pid_list));
++ inodes = xmalloc(sizeof(inode_list));
++ if(!fnic) {
++ opt |= FUSER_OPT_SHOWALL;
++ success = fuser_scan_proc_pids(opt, inodes, pids);
++ if(success) {
++ success = lsof_print_pid_list(pids);
++ fuser_clear_pid_list(pids);
++ }
++ }
++ else {
++ for(i=0;i<fnic;i++) {
++ if(!fuser_file_to_dev_inode(
++ argv[fni[i]], &dev, &inode)) {
++ bb_perror_msg_and_die(
++ "Could not open '%s'", argv[fni[i]]);
++ }
++ fuser_add_inode(inodes, dev, inode);
++ success = fuser_scan_proc_pids(opt, inodes, pids);
++ if(pids->pid == 0) success = 0;
++ if(!success) break;
++ success = lsof_print_pid_list(pids);
++ fuser_clear_pid_list(pids);
++ fuser_clear_inode_list(inodes);
++ }
++ }
++ /* return 0 on (success == 1) 1 otherwise */
++ return (success != 1);
++}
++#endif /* CONFIG_FEATURE_FUSER_LSOF */
diff --git a/busybox/busybox-1.00-rc1/busybox-1.00-rc2-modprobe.patch b/busybox/busybox-1.00-rc2/busybox-1.00-rc2-cvs-modprobe-for-all.patch
index e69de29bb2..e69de29bb2 100644
--- a/busybox/busybox-1.00-rc1/busybox-1.00-rc2-modprobe.patch
+++ b/busybox/busybox-1.00-rc2/busybox-1.00-rc2-cvs-modprobe-for-all.patch
diff --git a/busybox/busybox-1.00-rc2/busybox-suidinstall.patch b/busybox/busybox-1.00-rc2/busybox-suidinstall.patch
new file mode 100644
index 0000000000..b557c74c85
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/busybox-suidinstall.patch
@@ -0,0 +1,20 @@
+diff -urNd busybox/applets/install.sh busybox-new/applets/install.sh
+--- busybox/applets/install.sh 2001-03-08 15:42:11.000000000 -0600
++++ busybox-new/applets/install.sh 2002-10-11 12:04:01.000000000 -0500
+@@ -15,10 +15,15 @@
+ fi
+ h=`sort busybox.links | uniq`
+
++if [ -n "$SUID" ]; then
++ mode=4755
++else
++ mode=0755
++fi
+
+ rm -f $prefix/bin/busybox || exit 1
+ mkdir -p $prefix/bin || exit 1
+-install -m 755 busybox $prefix/bin/busybox || exit 1
++install -m $mode busybox $prefix/bin/busybox || exit 1
+
+ for i in $h ; do
+ appdir=`dirname $i`
diff --git a/busybox/busybox-1.00-rc2/console.patch b/busybox/busybox-1.00-rc2/console.patch
new file mode 100644
index 0000000000..d57bdfbe89
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/console.patch
@@ -0,0 +1,13 @@
+--- busybox-1.00-pre2/libbb/get_console.c~console
++++ busybox-1.00-pre2/libbb/get_console.c
+@@ -86,10 +86,6 @@
+ {
+ int fd;
+
+- if (-1 == (fd = open_a_console("/dev/console")))
+- return -1;
+- else
+- return fd;
+ fd = open_a_console(CURRENT_TTY);
+ if (fd >= 0)
+ return fd;
diff --git a/busybox/busybox-1.00-rc2/defconfig b/busybox/busybox-1.00-rc2/defconfig
new file mode 100644
index 0000000000..783bd27527
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/defconfig
@@ -0,0 +1,473 @@
+#
+# Automatically generated make config: don't edit
+#
+HAVE_DOT_CONFIG=y
+
+#
+# General Configuration
+#
+CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
+# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
+# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
+# CONFIG_FEATURE_VERBOSE_USAGE is not set
+# CONFIG_FEATURE_INSTALLER is not set
+# CONFIG_LOCALE_SUPPORT is not set
+CONFIG_FEATURE_DEVFS=y
+CONFIG_FEATURE_DEVPTS=y
+# CONFIG_FEATURE_CLEAN_UP is not set
+# CONFIG_FEATURE_SUID is not set
+# CONFIG_SELINUX is not set
+
+#
+# Build Options
+#
+# CONFIG_STATIC is not set
+# CONFIG_LFS is not set
+# USING_CROSS_COMPILER is not set
+EXTRA_CFLAGS_OPTIONS=""
+
+#
+# Installation Options
+#
+# CONFIG_INSTALL_NO_USR is not set
+PREFIX="./_install"
+
+#
+# Archival Utilities
+#
+CONFIG_AR=y
+# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
+CONFIG_BUNZIP2=y
+CONFIG_CPIO=y
+# CONFIG_DPKG is not set
+# CONFIG_DPKG_DEB is not set
+CONFIG_GUNZIP=y
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
+CONFIG_GZIP=y
+# CONFIG_RPM2CPIO is not set
+# CONFIG_RPM is not set
+CONFIG_TAR=y
+CONFIG_FEATURE_TAR_CREATE=y
+CONFIG_FEATURE_TAR_BZIP2=y
+# CONFIG_FEATURE_TAR_FROM is not set
+CONFIG_FEATURE_TAR_GZIP=y
+# CONFIG_FEATURE_TAR_COMPRESS is not set
+CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y
+CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+# CONFIG_UNCOMPRESS is not set
+CONFIG_UNZIP=y
+
+#
+# Common options for cpio and tar
+#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+
+#
+# Coreutils
+#
+CONFIG_BASENAME=y
+# CONFIG_CAL is not set
+CONFIG_CAT=y
+CONFIG_CHGRP=y
+CONFIG_CHMOD=y
+CONFIG_CHOWN=y
+CONFIG_CHROOT=y
+# CONFIG_CMP is not set
+CONFIG_CP=y
+CONFIG_CUT=y
+CONFIG_DATE=y
+
+#
+# date (forced enabled for use with watch)
+#
+# CONFIG_FEATURE_DATE_ISOFMT is not set
+CONFIG_DD=y
+CONFIG_DF=y
+CONFIG_DIRNAME=y
+# CONFIG_DOS2UNIX is not set
+CONFIG_DU=y
+CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y
+CONFIG_ECHO=y
+CONFIG_FEATURE_FANCY_ECHO=y
+CONFIG_ENV=y
+CONFIG_EXPR=y
+CONFIG_FALSE=y
+# CONFIG_FOLD is not set
+CONFIG_HEAD=y
+# CONFIG_FEATURE_FANCY_HEAD is not set
+# CONFIG_HOSTID is not set
+CONFIG_ID=y
+# CONFIG_INSTALL is not set
+# CONFIG_LENGTH is not set
+CONFIG_LN=y
+CONFIG_LOGNAME=y
+CONFIG_LS=y
+CONFIG_FEATURE_LS_FILETYPES=y
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+# CONFIG_FEATURE_LS_RECURSIVE is not set
+CONFIG_FEATURE_LS_SORTFILES=y
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+CONFIG_FEATURE_LS_USERNAME=y
+CONFIG_FEATURE_LS_COLOR=y
+CONFIG_MD5SUM=y
+CONFIG_MKDIR=y
+CONFIG_MKFIFO=y
+CONFIG_MKNOD=y
+CONFIG_MV=y
+CONFIG_OD=y
+CONFIG_PRINTF=y
+CONFIG_PWD=y
+# CONFIG_REALPATH is not set
+CONFIG_RM=y
+CONFIG_RMDIR=y
+CONFIG_SEQ=y
+# CONFIG_SHA1SUM is not set
+CONFIG_SLEEP=y
+# CONFIG_FEATURE_FANCY_SLEEP is not set
+CONFIG_SORT=y
+CONFIG_STTY=y
+CONFIG_SYNC=y
+CONFIG_TAIL=y
+CONFIG_FEATURE_FANCY_TAIL=y
+CONFIG_TEE=y
+# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
+CONFIG_TEST=y
+
+#
+# test (forced enabled for use with shell)
+#
+CONFIG_TOUCH=y
+CONFIG_TR=y
+CONFIG_TRUE=y
+CONFIG_TTY=y
+CONFIG_UNAME=y
+CONFIG_UNIQ=y
+# CONFIG_USLEEP is not set
+# CONFIG_UUDECODE is not set
+# CONFIG_UUENCODE is not set
+CONFIG_WATCH=y
+CONFIG_WC=y
+CONFIG_WHO=y
+CONFIG_WHOAMI=y
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set
+
+#
+# Common options for ls and more
+#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+CONFIG_FEATURE_HUMAN_READABLE=y
+
+#
+# Common options for md5sum, sha1sum
+#
+# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set
+
+#
+# Console Utilities
+#
+CONFIG_CHVT=y
+CONFIG_CLEAR=y
+CONFIG_DEALLOCVT=y
+CONFIG_DUMPKMAP=y
+CONFIG_GETKEY=y
+CONFIG_LOADFONT=y
+CONFIG_LOADKMAP=y
+CONFIG_OPENVT=y
+CONFIG_RESET=y
+# CONFIG_SETKEYCODES is not set
+
+#
+# Debian Utilities
+#
+CONFIG_MKTEMP=y
+# CONFIG_PIPE_PROGRESS is not set
+CONFIG_READLINK=y
+CONFIG_RUN_PARTS=y
+CONFIG_START_STOP_DAEMON=y
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+CONFIG_AWK=y
+CONFIG_FEATURE_AWK_MATH=y
+# CONFIG_PATCH is not set
+CONFIG_SED=y
+CONFIG_VI=y
+CONFIG_FEATURE_VI_COLON=y
+CONFIG_FEATURE_VI_YANKMARK=y
+CONFIG_FEATURE_VI_SEARCH=y
+CONFIG_FEATURE_VI_USE_SIGNALS=y
+# CONFIG_FEATURE_VI_DOT_CMD is not set
+# CONFIG_FEATURE_VI_READONLY is not set
+# CONFIG_FEATURE_VI_SETOPTS is not set
+# CONFIG_FEATURE_VI_SET is not set
+CONFIG_FEATURE_VI_WIN_RESIZE=y
+CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
+
+#
+# Finding Utilities
+#
+CONFIG_FIND=y
+CONFIG_FEATURE_FIND_MTIME=y
+CONFIG_FEATURE_FIND_PERM=y
+CONFIG_FEATURE_FIND_TYPE=y
+CONFIG_FEATURE_FIND_XDEV=y
+CONFIG_FEATURE_FIND_NEWER=y
+# CONFIG_FEATURE_FIND_INUM is not set
+CONFIG_GREP=y
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+CONFIG_FEATURE_GREP_CONTEXT=y
+CONFIG_XARGS=y
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set
+# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set
+# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set
+
+#
+# Init Utilities
+#
+# CONFIG_INIT is not set
+# CONFIG_HALT is not set
+# CONFIG_POWEROFF is not set
+# CONFIG_REBOOT is not set
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+# CONFIG_USE_BB_PWD_GRP is not set
+# CONFIG_ADDGROUP is not set
+# CONFIG_DELGROUP is not set
+# CONFIG_ADDUSER is not set
+# CONFIG_DELUSER is not set
+# CONFIG_GETTY is not set
+# CONFIG_LOGIN is not set
+# CONFIG_PASSWD is not set
+# CONFIG_SU is not set
+# CONFIG_SULOGIN is not set
+# CONFIG_VLOCK is not set
+
+#
+# Miscellaneous Utilities
+#
+# CONFIG_ADJTIMEX is not set
+# CONFIG_CROND is not set
+# CONFIG_CRONTAB is not set
+CONFIG_DC=y
+# CONFIG_DEVFSD is not set
+# CONFIG_LAST is not set
+# CONFIG_HDPARM is not set
+CONFIG_MAKEDEVS=y
+# CONFIG_MT is not set
+# CONFIG_RX is not set
+CONFIG_STRINGS=y
+# CONFIG_TIME is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Linux Module Utilities
+#
+CONFIG_INSMOD=y
+CONFIG_FEATURE_2_4_MODULES=y
+CONFIG_FEATURE_2_6_MODULES=y
+# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
+CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS=y
+# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
+CONFIG_FEATURE_INSMOD_LOAD_MAP=y
+CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL=y
+CONFIG_LSMOD=y
+CONFIG_MODPROBE=y
+CONFIG_RMMOD=y
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+
+#
+# Networking Utilities
+#
+CONFIG_FEATURE_IPV6=y
+# CONFIG_ARPING is not set
+# CONFIG_FTPGET is not set
+# CONFIG_FTPPUT is not set
+CONFIG_HOSTNAME=y
+# CONFIG_HTTPD is not set
+CONFIG_IFCONFIG=y
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+CONFIG_FEATURE_IFCONFIG_HW=y
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+CONFIG_IFUPDOWN=y
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+CONFIG_FEATURE_IFUPDOWN_IPV6=y
+# CONFIG_FEATURE_IFUPDOWN_IPX is not set
+# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
+# CONFIG_INETD is not set
+CONFIG_IP=y
+CONFIG_FEATURE_IP_ADDRESS=y
+CONFIG_FEATURE_IP_LINK=y
+CONFIG_FEATURE_IP_ROUTE=y
+CONFIG_FEATURE_IP_TUNNEL=y
+# CONFIG_IPCALC is not set
+# CONFIG_IPADDR is not set
+# CONFIG_IPLINK is not set
+# CONFIG_IPROUTE is not set
+# CONFIG_IPTUNNEL is not set
+# CONFIG_NAMEIF is not set
+CONFIG_NC=y
+CONFIG_NETSTAT=y
+CONFIG_NSLOOKUP=y
+CONFIG_PING=y
+CONFIG_FEATURE_FANCY_PING=y
+CONFIG_PING6=y
+CONFIG_FEATURE_FANCY_PING6=y
+CONFIG_ROUTE=y
+CONFIG_TELNET=y
+# CONFIG_FEATURE_TELNET_TTYPE is not set
+CONFIG_FEATURE_TELNET_AUTOLOGIN=y
+# CONFIG_TELNETD is not set
+# CONFIG_TFTP is not set
+CONFIG_TRACEROUTE=y
+# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
+# CONFIG_VCONFIG is not set
+CONFIG_WGET=y
+CONFIG_FEATURE_WGET_STATUSBAR=y
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+CONFIG_FEATURE_WGET_IP6_LITERAL=y
+
+#
+# udhcp Server/Client
+#
+# CONFIG_UDHCPD is not set
+CONFIG_UDHCPC=y
+CONFIG_FEATURE_UDHCP_SYSLOG=y
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+
+#
+# Process Utilities
+#
+CONFIG_FREE=y
+CONFIG_KILL=y
+CONFIG_KILLALL=y
+CONFIG_PIDOF=y
+CONFIG_PS=y
+CONFIG_RENICE=y
+CONFIG_TOP=y
+FEATURE_CPU_USAGE_PERCENTAGE=y
+CONFIG_UPTIME=y
+# CONFIG_SYSCTL is not set
+
+#
+# Another Bourne-like Shell
+#
+CONFIG_FEATURE_SH_IS_ASH=y
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+# CONFIG_FEATURE_SH_IS_LASH is not set
+# CONFIG_FEATURE_SH_IS_MSH is not set
+# CONFIG_FEATURE_SH_IS_NONE is not set
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+CONFIG_ASH_JOB_CONTROL=y
+CONFIG_ASH_ALIAS=y
+CONFIG_ASH_MATH_SUPPORT=y
+# CONFIG_ASH_MATH_SUPPORT_64 is not set
+CONFIG_ASH_GETOPTS=y
+# CONFIG_ASH_CMDCMD is not set
+# CONFIG_ASH_MAIL is not set
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+# CONFIG_HUSH is not set
+# CONFIG_LASH is not set
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+CONFIG_FEATURE_SH_EXTRA_QUIET=y
+# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set
+CONFIG_FEATURE_COMMAND_EDITING=y
+CONFIG_FEATURE_COMMAND_HISTORY=63
+CONFIG_FEATURE_COMMAND_SAVEHISTORY=y
+CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y
+# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set
+CONFIG_FEATURE_SH_FANCY_PROMPT=y
+
+#
+# System Logging Utilities
+#
+CONFIG_SYSLOGD=y
+# CONFIG_FEATURE_ROTATE_LOGFILE is not set
+CONFIG_FEATURE_REMOTE_LOG=y
+CONFIG_FEATURE_IPC_SYSLOG=y
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
+CONFIG_LOGREAD=y
+# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
+CONFIG_KLOGD=y
+CONFIG_LOGGER=y
+
+#
+# Linux System Utilities
+#
+CONFIG_DMESG=y
+CONFIG_FBSET=y
+CONFIG_FEATURE_FBSET_FANCY=y
+# CONFIG_FEATURE_FBSET_READMODE is not set
+# CONFIG_FDFLUSH is not set
+# CONFIG_FDFORMAT is not set
+CONFIG_FDISK=y
+FDISK_SUPPORT_LARGE_DISKS=y
+CONFIG_FEATURE_FDISK_WRITABLE=y
+# CONFIG_FEATURE_AIX_LABEL is not set
+# CONFIG_FEATURE_SGI_LABEL is not set
+# CONFIG_FEATURE_SUN_LABEL is not set
+# CONFIG_FEATURE_OSF_LABEL is not set
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+# CONFIG_FREERAMDISK is not set
+CONFIG_FSCK_MINIX=y
+CONFIG_MKFS_MINIX=y
+
+#
+# Minix filesystem support
+#
+CONFIG_FEATURE_MINIX2=y
+# CONFIG_GETOPT is not set
+CONFIG_HEXDUMP=y
+CONFIG_HWCLOCK=y
+CONFIG_FEATURE_HWCLOCK_LONGOPTIONS=y
+# CONFIG_LOSETUP is not set
+CONFIG_MKSWAP=y
+CONFIG_MORE=y
+CONFIG_FEATURE_USE_TERMIOS=y
+CONFIG_PIVOT_ROOT=y
+# CONFIG_RDATE is not set
+CONFIG_SWAPONOFF=y
+CONFIG_MOUNT=y
+CONFIG_NFSMOUNT=y
+CONFIG_UMOUNT=y
+CONFIG_FEATURE_MOUNT_FORCE=y
+
+#
+# Common options for mount/umount
+#
+# CONFIG_FEATURE_MOUNT_LOOP is not set
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
diff --git a/busybox/busybox-1.00-rc2/dhcp-retrytime.patch b/busybox/busybox-1.00-rc2/dhcp-retrytime.patch
new file mode 100644
index 0000000000..c4354e6733
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/dhcp-retrytime.patch
@@ -0,0 +1,46 @@
+--- busybox-1.00-pre2/networking/udhcp/dhcpc.c~dhcp-timeout
++++ busybox-1.00-pre2/networking/udhcp/dhcpc.c
+@@ -46,6 +46,7 @@
+ static unsigned long requested_ip; /* = 0 */
+ static unsigned long server_addr;
+ static unsigned long timeout;
++static unsigned long retry_time;
+ static int packet_num; /* = 0 */
+ static int fd = -1;
+
+@@ -175,6 +176,7 @@
+ {"quit", no_argument, 0, 'q'},
+ {"request", required_argument, 0, 'r'},
+ {"script", required_argument, 0, 's'},
++ {"retrytime", required_argument, 0, 't'},
+ {"version", no_argument, 0, 'v'},
+ {0, 0, 0, 0}
+ };
+@@ -182,7 +184,7 @@
+ /* get options */
+ while (1) {
+ int option_index = 0;
+- c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:s:v", arg_options, &option_index);
++ c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:s:t:v", arg_options, &option_index);
+ if (c == -1) break;
+
+ switch (c) {
+@@ -228,6 +230,9 @@
+ case 's':
+ client_config.script = optarg;
+ break;
++ case 't':
++ retry_time = atol(optarg);
++ break;
+ case 'v':
+ bb_error_msg("version %s\n", VERSION);
+ return(0);
+@@ -306,7 +311,7 @@
+ }
+ /* wait to try again */
+ packet_num = 0;
+- timeout = now + 60;
++ timeout = now + retry_time;
+ }
+ break;
+ case RENEW_REQUESTED:
diff --git a/busybox/busybox-1.00-rc2/hwclock.sh b/busybox/busybox-1.00-rc2/hwclock.sh
new file mode 100644
index 0000000000..5acfb9fb24
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/hwclock.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+# hwclock.sh Set system clock to hardware clock, according to the UTC
+# setting in /etc/default/rcS (see also rcS(5)).
+#
+# WARNING: If your hardware clock is not in UTC/GMT, this script
+# must know the local time zone. This information is
+# stored in /etc/localtime. This might be a problem if
+# your /etc/localtime is a symlink to something in
+# /usr/share/zoneinfo AND /usr isn't in the root
+# partition! The workaround is to define TZ either
+# in /etc/default/rcS, or in the proper place below.
+
+[ ! -x /sbin/hwclock ] && exit 0
+
+. /etc/default/rcS
+
+case "$1" in
+ start)
+ if [ "$VERBOSE" != no ]
+ then
+ echo "System time was `date`."
+ echo "Setting the System Clock using the Hardware Clock as reference..."
+ fi
+
+ if [ "$HWCLOCKACCESS" != no ]
+ then
+ if [ -z "$TZ" ]
+ then
+ hwclock --hctosys
+ else
+ TZ="$TZ" hwclock --hctosys
+ fi
+ fi
+
+ if [ "$VERBOSE" != no ]
+ then
+ echo "System Clock set. System local time is now `date`."
+ fi
+ ;;
+ stop|restart|reload|force-reload)
+ #
+ # Updates the Hardware Clock with the System Clock time.
+ # This will *override* any changes made to the Hardware Clock.
+ #
+ # WARNING: If you disable this, any changes to the system
+ # clock will not be carried across reboots.
+ #
+ if [ "$VERBOSE" != no ]
+ then
+ echo "Saving the System Clock time to the Hardware Clock..."
+ fi
+ if [ "$HWCLOCKACCESS" != no ]
+ then
+ hwclock --systohc
+ fi
+ if [ "$VERBOSE" != no ]
+ then
+ echo "Hardware Clock updated to `date`."
+ fi
+ exit 0
+ ;;
+ show)
+ if [ "$HWCLOCKACCESS" != no ]
+ then
+ hwclock --show
+ fi
+ ;;
+ *)
+ echo "Usage: hwclock.sh {start|stop|show|reload|restart}" >&2
+ echo " start sets kernel (system) clock from hardware (RTC) clock" >&2
+ echo " stop and reload set hardware (RTC) clock from kernel (system) clock" >&2
+ exit 1
+ ;;
+esac
diff --git a/busybox/busybox-1.00-rc2/postinst b/busybox/busybox-1.00-rc2/postinst
new file mode 100644
index 0000000000..36d8190f80
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/postinst
@@ -0,0 +1,25 @@
+#!/bin/busybox ash
+
+action="$1"
+oldversion="$2"
+
+umask 022
+
+if /bin/busybox [ "$action" != configure ]
+then
+ exit 0
+fi
+
+. /etc/default/functions
+
+setup_init_hwclock() {
+ updatercd hwclock.sh start 50 S . stop 25 0 1 6 .
+ /etc/init.d/hwclock.sh restart
+}
+
+/bin/busybox ash /usr/bin/update-alternatives --install /bin/vi vi /bin/busybox 100
+/bin/busybox ash /usr/bin/update-alternatives --install /bin/sh sh /bin/busybox 100
+
+setup_init_hwclock
+
+exit 0
diff --git a/busybox/busybox-1.00-rc2/prerm b/busybox/busybox-1.00-rc2/prerm
new file mode 100644
index 0000000000..7ade4b1dec
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/prerm
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if [ "$1" != "upgrade" ]; then
+ update-alternatives --remove sh /bin/busybox
+ update-alternatives --remove vi /bin/busybox
+ find /etc -name [SK][0-9][0-9]hwclock.sh | xargs rm -f
+ find /etc -name [SK][0-9][0-9]syslog | xargs rm -f
+fi
+
+exit 0
diff --git a/busybox/busybox-1.00-rc1/cvs20040731.patch b/busybox/busybox-1.00-rc2/rc2-cvs20040807.patch
index e69de29bb2..e69de29bb2 100644
--- a/busybox/busybox-1.00-rc1/cvs20040731.patch
+++ b/busybox/busybox-1.00-rc2/rc2-cvs20040807.patch
diff --git a/busybox/busybox-1.00-rc2/silence-hwclock.patch b/busybox/busybox-1.00-rc2/silence-hwclock.patch
new file mode 100644
index 0000000000..3388e8b611
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/silence-hwclock.patch
@@ -0,0 +1,15 @@
+--- busybox-1.00-pre2/util-linux/hwclock.c~silence-hwclock
++++ busybox-1.00-pre2/util-linux/hwclock.c
+@@ -114,12 +114,8 @@
+ bb_perror_msg_and_die ( "Could not access RTC" );
+ }
+
+- printf ( "1\n" );
+-
+ tm = *( utc ? gmtime ( &t ) : localtime ( &t ));
+ tm. tm_isdst = 0;
+-
+- printf ( "2\n") ;
+
+ if ( ioctl ( rtc, RTC_SET_TIME, &tm ) < 0 )
+ bb_perror_msg_and_die ( "Could not set the RTC time" );
diff --git a/busybox/busybox-1.00-rc2/syslog b/busybox/busybox-1.00-rc2/syslog
new file mode 100644
index 0000000000..5c46a28a9a
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/syslog
@@ -0,0 +1,34 @@
+#! /bin/sh
+#
+# syslog init.d script for busybox syslogd/klogd
+# Written by Robert Griebl <sandman@handhelds.org>
+#
+
+# log to remote host
+# SYSLOG_ARGS="-R remote.host"
+
+# log to 16K shm circular buffer
+SYSLOG_ARGS="-C"
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting syslogd/klogd: "
+ start-stop-daemon -S -b -n syslogd -a /sbin/syslogd -- -n $SYSLOG_ARGS
+ start-stop-daemon -S -b -n klogd -a /sbin/klogd -- -n
+ echo "done"
+ ;;
+ stop)
+ echo -n "Stopping syslogd/klogd: "
+ start-stop-daemon -K -n syslogd
+ start-stop-daemon -K -n klogd
+ echo "done"
+ ;;
+ *)
+ echo "Usage: syslog {start|stop}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/busybox/busybox-1.00-rc2/tar.patch b/busybox/busybox-1.00-rc2/tar.patch
new file mode 100644
index 0000000000..e080275184
--- /dev/null
+++ b/busybox/busybox-1.00-rc2/tar.patch
@@ -0,0 +1,22 @@
+--- busybox/archival/libunarchive/data_extract_all.c 2002-11-29 01:43:46.000000000 -0500
++++ busybox-new/archival/libunarchive/data_extract_all.c 2002-12-03 18:38:21.000000000 -0500
+@@ -69,6 +68,9 @@
+ case S_IFLNK:
+ /* Symlink */
+ res = symlink(file_header->link_name, file_header->name);
++ if ((res == -1) && (errno == EEXIST) && (unlink(file_header->name) == 0)) {
++ res = symlink(file_header->link_name, file_header->name);
++ }
+ if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
+ perror_msg("Cannot create symlink from %s to '%s'", file_header->name, file_header->link_name);
+ }
+@@ -78,6 +80,9 @@
+ case S_IFCHR:
+ case S_IFIFO:
+ res = mknod(file_header->name, file_header->mode, file_header->device);
++ if ((res == -1) && (errno == EEXIST) && (unlink(file_header->name) == 0)) {
++ res = mknod(file_header->name, file_header->mode, file_header->device);
++ }
+ if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
+ perror_msg("Cannot create node %s", file_header->name);
+ }
diff --git a/busybox/busybox_1.00-rc2.oe b/busybox/busybox_1.00-rc2.oe
new file mode 100644
index 0000000000..7c0c0725a6
--- /dev/null
+++ b/busybox/busybox_1.00-rc2.oe
@@ -0,0 +1,49 @@
+DESCRIPTION = "BusyBox version ${PV}. \
+BusyBox combines tiny versions of many common UNIX utilities into a single \
+small executable. It provides minimalist replacements for most of the \
+utilities you usually find in GNU fileutils, shellutils, etc. The utilities \
+in BusyBox generally have fewer options than their full-featured GNU \
+cousins; however, the options that are included provide the expected \
+functionality and behave very much like their GNU counterparts. BusyBox \
+provides a fairly complete POSIX environment for any small or embedded \
+system."
+LICENSE = "GPL"
+PR = "r3"
+
+# file://busybox-1.00-pre10-fuser.patch;patch=1
+SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
+ file://add-getkey-applet.patch;patch=1 \
+ file://bb-iproute-iftunnel.patch;patch=1 \
+ file://rc2-cvs20040807.patch;patch=1 \
+ file://busybox-1.00-rc2-cvs-modprobe-for-all.patch;patch=1 \
+ file://defconfig \
+ file://syslog \
+ file://hwclock.sh"
+S = "${WORKDIR}/busybox-${PV}"
+export EXTRA_CFLAGS = "${CFLAGS}"
+EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}"
+FILES_${PN} += " ${datadir}/udhcpc"
+
+inherit cml1 update-rc.d
+
+INITSCRIPT_NAME = "syslog"
+INITSCRIPT_PARAMS = "defaults"
+
+do_configure () {
+ install -m 0644 ${WORKDIR}/defconfig ${S}/.config
+ cml1_do_configure
+}
+
+do_compile () {
+ unset CFLAGS
+ base_do_compile
+}
+
+do_install () {
+ install -d ${D}/etc/init.d
+ oe_runmake 'PREFIX=${D}' install
+ install -m 0755 ${WORKDIR}/syslog ${D}/etc/init.d/syslog
+ install -m 0755 ${WORKDIR}/hwclock.sh ${D}/etc/init.d/hwclock.sh
+ install -d ${D}${datadir}/udhcpc
+ install -m 0755 ${S}/examples/udhcp/simple.script ${D}${datadir}/udhcpc/default.script
+}