From f77b88d124ea1c900f9cf5e04046939aad48bbe1 Mon Sep 17 00:00:00 2001 From: mbm Date: Sun, 6 Mar 2005 03:34:52 +0000 Subject: nbd's makefile/menuconfig rewrite git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@307 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/busybox/config/networking/Config.in | 634 ++++++++++++++++++++++++++++ 1 file changed, 634 insertions(+) create mode 100644 package/busybox/config/networking/Config.in (limited to 'package/busybox/config/networking/Config.in') diff --git a/package/busybox/config/networking/Config.in b/package/busybox/config/networking/Config.in new file mode 100644 index 0000000000..5af65ef4aa --- /dev/null +++ b/package/busybox/config/networking/Config.in @@ -0,0 +1,634 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Networking Utilities" + +config BUSYBOX_CONFIG_FEATURE_IPV6 + bool "Enable IPv6 support" + default y + help + Enable IPv6 support to busybox. This makes applets that talk IP + able to work with IPv6. + +config BUSYBOX_CONFIG_ARPING + bool "arping" + default y + help + Ping hosts by ARP packets + +config BUSYBOX_CONFIG_FTPGET + bool "ftpget" + default n + help + Retrieve a remote file via FTP. + +config BUSYBOX_CONFIG_FTPPUT + bool "ftpput" + default n + help + Store a remote file via FTP. + +config BUSYBOX_CONFIG_HOSTNAME + bool "hostname" + default n + help + Show or set the system's host name + +config BUSYBOX_CONFIG_HTTPD + bool "httpd" + default y + help + Serve web pages via an HTTP server. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY + bool " Support using httpd only from inetd" + default n + depends on BUSYBOX_CONFIG_HTTPD + help + This option disables uid and port options for the httpd applet + but requires inetd server daemon. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH + bool " Enable Basic http Authentication" + default y + depends on BUSYBOX_CONFIG_HTTPD + help + Utilizes password settings from /etc/httpd.conf for basic + authentication on a per url basis. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5 + bool " Support MD5 crypted passwords for http Authentication" + default y + depends on BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH + help + Enables basic per url authentication from /etc/httpd.conf + using md5 passwords. + + +if !CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY +config BUSYBOX_CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP + bool " Support reloading the global config file using hup signal" + default y + depends on BUSYBOX_CONFIG_HTTPD + help + This option enables processing of SIGHUP to reload cached + configuration settings. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_SETUID + bool " Enable support -u option" + default n + depends on BUSYBOX_CONFIG_HTTPD + help + This option allows the server to run as a specific user + rather than defaulting to the user that starts the server. + Use of this option requires special privileges to change to a + different user. +endif + +config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES + bool " Support loading additional MIME types at run-time" + default y + depends on BUSYBOX_CONFIG_HTTPD + help + This option enables support for additional MIME types at + run-time to be specified in the configuration file. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_CGI + bool " Support Common Gateway Interface (CGI)" + default y + depends on BUSYBOX_CONFIG_HTTPD + help + This option allows scripts and executables to be invoked + when specific urls are requested. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV + bool " Support the REMOTE_PORT environment variable for CGI" + default y + depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI + help + Use of this option can assist scripts in generating + references that contain a unique port number. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR + bool " Enable the -e option for shell script CGI simplification." + default y + depends on BUSYBOX_CONFIG_HTTPD + help + After set, this option allows html encoding arbitrary + strings for display of the browser. Output goes to stdout. + For example, httpd -e "" as + "<Hello World>". + +config BUSYBOX_CONFIG_IFCONFIG + bool "ifconfig" + default y + help + Ifconfig is used to configure the kernel-resident network interfaces. + +config BUSYBOX_CONFIG_FEATURE_IFCONFIG_STATUS + bool " Enable status reporting output (+7k)" + default y + depends on BUSYBOX_CONFIG_IFCONFIG + help + If ifconfig is called with no arguments it will display the status + of the currently active interfaces. + +config BUSYBOX_CONFIG_FEATURE_IFCONFIG_SLIP + bool " Enable slip-specific options \"keepalive\" and \"outfill\"" + default n + depends on BUSYBOX_CONFIG_IFCONFIG + help + Allow "keepalive" and "outfill" support for SLIP. If you're not + planning on using serial lines, leave this unchecked. + +config BUSYBOX_CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ + bool " Enable options \"mem_start\", \"io_addr\", and \"irq\"" + default n + depends on BUSYBOX_CONFIG_IFCONFIG + help + Allow the start address for shared memory, start address for I/O, + and/or the interrupt line used by the specified device. + +config BUSYBOX_CONFIG_FEATURE_IFCONFIG_HW + bool " Enable option \"hw\" (ether only)" + default y + depends on BUSYBOX_CONFIG_IFCONFIG + help + Set the hardware address of this interface, if the device driver + supports this operation. Currently, we only support the 'ether' + class. + +config BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS + bool " Set the broadcast automatically" + default y + depends on BUSYBOX_CONFIG_IFCONFIG + help + Setting this will make ifconfig attempt to find the broadcast + automatically if the value '+' is used. + +config BUSYBOX_CONFIG_IFUPDOWN + bool "ifupdown" + default n + help + Activate or deactivate the specified interfaces. This applet makes + use of either "ifconfig" and "route" or the "ip" command to actually + configure network interfaces. Therefore, you will probably also want + to enable either BUSYBOX_CONFIG_IFCONFIG and BUSYBOX_CONFIG_ROUTE, or enable + BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP and the various BUSYBOX_CONFIG_IP options. Of + course you could use non-busybox versions of these programs, so + against my better judgement (since this will surely result in plenty + of support questions on the mailing list), I do not force you to + enable these additional options. It is up to you to supply either + "ifconfig" and "route" or the "ip" command, either via busybox or via + standalone utilities. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP + bool " Use ip applet" + default n + depends on BUSYBOX_CONFIG_IFUPDOWN + help + Use the iproute "ip" command to implement "ifup" and "ifdown", rather + than the default of using the older 'ifconfig' and 'route' utilities. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN + bool " Use busybox ip applet" + default n + depends on BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP + select BUSYBOX_CONFIG_IP + select BUSYBOX_CONFIG_FEATURE_IP_ADDRESS + select BUSYBOX_CONFIG_FEATURE_IP_LINK + select BUSYBOX_CONFIG_FEATURE_IP_ROUTE + help + Use the busybox iproute "ip" applet to implement "ifupdown". + + If leave this disabled, you must install the full-blown iproute2 + utility or the "ifup" and "ifdown" applets will not work. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN + bool " Use busybox ifconfig and route applets" + default n + depends on BUSYBOX_CONFIG_IFUPDOWN && !CONFIG_FEATURE_IFUPDOWN_IP + select BUSYBOX_CONFIG_IFCONFIG + select BUSYBOX_CONFIG_ROUTE + help + Use the busybox iproute "ifconfig" and "route" applets to + implement the "ifup" and "ifdown" utilities. + + If leave this disabled, you must install the full-blown ifconfig + and route utilities, or the "ifup" and "ifdown" applets will not + work. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV4 + bool " Enable support for IPv4" + default n + depends on BUSYBOX_CONFIG_IFUPDOWN + help + If you want busybox to talk IPv4, leave this on. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6 + bool " Enable support for IPv6" + default n + depends on BUSYBOX_CONFIG_IFUPDOWN + help + If you need support for IPv6, turn this option on. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPX + bool " Enable support for IPX" + default n + depends on BUSYBOX_CONFIG_IFUPDOWN + help + If this option is selected you can use busybox to work with IPX + networks. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING + bool " Enable mapping support" + default n + depends on BUSYBOX_CONFIG_IFUPDOWN + help + This enables support for the "mapping" stanza, unless you have + a weird network setup you don't need it. + +config BUSYBOX_CONFIG_INETD + bool "inetd" + default n + help + Internet superserver daemon + +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO + bool " Support echo service" + default n + depends on BUSYBOX_CONFIG_INETD + help + Echo received data internal inetd service + +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD + bool " Support discard service" + default n + depends on BUSYBOX_CONFIG_INETD + help + Internet /dev/null internal inetd service + +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME + bool " Support time service" + default n + depends on BUSYBOX_CONFIG_INETD + help + Return 32 bit time since 1900 internal inetd service + +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME + bool " Support daytime service" + default n + depends on BUSYBOX_CONFIG_INETD + help + Return human-readable time internal inetd service + +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN + bool " Support chargen service" + default n + depends on BUSYBOX_CONFIG_INETD + help + Familiar character generator internal inetd service + + +config BUSYBOX_CONFIG_IP + bool "ip" + default n + help + The "ip" applet is a TCP/IP interface configuration and routing + utility. You generally don't need "ip" to use busybox with + TCP/IP. + +if BUSYBOX_CONFIG_IP && BUSYBOX_CONFIG_IPADDR + config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS + default n + comment " address (forced enabled for ipaddr)" +endif +if ! (CONFIG_IP && BUSYBOX_CONFIG_IPADDR) + config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS + bool " address" + default n + depends on BUSYBOX_CONFIG_IP + help + Address manipulation support for the "ip" applet. +endif + +if BUSYBOX_CONFIG_IP && BUSYBOX_CONFIG_IPLINK + config BUSYBOX_CONFIG_FEATURE_IP_LINK + default n + comment " link (forced enabled for iplink)" +endif +if !(CONFIG_IP && BUSYBOX_CONFIG_IPLINK) + config BUSYBOX_CONFIG_FEATURE_IP_LINK + bool " link" + default n + depends on BUSYBOX_CONFIG_IP + help + Configure network devices with "ip". +endif + +if BUSYBOX_CONFIG_IP && BUSYBOX_CONFIG_IPROUTE + config BUSYBOX_CONFIG_FEATURE_IP_ROUTE + default n + comment " route (forced enabled for iproute)" +endif +if !(CONFIG_IP && BUSYBOX_CONFIG_IPROUTE) + config BUSYBOX_CONFIG_FEATURE_IP_ROUTE + bool " route" + default n + depends on BUSYBOX_CONFIG_IP + help + Add support for routing table management to "ip". +endif + +if BUSYBOX_CONFIG_IP && BUSYBOX_CONFIG_IPTUNNEL + config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL + default n + comment " tunnel (forced enabled for iptunnel)" +endif +if !(CONFIG_IP && BUSYBOX_CONFIG_IPTUNNEL) + config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL + bool " tunnel" + default n + depends on BUSYBOX_CONFIG_IP + help + Add support for tunneling commands to "ip". +endif + +config BUSYBOX_CONFIG_IPCALC + bool "ipcalc" + default y + help + ipcalc takes an IP address and netmask and calculates the + resulting broadcast, network, and host range. + +config BUSYBOX_CONFIG_FEATURE_IPCALC_FANCY + bool " Fancy IPCALC, more options, adds 1 kbyte" + default y + depends on BUSYBOX_CONFIG_IPCALC + help + Adds the options hostname, prefix and silent to the output of "ipcalc". + +config BUSYBOX_CONFIG_IPADDR + bool "ipaddr" + default n + help + Equivalent to selecting address support to "ip", above. + +config BUSYBOX_CONFIG_IPLINK + bool "iplink" + default n + help + Equivalent to selecting link support to "ip", above. + +config BUSYBOX_CONFIG_IPROUTE + bool "iproute" + default n + help + Equivalent to selecting route support to "ip", above. + +config BUSYBOX_CONFIG_IPTUNNEL + bool "iptunnel" + default n + help + Equivalent to selecting tunnel support to "ip", above. + +config BUSYBOX_CONFIG_NAMEIF + bool "nameif" + default n + help + nameif is used to rename network interface by its MAC address. + Renamed interfaces MUST be in the down state. + It is possible to use a file (default: /etc/mactab) + with list of new interface names and MACs. + Maximum interface name length: IF_NAMESIZE = 16 + File fields are separated by space or tab. + File format: + # Comment + new_interface_name XX:XX:XX:XX:XX:XX + +config BUSYBOX_CONFIG_NC + bool "nc" + default y + help + A simple Unix utility which reads and writes data across network + connections. + +config BUSYBOX_CONFIG_NETSTAT + bool "netstat" + default y + help + netstat prints information about the Linux networking subsystem. + +config BUSYBOX_CONFIG_NSLOOKUP + bool "nslookup" + default y + help + nslookup is a tool to query Internet name servers. + +config BUSYBOX_CONFIG_PING + bool "ping" + default y + help + ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to + elicit an ICMP ECHO_RESPONSE from a host or gateway. + +config BUSYBOX_CONFIG_FEATURE_FANCY_PING + bool " Enable fancy ping output" + default y + depends on BUSYBOX_CONFIG_PING + help + Make the output from the ping applet include statistics, and at the + same time provide full support for ICMP packets. + +config BUSYBOX_CONFIG_PING6 + bool "ping6" + default y + depends on BUSYBOX_CONFIG_FEATURE_IPV6 + help + This will give you a ping that can talk IPv6. + +config BUSYBOX_CONFIG_FEATURE_FANCY_PING6 + bool " Enable fancy ping6 output" + default y + depends on BUSYBOX_CONFIG_PING6 + help + Make the output from the ping6 applet include statistics, and at the + same time provide full support for ICMP packets. + +config BUSYBOX_CONFIG_ROUTE + bool "route" + default y + help + Route displays or manipulates the kernel's IP routing tables. + +config BUSYBOX_CONFIG_TELNET + bool "telnet" + default n + help + Telnet is an interface to the TELNET protocol, but is also commonly + used to test other simple protocols. + +config BUSYBOX_CONFIG_FEATURE_TELNET_TTYPE + bool " Pass TERM type to remote host" + default n + depends on BUSYBOX_CONFIG_TELNET + help + Setting this option will forward the TERM environment variable to the + remote host you are connecting to. This is useful to make sure that + things like ANSI colors and other control sequences behave. + +config BUSYBOX_CONFIG_FEATURE_TELNET_AUTOLOGIN + bool " Pass USER type to remote host" + default n + depends on BUSYBOX_CONFIG_TELNET + help + Setting this option will forward the USER environment variable to the + remote host you are connecting to. This is useful when you need to + log into a machine without telling the username (autologin). This + option enables `-a' and `-l USER' arguments. + +config BUSYBOX_CONFIG_TELNETD + bool "telnetd" + default y + #select BUSYBOX_CONFIG_LOGIN + help + A daemon for the TELNET protocol, allowing you to log onto the host + running the daemon. Please keep in mind that the TELNET protocol + sends passwords in plain text. If you can't afford the space for an + SSH daemon and you trust your network, you may say 'y' here. As a + more secure alternative, you should seriously consider installing the + very small Dropbear SSH daemon instead: + http://matt.ucc.asn.au/dropbear/dropbear.html + + Note that for busybox telnetd to work you need several things: + First of all, your kernel needs: + BUSYBOX_CONFIG_UNIX98_PTYS=y + BUSYBOX_CONFIG_DEVPTS_FS=y + + Next, you need a /dev/pts directory on your root filesystem: + + $ ls -ld /dev/pts + drwxr-xr-x 2 root root 0 Sep 23 13:21 /dev/pts/ + + Next you need the pseudo terminal master multiplexer /dev/ptmx: + + $ ls -la /dev/ptmx + crw-rw-rw- 1 root tty 5, 2 Sep 23 13:55 /dev/ptmx + + Any /dev/ttyp[0-9]* files you may have can be removed. + Next, you need to mount the devpts filesystem on /dev/pts using: + + mount -t devpts devpts /dev/pts + + You need to be sure that Busybox has BUSYBOX_CONFIG_LOGIN and + BUSYBOX_CONFIG_FEATURE_SUID enabled. And finally, you should make + certain that Busybox has been installed setuid root: + + chown root.root /bin/busybox + chmod 4755 /bin/busybox + + with all that done, telnetd _should_ work.... + + +config BUSYBOX_CONFIG_FEATURE_TELNETD_INETD + bool " Support call from inetd only" + default n + depends on BUSYBOX_CONFIG_TELNETD + help + Selecting this will make telnetd only callable from inetd, + removing the standalone support. + +config BUSYBOX_CONFIG_TFTP + bool "tftp" + default n + help + This enables the Trivial File Transfer Protocol client program. TFTP + is usually used for simple, small transfers such as a root image + for a network-enabled bootloader. + +config BUSYBOX_CONFIG_FEATURE_TFTP_GET + bool " Enable \"get\" command" + default n + depends on BUSYBOX_CONFIG_TFTP + help + Add support for the GET command within the TFTP client. This allows + a client to retrieve a file from a TFTP server. + +config BUSYBOX_CONFIG_FEATURE_TFTP_PUT + bool " Enable \"put\" command" + default n + depends on BUSYBOX_CONFIG_TFTP + help + Add support for the PUT command within the TFTP client. This allows + a client to transfer a file to a TFTP server. + +config BUSYBOX_CONFIG_FEATURE_TFTP_BLOCKSIZE + bool " Enable \"blocksize\" command" + default n + depends on BUSYBOX_CONFIG_TFTP + help + Allow the client to specify the desired block size for transfers. + +config BUSYBOX_CONFIG_FEATURE_TFTP_DEBUG + bool " Enable debug" + default n + depends on BUSYBOX_CONFIG_TFTP + help + Enable debug settings for tftp. This is useful if you're running + into problems with tftp as the protocol doesn't help you much when + you run into problems. + +config BUSYBOX_CONFIG_TRACEROUTE + bool "traceroute" + default y + help + Utility to trace the route of IP packets + +config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE + bool " Enable verbose output" + default y + depends on BUSYBOX_CONFIG_TRACEROUTE + help + Add some verbosity to traceroute. This includes amongst other things + hostnames and ICMP response types. + +config BUSYBOX_CONFIG_VCONFIG + bool "vconfig" + default y + help + Creates, removes, and configures VLAN interfaces + +config BUSYBOX_CONFIG_WGET + bool "wget" + default y + help + wget is a utility for non-interactive download of files from HTTP, + HTTPS, and FTP servers. + +config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR + bool " Enable a nifty process meter (+2k)" + default y + depends on BUSYBOX_CONFIG_WGET + help + Enable the transfer progress bar for wget transfers. + +config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION + bool " Enable HTTP authentication" + default y + depends on BUSYBOX_CONFIG_WGET + help + Support authenticated HTTP transfers. + +config BUSYBOX_CONFIG_FEATURE_WGET_IP6_LITERAL + bool " Enable IPv6 literal addresses" + default y + depends on BUSYBOX_CONFIG_WGET + help + Support IPv6 address literal notation in URLs. + +source package/busybox/config/networking/udhcp/Config.in + +endmenu + -- cgit v1.2.3 From 9e6c87a6dbf73d870d6a44a31ea11183a90427c4 Mon Sep 17 00:00:00 2001 From: nbd Date: Mon, 30 May 2005 21:29:40 +0000 Subject: enable telnet client by default git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1121 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/busybox/config/networking/Config.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'package/busybox/config/networking/Config.in') diff --git a/package/busybox/config/networking/Config.in b/package/busybox/config/networking/Config.in index 5af65ef4aa..3699db9fc2 100644 --- a/package/busybox/config/networking/Config.in +++ b/package/busybox/config/networking/Config.in @@ -465,14 +465,14 @@ config BUSYBOX_CONFIG_ROUTE config BUSYBOX_CONFIG_TELNET bool "telnet" - default n + default y help Telnet is an interface to the TELNET protocol, but is also commonly used to test other simple protocols. config BUSYBOX_CONFIG_FEATURE_TELNET_TTYPE bool " Pass TERM type to remote host" - default n + default y depends on BUSYBOX_CONFIG_TELNET help Setting this option will forward the TERM environment variable to the -- cgit v1.2.3 From 1eaf166d838a51242e1ef93cd806896dc37f30f2 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 11 Jan 2006 00:41:50 +0000 Subject: add small 'netmsg' utility to send udp broadcast messages git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2893 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/busybox/config/networking/Config.in | 6 ++ package/busybox/patches/300-netmsg.patch | 102 ++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 package/busybox/patches/300-netmsg.patch (limited to 'package/busybox/config/networking/Config.in') diff --git a/package/busybox/config/networking/Config.in b/package/busybox/config/networking/Config.in index 3699db9fc2..996afb4473 100644 --- a/package/busybox/config/networking/Config.in +++ b/package/busybox/config/networking/Config.in @@ -414,6 +414,12 @@ config BUSYBOX_CONFIG_NC help A simple Unix utility which reads and writes data across network connections. + +config BUSYBOX_CONFIG_NETMSG + bool "netmsg" + default y + help + simple program for sending udp broadcast messages config BUSYBOX_CONFIG_NETSTAT bool "netstat" diff --git a/package/busybox/patches/300-netmsg.patch b/package/busybox/patches/300-netmsg.patch new file mode 100644 index 0000000000..ac1a0aaaa8 --- /dev/null +++ b/package/busybox/patches/300-netmsg.patch @@ -0,0 +1,102 @@ +diff -urN busybox.old/include/applets.h busybox.dev/include/applets.h +--- busybox.old/include/applets.h 2006-01-11 01:32:47.302791000 +0100 ++++ busybox.dev/include/applets.h 2006-01-11 01:33:18.744756250 +0100 +@@ -475,6 +475,9 @@ + #ifdef CONFIG_NC + APPLET(nc, nc_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) + #endif ++#ifdef CONFIG_NETMSG ++ APPLET_NOUSAGE("netmsg", netmsg_main, _BB_DIR_BIN, _BB_SUID_ALWAYS) ++#endif + #ifdef CONFIG_NETSTAT + APPLET(netstat, netstat_main, _BB_DIR_BIN, _BB_SUID_NEVER) + #endif +diff -urN busybox.old/networking/Config.in busybox.dev/networking/Config.in +--- busybox.old/networking/Config.in 2005-11-01 00:55:15.000000000 +0100 ++++ busybox.dev/networking/Config.in 2006-01-11 01:33:18.744756250 +0100 +@@ -435,6 +435,12 @@ + help + A simple Unix utility which reads and writes data across network + connections. ++ ++config CONFIG_NETMSG ++ bool "netmsg" ++ default n ++ help ++ simple program for sending udp broadcast messages + + config CONFIG_NC_GAPING_SECURITY_HOLE + bool "gaping security hole" +diff -urN busybox.old/networking/Makefile.in busybox.dev/networking/Makefile.in +--- busybox.old/networking/Makefile.in 2005-11-01 00:55:15.000000000 +0100 ++++ busybox.dev/networking/Makefile.in 2006-01-11 01:34:02.939518250 +0100 +@@ -28,6 +28,7 @@ + NETWORKING-$(CONFIG_IPTUNNEL) += iptunnel.o + NETWORKING-$(CONFIG_NAMEIF) += nameif.o + NETWORKING-$(CONFIG_NC) += nc.o ++NETWORKING-$(CONFIG_NETMSG) += netmsg.o + NETWORKING-$(CONFIG_NETSTAT) += netstat.o + NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o + NETWORKING-$(CONFIG_PING) += ping.o +diff -urN busybox.old/networking/netmsg.c busybox.dev/networking/netmsg.c +--- busybox.old/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox.dev/networking/netmsg.c 2006-01-11 01:33:18.748756500 +0100 +@@ -0,0 +1,58 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "busybox.h" ++ ++ ++#ifndef CONFIG_NETMSG ++int main(int argc, char **argv) ++#else ++int netmsg_main(int argc, char **argv) ++#endif ++{ ++ int s, i; ++ struct sockaddr_in addr; ++ int optval = 1; ++ unsigned char buf[1001]; ++ ++ if (argc != 2) { ++ fprintf(stderr, "usage: %s \"message\"\n", argv[0]); ++ exit(1); ++ } ++ ++ if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { ++ perror("Opening socket"); ++ exit(1); ++ } ++ ++ memset(&addr, 0, sizeof(addr)); ++ addr.sin_family = AF_INET; ++ addr.sin_addr.s_addr = htonl(0xffffffff); ++ addr.sin_port = htons(0x1337); ++ ++ memset(buf, 0, 1001); ++ buf[0] = 0xde; ++ buf[1] = 0xad; ++ ++ strncpy(buf + 2, argv[1], 998); ++ ++ if (setsockopt (s, SOL_SOCKET, SO_BROADCAST, (caddr_t) &optval, sizeof (optval)) < 0) { ++ perror("setsockopt()"); ++ goto fail; ++ } ++ ++ if (sendto(s, buf, 1001, 0, (struct sockaddr *) &addr, sizeof(addr)) < 0) { ++ perror("sendto()"); ++ goto fail; ++ } ++ ++ return 0; ++ ++fail: ++ close(s); ++ exit(1); ++} -- cgit v1.2.3 From 71d39e274f5c2847a1b2eedd4afa8e298029f93d Mon Sep 17 00:00:00 2001 From: nbd Date: Tue, 4 Apr 2006 19:24:40 +0000 Subject: update busybox menuconfig to 1.1.1, should fix the "missing reboot" bug git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3587 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/busybox/config/Config.in | 181 +++++++++++++++++----- package/busybox/config/archival/Config.in | 56 ++++++- package/busybox/config/console-tools/Config.in | 7 + package/busybox/config/coreutils/Config.in | 202 ++++++++++++++++--------- package/busybox/config/debianutils/Config.in | 7 + package/busybox/config/e2fsprogs/Config.in | 67 ++++++++ package/busybox/config/findutils/Config.in | 24 ++- package/busybox/config/init/Config.in | 54 ++++--- package/busybox/config/libbb/Config.in | 22 +++ package/busybox/config/loginutils/Config.in | 78 +++++----- package/busybox/config/miscutils/Config.in | 115 +++++++++++++- package/busybox/config/modutils/Config.in | 90 +++++++---- package/busybox/config/networking/Config.in | 79 +++++++++- package/busybox/config/procps/Config.in | 48 +++++- package/busybox/config/shell/Config.in | 65 +++++++- package/busybox/config/util-linux/Config.in | 182 ++++++++++++++++------ 16 files changed, 1012 insertions(+), 265 deletions(-) create mode 100644 package/busybox/config/e2fsprogs/Config.in create mode 100644 package/busybox/config/libbb/Config.in (limited to 'package/busybox/config/networking/Config.in') diff --git a/package/busybox/config/Config.in b/package/busybox/config/Config.in index e7afb53629..eedb4ba407 100644 --- a/package/busybox/config/Config.in +++ b/package/busybox/config/Config.in @@ -8,6 +8,8 @@ config BUSYBOX_HAVE_DOT_CONFIG bool default y +menu "Busybox Settings" + menu "General Configuration" choice @@ -79,10 +81,12 @@ config BUSYBOX_CONFIG_FEATURE_CLEAN_UP bool "Clean up all memory before exiting (usually not needed)" default n help - As a size optimization, busybox by default does not cleanup memory - that is dynamically allocated or close files before exiting. This - saves space and is usually not needed since the OS will clean up for - us. Don't enable this unless you have a really good reason to clean + As a size optimization, busybox normally exits without explicitly + freeing dynamically allocated memory or closing files. This saves + space since the OS will clean up for us, but it can confuse debuggers + like valgrind, which report tons of memory and resource leaks. + + Don't enable this unless you have a really good reason to clean things up manually. config BUSYBOX_CONFIG_FEATURE_SUID @@ -100,7 +104,7 @@ config BUSYBOX_CONFIG_FEATURE_SUID_CONFIG checking /etc/busybox.conf. The format of this file is as follows: = [Ssx-][Ssx-][x-] (|).(|) - + An example might help: [SUID] @@ -112,6 +116,13 @@ config BUSYBOX_CONFIG_FEATURE_SUID_CONFIG cp = --- # disable applet cp for everyone + The file has to be owned by user root, group root and has to be + writeable only by root: + (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf) + The busybox executable has to be owned by user root, group + root and has to be setuid root for this to work: + (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox) + Robert 'sandman' Griebl has more information here: . @@ -156,6 +167,48 @@ config BUSYBOX_CONFIG_STATIC Most people will leave this set to 'N'. +# The busybox shared library feature is there so make standalone can produce +# smaller applets. Since make standalone isn't in yet, there's nothing using +# this yet, and so it's disabled. +config BUSYBOX_CONFIG_DISABLE_SHARED + bool + default n + +config BUSYBOX_CONFIG_BUILD_LIBBUSYBOX + bool "Build shared libbusybox" + default n + depends on BUSYBOX_CONFIG_DISABLE_SHARED + help + Build a shared library libbusybox.so which contains all + libraries used inside busybox. + +config BUSYBOX_CONFIG_FEATURE_FULL_LIBBUSYBOX + bool "Feature-complete libbusybox" + default n if !CONFIG_FEATURE_SHARED_BUSYBOX + depends on BUSYBOX_CONFIG_BUILD_LIBBUSYBOX + help + Build a libbusybox with the complete feature-set, disregarding + the actually selected config. + + Normally, libbusybox will only contain the features which are + used by busybox itself. If you plan to write a separate + standalone application which uses libbusybox say 'Y'. + + Note: libbusybox is GPL, not LGPL, and exports no stable API that + might act as a copyright barrier. We can and will modify the + exported function set between releases (even minor version number + changes), and happily break out-of-tree features. + + Say 'N' if in doubt. + +config BUSYBOX_CONFIG_FEATURE_SHARED_BUSYBOX + bool "Use shared libbusybox for busybox" + default n if BUSYBOX_CONFIG_BUILD_LIBBUSYBOX + depends on !CONFIG_STATIC && BUSYBOX_CONFIG_BUILD_LIBBUSYBOX + help + Use libbusybox.so also for busybox itself. + You need to have a working dynamic linker to use this variant. + config BUSYBOX_CONFIG_LFS bool default y @@ -195,43 +248,27 @@ config BUSYBOX_EXTRA_CFLAGS_OPTIONS if you want to add some simple compiler switches (like -march=i686), or check for warnings using -Werror, just those options here. -endmenu - -menu 'Installation Options' - -config BUSYBOX_CONFIG_INSTALL_NO_USR - bool "Don't use /usr" +config BUSYBOX_CONFIG_BUILD_AT_ONCE + bool "Compile all sources at once" default n help - Disable use of /usr. Don't activate this option if you don't know - that you really want this behaviour. + Normally each source-file is compiled with one invocation of + the compiler. + If you set this option, all sources are compiled at once. + This gives the compiler more opportunities to optimize which can + result in smaller and/or faster binaries. -config BUSYBOX_PREFIX - string - default "./_install" - help - Define your directory to install BusyBox files/subdirs in. + Setting this option will consume alot of memory, e.g. if you + enable all applets with all features, gcc uses more than 300MB + RAM during compilation of busybox. + This option is most likely only beneficial for newer compilers + such as gcc-4.1 and above. + Say 'N' unless you know what you are doing. endmenu -source package/busybox/config/archival/Config.in -source package/busybox/config/coreutils/Config.in -source package/busybox/config/console-tools/Config.in -source package/busybox/config/debianutils/Config.in -source package/busybox/config/editors/Config.in -source package/busybox/config/findutils/Config.in -source package/busybox/config/init/Config.in -source package/busybox/config/loginutils/Config.in -source package/busybox/config/miscutils/Config.in -source package/busybox/config/modutils/Config.in -source package/busybox/config/networking/Config.in -source package/busybox/config/procps/Config.in -source package/busybox/config/shell/Config.in -source package/busybox/config/sysklogd/Config.in -source package/busybox/config/util-linux/Config.in - menu 'Debugging Options' config BUSYBOX_CONFIG_DEBUG @@ -288,6 +325,82 @@ config BUSYBOX_CONFIG_EFENCE endchoice +config BUSYBOX_CONFIG_DEBUG_YANK_SUSv2 + bool "Disable obsolete features removed before SUSv3?" + default y + help + This option will disable backwards compatability with SuSv2, + specifically, old-style numeric options ('command -1 ') + will not be supported in head, tail, and fold. (Note: should + yank from renice too.) + +endmenu + +menu 'Installation Options' + +config BUSYBOX_CONFIG_INSTALL_NO_USR + bool "Don't use /usr" + default n + help + Disable use of /usr. Don't activate this option if you don't know + that you really want this behaviour. + +choice + prompt "Applets links" + default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS + help + Choose how you install applets links. + +config BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS + bool "as soft-links" + help + Install applets as soft-links to the busybox binary. This needs some + free inodes on the filesystem, but might help with filesystem + generators that can't cope with hard-links. + +config BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS + bool "as hard-links" + help + Install applets as hard-links to the busybox binary. This might count + on a filesystem with few inodes. + +config BUSYBOX_CONFIG_INSTALL_APPLET_DONT + bool + prompt "not installed" + depends on BUSYBOX_CONFIG_FEATURE_INSTALLER || BUSYBOX_CONFIG_FEATURE_SH_STANDALONE_SHELL + help + Do not install applets links. Usefull when using the -install feature + or a standalone shell for rescue pruposes. + +endchoice + +config BUSYBOX_PREFIX + string + default "./_install" + help + Define your directory to install BusyBox files/subdirs in. + +endmenu + +source package/busybox/config/libbb/Config.in endmenu +comment "Applets" + +source package/busybox/config/archival/Config.in +source package/busybox/config/coreutils/Config.in +source package/busybox/config/console-tools/Config.in +source package/busybox/config/debianutils/Config.in +source package/busybox/config/editors/Config.in +source package/busybox/config/findutils/Config.in +source package/busybox/config/init/Config.in +source package/busybox/config/loginutils/Config.in +source package/busybox/config/e2fsprogs/Config.in +source package/busybox/config/modutils/Config.in +source package/busybox/config/util-linux/Config.in +source package/busybox/config/miscutils/Config.in +source package/busybox/config/networking/Config.in +source package/busybox/config/procps/Config.in +source package/busybox/config/shell/Config.in +source package/busybox/config/sysklogd/Config.in diff --git a/package/busybox/config/archival/Config.in b/package/busybox/config/archival/Config.in index 909e74648c..bd5c4b140f 100644 --- a/package/busybox/config/archival/Config.in +++ b/package/busybox/config/archival/Config.in @@ -47,10 +47,10 @@ config BUSYBOX_CONFIG_BUNZIP2 is generally considerably better than that achieved by more conventional LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors. - + The BusyBox bunzip2 applet is limited to de-compression only. On an x86 system, this applet adds about 11K. - + Unless you have a specific application which requires bunzip2, you should probably say N here. @@ -73,7 +73,7 @@ config BUSYBOX_CONFIG_DPKG default n help dpkg is a medium-level tool to install, build, remove and manage Debian packages. - + This implementation of dpkg has a number of limitations, you should use the official dpkg if possible. @@ -82,9 +82,9 @@ config BUSYBOX_CONFIG_DPKG_DEB default n help dpkg-deb packs, unpacks and provides information about Debian archives. - + This implementation of dpkg-deb cannot pack archives. - + Unless you have a specific application which requires dpkg-deb, you should probably say N here. @@ -165,6 +165,14 @@ config BUSYBOX_CONFIG_FEATURE_TAR_BZIP2 If you enable this option you'll be able to extract archives compressed with bzip2. +config BUSYBOX_CONFIG_FEATURE_TAR_LZMA + bool " Enable -a option to handle .tar.lzma files" + default n + depends on BUSYBOX_CONFIG_TAR + help + If you enable this option you'll be able to extract + archives compressed with lzma. + config BUSYBOX_CONFIG_FEATURE_TAR_FROM bool " Enable -X (exclude from) and -T (include from) options)" default y @@ -220,6 +228,29 @@ config BUSYBOX_CONFIG_UNCOMPRESS uncompress is used to decompress archives created by compress. Not much used anymore, replaced by gzip/gunzip. +config BUSYBOX_CONFIG_UNLZMA + bool "unlzma" + default n + help + unlzma is a compression utility using the Lempel-Ziv-Markov chain + compression algorithm, and range coding. Compression + is generally considerably better than that achieved by the bzip2 + compressors. + + The BusyBox unlzma applet is limited to de-compression only. + On an x86 system, this applet adds about 4K. + + Unless you have a specific application which requires unlzma, you + should probably say N here. + +config BUSYBOX_CONFIG_FEATURE_LZMA_FAST + bool " Optimze unlzma for speed" + default n + depends on BUSYBOX_CONFIG_UNLZMA + help + This option reduce decompression time by about 33% at the cost of + a 2K bigger binary. + config BUSYBOX_CONFIG_UNZIP bool "unzip" default n @@ -249,7 +280,7 @@ config BUSYBOX_CONFIG_FEATURE_DEB_TAR_GZ depends on BUSYBOX_CONFIG_DPKG || BUSYBOX_CONFIG_DPKG_DEB help This is the default compression method inside the debian ar file. - + If you want compatibility with standard .deb's you should say yes here. config BUSYBOX_CONFIG_FEATURE_DEB_TAR_BZ2 @@ -259,8 +290,19 @@ config BUSYBOX_CONFIG_FEATURE_DEB_TAR_BZ2 help This allows dpkg and dpkg-deb to extract deb's that are compressed internally with bzip2 instead of gzip. - + You only want this if you are creating your own custom debian packages that use an internal control.tar.bz2 or data.tar.bz2. +config BUSYBOX_CONFIG_FEATURE_DEB_TAR_LZMA + bool " lzma debian packages" + default n + depends on BUSYBOX_CONFIG_DPKG || BUSYBOX_CONFIG_DPKG_DEB + help + This allows dpkg and dpkg-deb to extract deb's that are compressed + internally with lzma instead of gzip. + + You only want this if you are creating your own custom debian + packages that use an internal control.tar.lzma or data.tar.lzma. + endmenu diff --git a/package/busybox/config/console-tools/Config.in b/package/busybox/config/console-tools/Config.in index 207e2df21c..4faaeb44b6 100644 --- a/package/busybox/config/console-tools/Config.in +++ b/package/busybox/config/console-tools/Config.in @@ -58,6 +58,13 @@ config BUSYBOX_CONFIG_RESET This program is used to reset the terminal screen, if it gets messed up. +config BUSYBOX_CONFIG_SETCONSOLE + bool "setconsole" + default n + help + This program redirects the system console to another device, + like the current tty while logged in via telnet. + config BUSYBOX_CONFIG_SETKEYCODES bool "setkeycodes" default n diff --git a/package/busybox/config/coreutils/Config.in b/package/busybox/config/coreutils/Config.in index 9d97e3c58d..53984e3951 100644 --- a/package/busybox/config/coreutils/Config.in +++ b/package/busybox/config/coreutils/Config.in @@ -59,6 +59,13 @@ config BUSYBOX_CONFIG_CMP cmp is used to compare two files and returns the result to standard output. +config BUSYBOX_CONFIG_COMM + bool "comm" + default n + help + comm is used to compare two files line by line and return + a three-column output. + config BUSYBOX_CONFIG_CP bool "cp" default y @@ -72,20 +79,12 @@ config BUSYBOX_CONFIG_CUT cut is used to print selected parts of lines from each file to stdout. -if BUSYBOX_CONFIG_WATCH - config BUSYBOX_CONFIG_DATE - default y - comment "date (forced enabled for use with watch)" -endif - -if !CONFIG_WATCH - config BUSYBOX_CONFIG_DATE - bool "date" - default y - help - date is used to set the system date or display the - current time in the given format. -endif +config BUSYBOX_CONFIG_DATE + bool "date" + default y + help + date is used to set the system date or display the + current time in the given format. config BUSYBOX_CONFIG_FEATURE_DATE_ISOFMT bool " Enable ISO date format output (-I)" @@ -144,11 +143,12 @@ config BUSYBOX_CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K Use a blocksize of (1K) instead of the default 512b. config BUSYBOX_CONFIG_ECHO - bool "echo (basic SUSv3 version taking no options)" + bool "echo (basic SuSv3 version taking no options)" default y help echo is used to print a specified string to stdout. +# this entry also appears in shell/Config.in, next to the echo builtin config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO bool " Enable echo options (-n and -e)" default y @@ -171,19 +171,20 @@ config BUSYBOX_CONFIG_EXPR expr is used to calculate numbers and print the result to standard output. -if BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_LASH || BUSYBOX_CONFIG_MSH - config BUSYBOX_CONFIG_FALSE - default y - comment "false (forced enabled for use with shell)" -endif +config BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64 + bool " Extend Posix numbers support to 64 bit" + default n + depends on BUSYBOX_CONFIG_EXPR + help + Enable 64-bit math support in the expr applet. This will make + the applet slightly larger, but will allow computation with very + large numbers. -if !CONFIG_HUSH && !CONFIG_LASH && !CONFIG_MSH - config BUSYBOX_CONFIG_FALSE - bool "false" - default y - help - false returns an exit code of FALSE (1). -endif +config BUSYBOX_CONFIG_FALSE + bool "false" + default y + help + false returns an exit code of FALSE (1). config BUSYBOX_CONFIG_FOLD bool "fold" @@ -291,11 +292,22 @@ config BUSYBOX_CONFIG_FEATURE_LS_USERNAME Allow ls to display username/groupname for files. config BUSYBOX_CONFIG_FEATURE_LS_COLOR - bool " Use color to identify file types" + bool " Allow use of color to identify file types" default y depends on BUSYBOX_CONFIG_LS help - Allow ls to use color when displaying files. + This enables the --color option to ls. + +config BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT + bool " Produce colored ls output by default" + default y + depends on BUSYBOX_CONFIG_FEATURE_LS_COLOR + help + Saying yes here will turn coloring on by default, + even if no "--color" option is given to the ls command. + This is not recommended, since the colors are not + configurable, and the output may not be legible on + many output screens. config BUSYBOX_CONFIG_MD5SUM bool "md5sum" @@ -329,12 +341,30 @@ config BUSYBOX_CONFIG_MV help mv is used to move or rename files or directories. +config BUSYBOX_CONFIG_NICE + bool "nice" + default n + help + nice runs a program with modified scheduling priority. + +config BUSYBOX_CONFIG_NOHUP + bool "nohup" + default n + help + run a command immune to hangups, with output to a non-tty. + config BUSYBOX_CONFIG_OD bool "od" default n help od is used to dump binary files in octal and other formats. +config BUSYBOX_CONFIG_PRINTENV + bool "printenv" + default n + help + printenv is used to print all or part of environment. + config BUSYBOX_CONFIG_PRINTF bool "printf" default y @@ -398,12 +428,45 @@ config BUSYBOX_CONFIG_SORT help sort is used to sort lines of text in specified files. +config BUSYBOX_CONFIG_FEATURE_SORT_BIG + bool " full SuSv3 compliant sort (Support -ktcsbdfiozgM)" + default n + depends on BUSYBOX_CONFIG_SORT + help + Without this, sort only supports -r, -u, and an integer version + of -n. Selecting this adds sort keys, floating point support, and + more. This adds a little over 3k to a nonstatic build on x86. + + The SuSv3 sort standard is available at: + http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html + +config BUSYBOX_CONFIG_STAT + bool "stat" + default n + help + display file or filesystem status. + +config BUSYBOX_CONFIG_FEATURE_STAT_FORMAT + bool " Enable custom formats (-c)" + default n + depends on BUSYBOX_CONFIG_STAT + help + Without this, stat will not support the '-c format' option where + users can pass a custom format string for output. This adds about + 7k to a nonstatic build on amd64. + config BUSYBOX_CONFIG_STTY bool "stty" default n help stty is used to change and print terminal line settings. +config BUSYBOX_CONFIG_SUM + bool "sum" + default n + help + checksum and count the blocks in a file + config BUSYBOX_CONFIG_SYNC bool "sync" default y @@ -439,21 +502,13 @@ config BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO help Enable this option for a faster tee, at expense of size. -if BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_LASH || BUSYBOX_CONFIG_MSH - config BUSYBOX_CONFIG_TEST - default y - comment "test (forced enabled for use with shell)" -endif - -if !CONFIG_ASH && !CONFIG_HUSH && !CONFIG_LASH && !CONFIG_MSH - config BUSYBOX_CONFIG_TEST - bool "test" - default y - help - test is used to check file types and compare values, - returning an appropriate exit code. The shells (ash - and bash) have test builtin. -endif +config BUSYBOX_CONFIG_TEST + bool "test" + default y + help + test is used to check file types and compare values, + returning an appropriate exit code. The shells (ash + and bash) have test builtin. config BUSYBOX_CONFIG_FEATURE_TEST_64 bool " Extend test to 64 bit" @@ -476,20 +531,30 @@ config BUSYBOX_CONFIG_TR tr is used to squeeze, and/or delete characters from standard input, writing to standard output. -if BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_LASH || BUSYBOX_CONFIG_MSH - config BUSYBOX_CONFIG_TRUE - default y - comment "true (forced enabled for use with shell)" -endif +config BUSYBOX_CONFIG_FEATURE_TR_CLASSES + bool " Enable character classes (such as [:upper:])" + default n + depends on BUSYBOX_CONFIG_TR + help + Enable character classes, enabling commands such as: + tr [:upper:] [:lower:] to convert input into lowercase. -if !CONFIG_HUSH && !CONFIG_LASH && !CONFIG_MSH - config BUSYBOX_CONFIG_TRUE - bool "true" - default y - help - true returns an exit code of TRUE (0). +config BUSYBOX_CONFIG_FEATURE_TR_EQUIV + bool " Enable equivalence classes" + default n + depends on BUSYBOX_CONFIG_TR + help + Enable equivalence classes, which essentially add the enclosed + character to the current set. For instance, tr [=a=] xyz would + replace all instances of 'a' with 'xyz'. This option is mainly + useful for cases when no other way of expressing a character + is possible. -endif +config BUSYBOX_CONFIG_TRUE + bool "true" + default y + help + true returns an exit code of TRUE (0). config BUSYBOX_CONFIG_TTY bool "tty" @@ -531,6 +596,7 @@ config BUSYBOX_CONFIG_UUENCODE config BUSYBOX_CONFIG_WATCH bool "watch" default n + select BUSYBOX_CONFIG_DATE help watch is used to execute a program periodically, showing output to the screen. @@ -545,7 +611,7 @@ config BUSYBOX_CONFIG_WC config BUSYBOX_CONFIG_WHO bool "who" default n - select BUSYBOX_CONFIG_FEATURE_U_W_TMP + select BUSYBOX_CONFIG_FEATURE_UTMP help who is used to show who is logged on. @@ -564,7 +630,7 @@ config BUSYBOX_CONFIG_YES the default string `y'. comment "Common options for cp and mv" - depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV + depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV config BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS bool " Preserve hard links" @@ -573,22 +639,22 @@ config BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS help Allow cp and mv to preserve hard links. -comment "Common options for ls and more" - depends on BUSYBOX_CONFIG_LS || BUSYBOX_CONFIG_MORE +comment "Common options for ls, more and telnet" + depends on BUSYBOX_CONFIG_LS || BUSYBOX_CONFIG_MORE || BUSYBOX_CONFIG_TELNET config BUSYBOX_CONFIG_FEATURE_AUTOWIDTH bool " Calculate terminal & column widths" default y - depends on BUSYBOX_CONFIG_LS || BUSYBOX_CONFIG_MORE + depends on BUSYBOX_CONFIG_LS || BUSYBOX_CONFIG_MORE || BUSYBOX_CONFIG_TELNET help - This option allows utilities such as 'ls' and 'more' to determine the - width of the screen, which can allow them to display additional text - or avoid wrapping text onto the next line. If you leave this - disabled, your utilities will be especially primitive and will be - unable to determine the current screen width. + This option allows utilities such as 'ls', 'more' and 'telnet' + to determine the width of the screen, which can allow them to + display additional text or avoid wrapping text onto the next line. + If you leave this disabled, your utilities will be especially + primitive and will be unable to determine the current screen width. comment "Common options for df, du, ls" - depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS + depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE bool " Support for human readable output (example 13k, 23M, 235G)" @@ -598,7 +664,7 @@ config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE Allow df, du, and ls to have human readable output. comment "Common options for md5sum, sha1sum" - depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM + depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK bool " Enable -c, -s and -w options" diff --git a/package/busybox/config/debianutils/Config.in b/package/busybox/config/debianutils/Config.in index b62499eb1b..71f2bf38af 100644 --- a/package/busybox/config/debianutils/Config.in +++ b/package/busybox/config/debianutils/Config.in @@ -24,6 +24,13 @@ config BUSYBOX_CONFIG_READLINK This program reads a symbolic link and returns the name of the file it points to +config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW + bool " Enable canonicalization by following all symlinks (-f)" + default n + depends on BUSYBOX_CONFIG_READLINK + help + Enable the readlink option (-f). + config BUSYBOX_CONFIG_RUN_PARTS bool "run-parts" default n diff --git a/package/busybox/config/e2fsprogs/Config.in b/package/busybox/config/e2fsprogs/Config.in new file mode 100644 index 0000000000..e9ef3dc041 --- /dev/null +++ b/package/busybox/config/e2fsprogs/Config.in @@ -0,0 +1,67 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Linux Ext2 FS Progs" + +config BUSYBOX_CONFIG_CHATTR + bool "chattr" + default n + help + chattr changes the file attributes on a second extended file system. + +config BUSYBOX_CONFIG_E2FSCK + bool "e2fsck" + default n + help + e2fsck is used to check Linux second extended file systems (ext2fs). + e2fsck also supports ext2 filesystems countaining a journal (ext3). + The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also + provided. + +config BUSYBOX_CONFIG_FSCK + bool "fsck" + default n + help + fsck is used to check and optionally repair one or more filesystems. + In actuality, fsck is simply a front-end for the various file system + checkers (fsck.fstype) available under Linux. + +config BUSYBOX_CONFIG_LSATTR + bool "lsattr" + default n + help + lsattr lists the file attributes on a second extended file system. + +config BUSYBOX_CONFIG_MKE2FS + bool "mke2fs" + default n + help + mke2fs is used to create an ext2/ext3 filesystem. The normal compat + symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided. + +config BUSYBOX_CONFIG_TUNE2FS + bool "tune2fs" + default n + help + tune2fs allows the system administrator to adjust various tunable + filesystem parameters on Linux ext2/ext3 filesystems. + +config BUSYBOX_CONFIG_E2LABEL + bool "e2label" + default n + depends on BUSYBOX_CONFIG_TUNE2FS + help + e2label will display or change the filesystem label on the ext2 + filesystem located on device. + +config BUSYBOX_CONFIG_FINDFS + bool "findfs" + default n + depends on BUSYBOX_CONFIG_TUNE2FS + help + findfs will search the disks in the system looking for a filesystem + which has a label matching label or a UUID equal to uuid. + +endmenu diff --git a/package/busybox/config/findutils/Config.in b/package/busybox/config/findutils/Config.in index fb5a8c05f1..9667bfba81 100644 --- a/package/busybox/config/findutils/Config.in +++ b/package/busybox/config/findutils/Config.in @@ -17,7 +17,15 @@ config BUSYBOX_CONFIG_FEATURE_FIND_MTIME depends on BUSYBOX_CONFIG_FIND help Allow searching based on the modification time of - files. + files, in days. + +config BUSYBOX_CONFIG_FEATURE_FIND_MMIN + bool " Enable modified time matching (-min) option" + default n + depends on BUSYBOX_CONFIG_FIND + help + Allow searching based on the modification time of + files, in minutes. config BUSYBOX_CONFIG_FEATURE_FIND_PERM bool " Enable permissions matching (-perm) option" @@ -57,6 +65,14 @@ config BUSYBOX_CONFIG_FEATURE_FIND_INUM help Support the 'find -inum' option for searching by inode number. +config BUSYBOX_CONFIG_FEATURE_FIND_EXEC + bool " Enable (-exec) option allowing execution of commands" + default y + depends on BUSYBOX_CONFIG_FIND + help + Support the 'find -exec' option for executing commands based upon + the files matched. + config BUSYBOX_CONFIG_GREP bool "grep" default y @@ -73,13 +89,13 @@ config BUSYBOX_CONFIG_FEATURE_GREP_EGREP_ALIAS and various repetition operators. config BUSYBOX_CONFIG_FEATURE_GREP_FGREP_ALIAS - bool " Alias fgrep to grep -f" + bool " Alias fgrep to grep -F" default y depends on BUSYBOX_CONFIG_GREP help - fgrep sees the search pattern as a normal string rather than + fgrep sees the search pattern as a normal string rather than regular expressions. - grep -f is always builtin, this just creates the fgrep alias. + grep -F is always builtin, this just creates the fgrep alias. config BUSYBOX_CONFIG_FEATURE_GREP_CONTEXT bool " Enable before and after context flags (-A, -B and -C)" diff --git a/package/busybox/config/init/Config.in b/package/busybox/config/init/Config.in index 087d836bf9..88dcaca2d3 100644 --- a/package/busybox/config/init/Config.in +++ b/package/busybox/config/init/Config.in @@ -12,21 +12,32 @@ config BUSYBOX_CONFIG_INIT init is the first program run when the system boots. config BUSYBOX_CONFIG_FEATURE_USE_INITTAB - bool " Support reading an inittab file?" + bool " Support reading an inittab file" default y depends on BUSYBOX_CONFIG_INIT help Allow init to read an inittab file when the system boot. -config BUSYBOX_CONFIG_FEATURE_INITRD - bool " Support running init from within an initrd?" +config BUSYBOX_CONFIG_FEATURE_INIT_SCTTY + bool " Support running commands with a controlling-tty" + default n + depends on BUSYBOX_CONFIG_INIT + help + If this option is enabled a command starting with hyphen (-) + is run in its own session (setsid(2)) and possibly with a + controlling tty (TIOCSCTTY). This is not the traditional init + behavour, but is often what you want in an embedded system where + the console is only accessed during development or for maintenance. + +config BUSYBOX_CONFIG_FEATURE_EXTRA_QUIET + bool " Be _extra_ quiet on boot" default n depends on BUSYBOX_CONFIG_INIT help - Allow init to be called from an initrd as linuxrc. + Prevent init from logging some messages to the console during boot. config BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS - bool " Support dumping core for child processes (debugging only)?" + bool " Support dumping core for child processes (debugging only)" default n depends on BUSYBOX_CONFIG_INIT help @@ -35,31 +46,24 @@ config BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS core file sizes. If this option is disabled, processes will not generate any core files. -config BUSYBOX_CONFIG_FEATURE_EXTRA_QUIET - bool " Should init be _extra_ quiet on boot?" - default n - depends on BUSYBOX_CONFIG_INIT - help - Prevent init from logging some messages to the console - during boot. -config BUSYBOX_CONFIG_HALT - bool "halt" - default n - help - Stop all processes and halt the system. -config BUSYBOX_CONFIG_POWEROFF - bool "poweroff" +config BUSYBOX_CONFIG_FEATURE_INITRD + bool " Support running init from within an initrd (not initramfs)" default n + depends on BUSYBOX_CONFIG_INIT help - Stop all processes and (try to) power off the system. + Legacy support for running init under the old-style initrd. Allows + the name linuxrc to act as init, and it doesn't assume init is PID 1. + + This does not apply to initramfs, which runs /init as PID 1 and + requires no special support. -config BUSYBOX_CONFIG_REBOOT - bool "reboot" +config BUSYBOX_CONFIG_HALT + bool "poweroff, halt, and reboot" default y help - Stop all processes and reboot the system. + Stop all processes and either halt, reboot, or power off the system. config BUSYBOX_CONFIG_MESG bool "mesg" @@ -68,5 +72,9 @@ config BUSYBOX_CONFIG_MESG Mesg controls access to your terminal by others. It is typically used to allow or disallow other users to write to your terminal + default y + help + Stop all processes and (try to) power off the system. + endmenu diff --git a/package/busybox/config/libbb/Config.in b/package/busybox/config/libbb/Config.in new file mode 100644 index 0000000000..7d84a75962 --- /dev/null +++ b/package/busybox/config/libbb/Config.in @@ -0,0 +1,22 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Busybox Library Tuning" + +config BUSYBOX_CONFIG_MD5_SIZE_VS_SPEED + int " MD5: Trade Bytes for Speed" + default 2 + range 0 3 + help + Trade binary size versus speed for the md5sum algorithm. + Approximate values running uClibc and hashing + linux-2.4.4.tar.bz2 were: + user times (sec) text size (386) + 0 (fastest) 1.1 6144 + 1 1.4 5392 + 2 3.0 5088 + 3 (smallest) 5.1 4912 + +endmenu diff --git a/package/busybox/config/loginutils/Config.in b/package/busybox/config/loginutils/Config.in index 7ab724f5ca..621d57643f 100644 --- a/package/busybox/config/loginutils/Config.in +++ b/package/busybox/config/loginutils/Config.in @@ -5,6 +5,33 @@ menu "Login/Password Management Utilities" +config BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS + bool "Support for shadow passwords" + default n + help + Build support for shadow password in /etc/shadow. This file is only + readable by root and thus the encrypted passwords are no longer + publicly readable. + +config BUSYBOX_CONFIG_USE_BB_SHADOW + bool #" Use busybox shadow password functions" + default n + depends on BUSYBOX_CONFIG_USE_BB_PWD_GRP && BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS + help + If you leave this disabled, busybox will use the system's shadow + password handling functions. And if you are using the GNU C library + (glibc), you will then need to install the /etc/nsswitch.conf + configuration file and the required /lib/libnss_* libraries in + order for the shadow password functions to work. This generally + makes your embedded system quite a bit larger. + + Enabling this option will cause busybox to directly access the + system's /etc/shadow file when handling shadow passwords. This + makes your system smaller and I will get fewer emails asking about + how glibc NSS works). When this option is enabled, you will not be + able to use PAM to access shadow passwords from remote LDAP + password servers and whatnot. + config BUSYBOX_CONFIG_USE_BB_PWD_GRP bool "Use internal password and group functions rather than system functions" default n @@ -26,7 +53,6 @@ config BUSYBOX_CONFIG_USE_BB_PWD_GRP If you enable this option, it will add about 1.5k to busybox. - config BUSYBOX_CONFIG_ADDGROUP bool "addgroup" default n @@ -57,14 +83,21 @@ config BUSYBOX_CONFIG_GETTY help getty lets you log in on a tty, it is normally invoked by init. -config BUSYBOX_CONFIG_FEATURE_U_W_TMP - bool " Support utmp and wtmp files" - depends on BUSYBOX_CONFIG_GETTY || BUSYBOX_CONFIG_LOGIN || BUSYBOX_CONFIG_SU || BUSYBOX_CONFIG_WHO || BUSYBOX_CONFIG_LAST +config BUSYBOX_CONFIG_FEATURE_UTMP + bool " Support utmp file" + depends on BUSYBOX_CONFIG_GETTY || BUSYBOX_CONFIG_LOGIN || BUSYBOX_CONFIG_SU || BUSYBOX_CONFIG_WHO default n help - The files /var/run/utmp and /var/run/wtmp can be used to track when - user's have logged into and logged out of the system, allowing programs - such as 'who' and 'last' to list who is currently logged in. + The file /var/run/utmp is used to track who is currently logged in. + +config BUSYBOX_CONFIG_FEATURE_WTMP + bool " Support wtmp file" + depends on BUSYBOX_CONFIG_GETTY || BUSYBOX_CONFIG_LOGIN || BUSYBOX_CONFIG_SU || BUSYBOX_CONFIG_LAST + default n + select BUSYBOX_CONFIG_FEATURE_UTMP + help + The file /var/run/wtmp is used to track when user's have logged into + and logged out of the system. config BUSYBOX_CONFIG_LOGIN bool "login" @@ -126,36 +159,5 @@ config BUSYBOX_CONFIG_VLOCK Note that Busybox binary must be setuid root for this applet to work properly. -comment "Common options for adduser, deluser, login, su" - depends on BUSYBOX_CONFIG_ADDUSER || BUSYBOX_CONFIG_DELUSER || BUSYBOX_CONFIG_LOGIN || BUSYBOX_CONFIG_SU - -config BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS - bool "Support for shadow passwords" - default n - depends on BUSYBOX_CONFIG_ADDUSER || BUSYBOX_CONFIG_DELUSER || BUSYBOX_CONFIG_LOGIN || BUSYBOX_CONFIG_SU - help - Build support for shadow password in /etc/shadow. This file is only - readable by root and thus the encrypted passwords are no longer - publicly readable. - -config BUSYBOX_CONFIG_USE_BB_SHADOW - bool " Use busybox shadow password functions" - default n - depends on BUSYBOX_CONFIG_USE_BB_PWD_GRP && BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS - help - If you leave this disabled, busybox will use the system's shadow - password handling functions. And if you are using the GNU C library - (glibc), you will then need to install the /etc/nsswitch.conf - configuration file and the required /lib/libnss_* libraries in - order for the shadow password functions to work. This generally - makes your embedded system quite a bit larger. - - Enabling this option will cause busybox to directly access the - system's /etc/shadow file when handling shadow passwords. This - makes your system smaller and I will get fewer emails asking about - how glibc NSS works). When this option is enabled, you will not be - able to use PAM to access shadow passwords from remote LDAP - password servers and whatnot. - endmenu diff --git a/package/busybox/config/miscutils/Config.in b/package/busybox/config/miscutils/Config.in index 77dc85cd05..1ffb8c6536 100644 --- a/package/busybox/config/miscutils/Config.in +++ b/package/busybox/config/miscutils/Config.in @@ -12,6 +12,13 @@ config BUSYBOX_CONFIG_ADJTIMEX Adjtimex reads and optionally sets adjustment parameters for the Linux clock adjustment algorithm. +config BUSYBOX_CONFIG_BBCONFIG + bool "bbconfig" + default n + help + The bbconfig applet will print the config file with which + busybox was built. + config BUSYBOX_CONFIG_CROND bool "crond" default y @@ -37,6 +44,7 @@ config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL config BUSYBOX_CONFIG_CRONTAB bool "crontab" default y + select BUSYBOX_CONFIG_FEATURE_SUID help Crontab manipulates the crontab for a particular user. Only the superuser may specify a different user and/or crontab directory. @@ -83,13 +91,66 @@ config BUSYBOX_CONFIG_DEVFSD_VERBOSE help Increases logging to stderr or syslog. +config BUSYBOX_CONFIG_EJECT + bool "eject" + default n + help + Used to eject cdroms. (defaults to /dev/cdrom) + config BUSYBOX_CONFIG_LAST bool "last" default n - select BUSYBOX_CONFIG_FEATURE_U_W_TMP + select BUSYBOX_CONFIG_FEATURE_WTMP help 'last' displays a list of the last users that logged into the system. +config BUSYBOX_CONFIG_LESS + bool "less" + default n + help + 'less' is a pager, meaning that it displays text files. It possesses + a wide array of features, and is an improvement over 'more'. + +config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS + bool " Enable bracket searching" + default n + depends on BUSYBOX_CONFIG_LESS + help + This option adds the capability to search for matching left and right + brackets, facilitating programming. + +config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS + bool " Enable extra flags" + default n + depends on BUSYBOX_CONFIG_LESS + help + The extra flags provided do the following: + + The -M flag enables a more sophisticated status line. + The -m flag enables a simpler status line with a percentage. + +config BUSYBOX_CONFIG_FEATURE_LESS_FLAGCS + bool " Enable flag changes" + default n + depends on BUSYBOX_CONFIG_LESS + help + This enables the ability to change command-line flags within + less itself. + +config BUSYBOX_CONFIG_FEATURE_LESS_MARKS + bool " Enable marks" + default n + depends on BUSYBOX_CONFIG_LESS + help + Marks enable positions in a file to be stored for easy reference. + +config BUSYBOX_CONFIG_FEATURE_LESS_REGEXP + bool " Enable regular expressions" + default n + depends on BUSYBOX_CONFIG_LESS + help + Enable regular expressions, allowing complex file searches. + config BUSYBOX_CONFIG_HDPARM bool "hdparm" default n @@ -152,10 +213,39 @@ config BUSYBOX_CONFIG_MAKEDEVS bool "makedevs" default n help - 'makedevs' is a utility used and created by the Linux Router Project. - It creates a large number of device special files (/dev devices) - rather quickly, and can be considerably faster then running mknod a - zillion times. + 'makedevs' is a utility used to create a batch of devices with + one command. + . + There are two choices for command line behaviour, the interface + as used by LEAF/Linux Router Project, or a device table file. + . + 'leaf' is traditionally what busybox follows, it allows multiple + devices of a particluar type to be created per command. + e.g. /dev/hda[0-9] + Device properties are passed as command line arguments. + . + 'table' reads device properties from a file or stdin, allowing + a batch of unrelated devices to be makde with one command. + User/group names are allowed as an alternative to uid/gid. + +choice + prompt "Choose makedevs behaviour" + depends BUSYBOX_CONFIG_MAKEDEVS + default BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE + +config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_LEAF + bool "leaf" + +config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE + bool "table" + +endchoice + +config BUSYBOX_CONFIG_MOUNTPOINT + bool "mountpoint" + default n + help + mountpoint checks if the directory is a mountpoint. config BUSYBOX_CONFIG_MT bool "mt" @@ -165,6 +255,15 @@ config BUSYBOX_CONFIG_MT to advance or rewind a tape past a specified number of archive files on the tape. +config BUSYBOX_CONFIG_RUNLEVEL + bool "runlevel" + default n + help + find the current and previous system runlevel. + + This applet uses utmp but does not rely on busybox supporing + utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc. + config BUSYBOX_CONFIG_RX bool "rx" default n @@ -178,6 +277,12 @@ config BUSYBOX_CONFIG_STRINGS strings prints the printable character sequences for each file specified. +config BUSYBOX_CONFIG_SETSID + bool "setsid" + default n + help + setsid runs a program in a new session + config BUSYBOX_CONFIG_TIME bool "time" default y diff --git a/package/busybox/config/modutils/Config.in b/package/busybox/config/modutils/Config.in index ee348f6fdb..7c9f50f16d 100644 --- a/package/busybox/config/modutils/Config.in +++ b/package/busybox/config/modutils/Config.in @@ -11,22 +11,8 @@ config BUSYBOX_CONFIG_INSMOD help insmod is used to load specified modules in the running kernel. -config BUSYBOX_CONFIG_FEATURE_2_4_MODULES - bool " Support version 2.2.x to 2.4.x Linux kernels" - default y - depends on BUSYBOX_CONFIG_INSMOD - help - Support module loading for 2.2.x and 2.4.x Linux kernels. - -config BUSYBOX_CONFIG_FEATURE_2_6_MODULES - bool " Support version 2.6.x Linux kernels" - default y - depends on BUSYBOX_CONFIG_INSMOD - help - Support module loading for newer 2.6.x Linux kernels. - config BUSYBOX_CONFIG_FEATURE_INSMOD_VERSION_CHECKING - bool " Module version checking" + bool "Module version checking" default n depends on BUSYBOX_CONFIG_INSMOD && BUSYBOX_CONFIG_FEATURE_2_4_MODULES help @@ -34,7 +20,7 @@ config BUSYBOX_CONFIG_FEATURE_INSMOD_VERSION_CHECKING ensure that the kernel and module are made for each other. config BUSYBOX_CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS - bool " Add module symbols to kernel symbol table" + bool "Add module symbols to kernel symbol table" default n depends on BUSYBOX_CONFIG_INSMOD && BUSYBOX_CONFIG_FEATURE_2_4_MODULES help @@ -45,7 +31,7 @@ config BUSYBOX_CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS Oops messages from kernel modules, say N. config BUSYBOX_CONFIG_FEATURE_INSMOD_LOADINKMEM - bool " In kernel memory optimization (uClinux only)" + bool "In kernel memory optimization (uClinux only)" default n depends on BUSYBOX_CONFIG_INSMOD && BUSYBOX_CONFIG_FEATURE_2_4_MODULES help @@ -55,7 +41,7 @@ config BUSYBOX_CONFIG_FEATURE_INSMOD_LOADINKMEM being loaded into memory. config BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP - bool " Enable load map (-m) option" + bool "Enable load map (-m) option" default n depends on BUSYBOX_CONFIG_INSMOD && BUSYBOX_CONFIG_FEATURE_2_4_MODULES help @@ -66,7 +52,7 @@ config BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP don't need this option. config BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL - bool " Symbols in load map" + bool "Symbols in load map" default n depends on BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP help @@ -74,16 +60,25 @@ config BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL load map. With this option, -m will also output symbols load map. +config BUSYBOX_CONFIG_RMMOD + bool "rmmod" + default y + help + rmmod is used to unload specified modules from the kernel. + config BUSYBOX_CONFIG_LSMOD bool "lsmod" default y help lsmod is used to display a list of loaded modules. -config BUSYBOX_CONFIG_FEATURE_QUERY_MODULE_INTERFACE - bool - default y - depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && !CONFIG_FEATURE_2_6_MODULES +config BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT + bool "lsmod pretty output for 2.6.x Linux kernels " + default n + depends on BUSYBOX_CONFIG_LSMOD + help + This option makes output format of lsmod adjusted to + the format of module-init-tools for Linux kernel 2.6. config BUSYBOX_CONFIG_MODPROBE bool "modprobe" @@ -92,14 +87,31 @@ config BUSYBOX_CONFIG_MODPROBE Handle the loading of modules, and their dependancies on a high level. -config BUSYBOX_CONFIG_RMMOD - bool "rmmod" - default y + Note that in the state, modprobe does not understand multiple + module options from the configuration file. See option below. + +config BUSYBOX_CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS + bool "Multiple options parsing" + default n + depends on BUSYBOX_CONFIG_MODPROBE help - rmmod is used to unload specified modules from the kernel. + Allow modprobe to understand more than one option to pass to + modules. + + This is a WIP, while waiting for a common argument parsing + common amongst all BB applets (shell, modprobe, etc...) and + adds around 600 bytes on x86, 700 bytes on ARM. The code is + biggish and uggly, but just works. + + Saying Y here is not a bad idea if you're not that short + on storage capacity. + +comment "Options common to multiple modutils" + depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_RMMOD || BUSYBOX_CONFIG_MODPROBE || BUSYBOX_CONFIG_LSMOD config BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE - bool "Support tainted module checking with new kernels" + # Simulate indentation + bool " Support tainted module checking with new kernels" default n depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_LSMOD help @@ -108,6 +120,28 @@ config BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE support request. This option is required to support GPLONLY modules. +config BUSYBOX_CONFIG_FEATURE_2_4_MODULES + # Simulate indentation + bool " Support version 2.2.x to 2.4.x Linux kernels" + default y + depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_RMMOD + help + Support module loading for 2.2.x and 2.4.x Linux kernels. + +config BUSYBOX_CONFIG_FEATURE_2_6_MODULES + # Simulate indentation + bool " Support version 2.6.x Linux kernels" + default y + depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_RMMOD || BUSYBOX_CONFIG_MODPROBE + help + Support module loading for newer 2.6.x Linux kernels. + + +config BUSYBOX_CONFIG_FEATURE_QUERY_MODULE_INTERFACE + bool + default n + depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && !CONFIG_FEATURE_2_6_MODULES + endmenu diff --git a/package/busybox/config/networking/Config.in b/package/busybox/config/networking/Config.in index 996afb4473..14e6b5f79a 100644 --- a/package/busybox/config/networking/Config.in +++ b/package/busybox/config/networking/Config.in @@ -18,6 +18,25 @@ config BUSYBOX_CONFIG_ARPING help Ping hosts by ARP packets +config BUSYBOX_CONFIG_DNSD + bool "dnsd" + default n + help + Small and static DNS server deamon. + +config BUSYBOX_CONFIG_ETHER_WAKE + bool "ether-wake" + default n + help + Send a magic packet to wake up sleeping machines. + +config BUSYBOX_CONFIG_FAKEIDENTD + bool "fakeidentd" + default n + help + fakeidentd listens to the ident port and returns a set fake + value whatever it gets. + config BUSYBOX_CONFIG_FTPGET bool "ftpget" default n @@ -66,7 +85,6 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5 Enables basic per url authentication from /etc/httpd.conf using md5 passwords. - if !CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY config BUSYBOX_CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP bool " Support reloading the global config file using hup signal" @@ -101,7 +119,18 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_CGI depends on BUSYBOX_CONFIG_HTTPD help This option allows scripts and executables to be invoked - when specific urls are requested. + when specific urls are requested. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR + bool " Enable support for running scripts through an interpreter" + default n + depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI + help + This option enables support for running scripts through an + interpreter. Turn this on, if you want PHP scripts to work + properly. You need to supply an addition line in your httpd + config file: + *.php:/path/to/your/php config BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV bool " Support the REMOTE_PORT environment variable for CGI" @@ -171,6 +200,7 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS config BUSYBOX_CONFIG_IFUPDOWN bool "ifupdown" default n + select BUSYBOX_CONFIG_RUN_PARTS help Activate or deactivate the specified interfaces. This applet makes use of either "ifconfig" and "route" or the "ip" command to actually @@ -291,6 +321,13 @@ config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN help Familiar character generator internal inetd service +config BUSYBOX_CONFIG_FEATURE_INETD_RPC + bool " Support RPC services" + default n + depends on BUSYBOX_CONFIG_INETD + help + Suuport Sun-RPC based services + config BUSYBOX_CONFIG_IP bool "ip" @@ -406,7 +443,7 @@ config BUSYBOX_CONFIG_NAMEIF File fields are separated by space or tab. File format: # Comment - new_interface_name XX:XX:XX:XX:XX:XX + new_interface_name XX:XX:XX:XX:XX:XX config BUSYBOX_CONFIG_NC bool "nc" @@ -421,6 +458,14 @@ config BUSYBOX_CONFIG_NETMSG help simple program for sending udp broadcast messages +config BUSYBOX_CONFIG_NC_GAPING_SECURITY_HOLE + bool "gaping security hole" + default n + depends on BUSYBOX_CONFIG_NC + help + Add support for executing a program after making or receiving a + successful connection (-e option). + config BUSYBOX_CONFIG_NETSTAT bool "netstat" default y @@ -498,7 +543,6 @@ config BUSYBOX_CONFIG_FEATURE_TELNET_AUTOLOGIN config BUSYBOX_CONFIG_TELNETD bool "telnetd" default y - #select BUSYBOX_CONFIG_LOGIN help A daemon for the TELNET protocol, allowing you to log onto the host running the daemon. Please keep in mind that the TELNET protocol @@ -600,6 +644,22 @@ config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE Add some verbosity to traceroute. This includes amongst other things hostnames and ICMP response types. +config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE + bool " Enable loose source route" + default n + depends on BUSYBOX_CONFIG_TRACEROUTE + help + Add option to specify a loose source route gateway + (8 maximum). + +config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP + bool " Use ICMP instead of UDP" + default n + depends on BUSYBOX_CONFIG_TRACEROUTE + help + Add feature to allow for ICMP ECHO instead of UDP datagrams. + + config BUSYBOX_CONFIG_VCONFIG bool "vconfig" default y @@ -636,5 +696,16 @@ config BUSYBOX_CONFIG_FEATURE_WGET_IP6_LITERAL source package/busybox/config/networking/udhcp/Config.in +config BUSYBOX_CONFIG_ZCIP + bool "zcip" + default n + help + ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927. + It's a daemon that allocates and defends a dynamically assigned + address on the 169.254/16 network, requiring no system administrator. + + See http://www.zeroconf.org for further details, and "zcip.script" + in the busybox examples. + endmenu diff --git a/package/busybox/config/procps/Config.in b/package/busybox/config/procps/Config.in index 85328564a2..b94632b467 100644 --- a/package/busybox/config/procps/Config.in +++ b/package/busybox/config/procps/Config.in @@ -13,6 +13,14 @@ config BUSYBOX_CONFIG_FREE memory in the system, as well as the buffers used by the kernel. The shared memory column should be ignored; it is obsolete. +config BUSYBOX_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 BUSYBOX_CONFIG_KILL bool "kill" default y @@ -42,12 +50,37 @@ config BUSYBOX_CONFIG_PIDOF Pidof finds the process id's (pids) of the named programs. It prints those id's on the standard output. +config BUSYBOX_CONFIG_FEATURE_PIDOF_SINGLE + bool " Enable argument for single shot (-s)" + default n + depends on BUSYBOX_CONFIG_PIDOF + help + Support argument '-s' for returning only the first pid found. + +config BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT + bool " Enable argument for omitting pids (-o)" + default n + depends on BUSYBOX_CONFIG_PIDOF + help + Support argument '-o' for omitting the given pids in output. + The special pid %PPID can be used to name the parent process + of the pidof, in other words the calling shell or shell script. + config BUSYBOX_CONFIG_PS bool "ps" default y help ps gives a snapshot of the current processes. +config BUSYBOX_CONFIG_FEATURE_PS_WIDE + bool " Enable argument for wide output (-w)" + default n + depends on BUSYBOX_CONFIG_PS + help + Support argument 'w' for wide output. + If given once, 132 chars are printed and given more than + one, the length is unlimited. + config BUSYBOX_CONFIG_RENICE bool "renice" default n @@ -55,6 +88,12 @@ config BUSYBOX_CONFIG_RENICE Renice alters the scheduling priority of one or more running processes. +config BUSYBOX_CONFIG_BB_SYSCTL + bool "sysctl" + default y + help + Configure kernel parameters at runtime. + config BUSYBOX_CONFIG_TOP bool "top" default y @@ -62,8 +101,8 @@ config BUSYBOX_CONFIG_TOP The top program provides a dynamic real-time view of a running system. -config BUSYBOX_FEATURE_CPU_USAGE_PERCENTAGE - bool +config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE + bool " Support showing CPU usage percentage (add 2k bytes)" default y depends on BUSYBOX_CONFIG_TOP help @@ -77,11 +116,6 @@ config BUSYBOX_CONFIG_UPTIME the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes. -config BUSYBOX_CONFIG_BB_SYSCTL - bool "sysctl" - default y - help - sysctl - configure kernel parameters at runtime endmenu diff --git a/package/busybox/config/shell/Config.in b/package/busybox/config/shell/Config.in index 6ac4f69710..b9a1b4d7a3 100644 --- a/package/busybox/config/shell/Config.in +++ b/package/busybox/config/shell/Config.in @@ -3,7 +3,7 @@ # see scripts/kbuild/config-language.txt. # -menu "Another Bourne-like Shell" +menu "Shells" choice prompt "Choose your default shell" @@ -36,6 +36,7 @@ endchoice config BUSYBOX_CONFIG_ASH bool "ash" default y + select BUSYBOX_CONFIG_TEST help Tha 'ash' shell adds about 60k in the default configuration and is the most complete and most pedantically correct shell included with @@ -53,6 +54,23 @@ config BUSYBOX_CONFIG_ASH_JOB_CONTROL help Enable job control in the ash shell. +config BUSYBOX_CONFIG_ASH_READ_NCHARS + bool " Enable 'read -n N' and 'read -s' support" + default n + depends on BUSYBOX_CONFIG_ASH + help + 'read -n N' will return a value after N characters have been read. + 'read -s' will read without echoing the user's input. + +config BUSYBOX_CONFIG_ASH_READ_TIMEOUT + bool " Enable 'read -t S' support." + default y + depends on BUSYBOX_CONFIG_ASH + help + 'read -t S' will return a value after S seconds have passed. + This implementation will allow fractional seconds, expressed + as a decimal fraction, e.g. 'read -t 2.5 foo'. + config BUSYBOX_CONFIG_ASH_ALIAS bool " Enable alias support" default y @@ -92,6 +110,21 @@ config BUSYBOX_CONFIG_ASH_CMDCMD you to run the specified command with the specified arguments, even when there is an ash builtin command with the same name. +config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO + bool " Enable builtin version of 'echo'" + default y + depends on BUSYBOX_CONFIG_ASH + help + Enable support for echo, built in to ash. + +# this entry also appears in coreutils/Config.in, next to the echo applet +config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO + bool " Enable echo options (-n and -e)" + default y + depends on BUSYBOX_CONFIG_ASH_BUILTIN_ECHO + help + This adds options (-n and -e) to echo. + config BUSYBOX_CONFIG_ASH_MAIL bool " Check for new mail on interactive shells" default n @@ -104,7 +137,7 @@ config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE default y depends on BUSYBOX_CONFIG_ASH help - Compile ash for reduced size at price of speed. + Compile ash for reduced size at the price of speed. config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT bool " Enable pseudorandom generator and variable $RANDOM" @@ -117,9 +150,21 @@ config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT After "unset RANDOM" then generator will switch off and this variable will no longer have special treatment. +config BUSYBOX_CONFIG_ASH_EXPAND_PRMT + bool " Expand prompt string" + default n + depends on BUSYBOX_CONFIG_ASH + help + "PS#" may be contain volatile content, such as backquote commands. + This option recreates the prompt string from the environment + variable each time it is displayed. + config BUSYBOX_CONFIG_HUSH bool "hush" default n + select BUSYBOX_CONFIG_TRUE + select BUSYBOX_CONFIG_FALSE + select BUSYBOX_CONFIG_TEST help hush is a very small shell (just 18k) and it has fairly complete Bourne shell grammar. It even handles all the normal flow control @@ -134,6 +179,9 @@ config BUSYBOX_CONFIG_HUSH config BUSYBOX_CONFIG_LASH bool "lash" default n + select BUSYBOX_CONFIG_TRUE + select BUSYBOX_CONFIG_FALSE + select BUSYBOX_CONFIG_TEST help lash is the very smallest shell (adds just 10k) and it is quite usable as a command prompt, but it is not suitable for any but the @@ -146,6 +194,9 @@ config BUSYBOX_CONFIG_LASH config BUSYBOX_CONFIG_MSH bool "msh" default n + select BUSYBOX_CONFIG_TRUE + select BUSYBOX_CONFIG_FALSE + select BUSYBOX_CONFIG_TEST help The minix shell (adds just 30k) is quite complete and handles things like for/do/done, case/esac and all the things you expect a Bourne @@ -175,7 +226,7 @@ config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE_SHELL busybox to use the ifconfig busybox applet. Specifying the fully qualified executable name, such as '/sbin/ifconfig' will still execute the /sbin/ifconfig executable on the filesystem. This option - is generally used when creating a staticly linked version of busybox + is generally used when creating a statically linked version of busybox for use as a rescue shell, in the event that you screw up your system. Note that when using this option, the shell will attempt to directly @@ -190,6 +241,14 @@ config BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING help Enable command editing in shell. +config BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING_VI + bool "vi-style line editing commands" + default n + depends on BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING + help + Enable vi-style line editing in the shell. This mode can be + turned on and off with "set -o vi" and "set +o vi". + config BUSYBOX_CONFIG_FEATURE_COMMAND_HISTORY int "history size" default 15 diff --git a/package/busybox/config/util-linux/Config.in b/package/busybox/config/util-linux/Config.in index af47358573..474ef02f0d 100644 --- a/package/busybox/config/util-linux/Config.in +++ b/package/busybox/config/util-linux/Config.in @@ -5,7 +5,6 @@ menu "Linux System Utilities" - config BUSYBOX_CONFIG_DMESG bool "dmesg" default y @@ -27,7 +26,6 @@ config BUSYBOX_CONFIG_FBSET interface to access a graphics display. Enable this option if you wish to enable the 'fbset' utility. - config BUSYBOX_CONFIG_FEATURE_FBSET_FANCY bool " Turn on extra fbset options" default n @@ -210,6 +208,35 @@ config BUSYBOX_CONFIG_FEATURE_HWCLOCK_LONGOPTIONS are overly fond of its long options, such as --hctosys, --utc, etc) then enable this option. +config BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS + bool " Use FHS /var/lib/hwclock/adjtime" + default n + depends on BUSYBOX_CONFIG_HWCLOCK + help + Starting with FHS 2.3, the adjtime state file is supposed to exist + at /var/lib/hwclock/adjtime instead of /etc/adjtime. If you wish + to use the FHS behavior, answer Y here, otherwise answer N for the + classic /etc/adjtime path. + + http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO + +config BUSYBOX_CONFIG_IPCRM + bool "ipcrm" + default n + select BUSYBOX_CONFIG_FEATURE_SUID + help + The ipcrm utility allows the removal of System V interprocess + communication (IPC) objects and the associated data structures + from the system. + +config BUSYBOX_CONFIG_IPCS + bool "ipcs" + default n + select BUSYBOX_CONFIG_FEATURE_SUID + help + The ipcs utility is used to provide information on the currently + allocated System V interprocess (IPC) objects in the system. + config BUSYBOX_CONFIG_LOSETUP bool "losetup" default n @@ -218,6 +245,36 @@ config BUSYBOX_CONFIG_LOSETUP file or block device, and to query the status of a loop device. This version does not currently support enabling data encryption. +config BUSYBOX_CONFIG_MDEV + bool "mdev" + default n + help + mdev is a mini-udev implementation: call it with -s to populate + /dev from /sys, then "echo /sbin/mdev > /proc/sys/kernel/hotplug" to + have it handle hotplug events afterwards. Device names are taken + from sysfs. + +config BUSYBOX_CONFIG_FEATURE_MDEV_CONF + bool " Support /etc/mdev.conf" + default n + depends on BUSYBOX_CONFIG_MDEV + help + The mdev config file contains lines that look like: + + hd[a-z][0-9]* 0:3 660 + + That's device name (with regex match), uid:gid, and permissions. + + Optionally, that can be followed (on the same line) by an asterisk + and a command line to run after creating the corresponding device(s), + ala: + + hdc root:cdrom 660 *ln -s hdc cdrom + + Config file parsing stops on the first matching line. If no config + entry is matched, devices are created with default 0:0 660. (Make + the last line match .* to override this.) + config BUSYBOX_CONFIG_MKSWAP bool "mkswap" default n @@ -252,6 +309,24 @@ config BUSYBOX_CONFIG_FEATURE_USE_TERMIOS will be unable to determine the current screen size, and will be unable to move the cursor. +config BUSYBOX_CONFIG_MOUNT + bool "mount" + default y + help + All files and filesystems in Unix are arranged into one big directory + tree. The 'mount' utility is used to graft a filesystem onto a + particular part of the tree. A filesystem can either live on a block + device, or it can be accessible over the network, as is the case with + NFS filesystems. Most people using BusyBox will also want to enable + the 'mount' utility. + +config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS + bool " Support mounting NFS file systems" + default y + depends on BUSYBOX_CONFIG_MOUNT + help + Enable mounting of NFS file systems. + config BUSYBOX_CONFIG_PIVOT_ROOT bool "pivot_root" default y @@ -261,6 +336,9 @@ config BUSYBOX_CONFIG_PIVOT_ROOT of wild and crazy things with your Linux system and is far more powerful than 'chroot'. + Note: This is for initrd in linux 2.4. Under initramfs (introduced + in linux 2.6) use switch_root instead. + config BUSYBOX_CONFIG_RDATE bool "rdate" default y @@ -270,6 +348,21 @@ config BUSYBOX_CONFIG_RDATE the RFC868 protocol, which is built into the inetd daemon on most systems. +config BUSYBOX_CONFIG_READPROFILE + bool "readprofile" + default n + help + This allows you to parse /proc/profile for basic profiling. + +config BUSYBOX_CONFIG_SETARCH + bool "setarch" + default n + help + The linux32 utility is used to create a 32bit environment for the + specified program (usually a shell). It only makes sense to have + this util on a system that supports both 64bit and 32bit userland + (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...). + config BUSYBOX_CONFIG_SWAPONOFF bool "swaponoff" default n @@ -281,23 +374,24 @@ config BUSYBOX_CONFIG_SWAPONOFF space. If you are not using any swap space, you can leave this option disabled. -config BUSYBOX_CONFIG_MOUNT - bool "mount" +config BUSYBOX_CONFIG_SWITCH_ROOT + bool "switch_root" default y help - All files and filesystems in Unix are arranged into one big directory - tree. The 'mount' utility is used to graft a filesystem onto a - particular part of the tree. A filesystem can either live on a block - device, or it can be accessible over the network, as is the case with - NFS filesystems. Most people using BusyBox will also want to enable - the 'mount' utility. + The switch_root utility is used from initramfs to select a new + root device. Under initramfs, you have to use this instead of + pivot_root. (Stop reading here if you don't care why.) -config BUSYBOX_FEATURE_MOUNT_NFS - bool " Support mounting NFS file systems" - default y - depends on BUSYBOX_CONFIG_MOUNT - help - Enable mounting of NFS file systems. + Booting with initramfs extracts a gzipped cpio archive into rootfs + (which is a variant of ramfs/tmpfs). Because rootfs can't be moved + or unmounted*, pivot_root will not work from initramfs. Instead, + switch_root deletes everything out of rootfs (including itself), + does a mount --move that overmounts rootfs with the new root, and + then execs the specified init program. + + * Because the Linux kernel uses rootfs internally as the starting + and ending point for searching through the kernel's doubly linked + list of active mount points. That's why. config BUSYBOX_CONFIG_UMOUNT bool "umount" @@ -308,50 +402,50 @@ config BUSYBOX_CONFIG_UMOUNT the tool to use. If you enabled the 'mount' utility, you almost certainly also want to enable 'umount'. -config BUSYBOX_CONFIG_FEATURE_MOUNT_FORCE - bool " Support forced filesystem unmounting" +config BUSYBOX_CONFIG_FEATURE_UMOUNT_ALL + bool " umount -a option" default y depends on BUSYBOX_CONFIG_UMOUNT help - This allows you to _force_ a filesystem to be umounted. This is generally - only useful when you want to get rid of an unreachable NFS system. + Support -a option to unmount all currently mounted filesystems. comment "Common options for mount/umount" depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT config BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP - bool " Support for loop devices" + bool " Support loopback mounts" default y depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT help - Enabling this feature allows mount to use the '-o' loop options, - which lets you loop mount files. Mount will automagically setup and - free the necessary loop devices so you do not need to mess with the - 'losetup' utility unless you really want to. This is really - only useful if you plan to loop mount files. + Enabling this feature allows automatic mounting of files (containing + filesystem images) via the linux kernel's loopback devices. The mount + command will detect you are trying to mount a file instead of a block + device, and transparently associate the file with a loopback device. + The umount command will also free that loopback device. + + You can still use the 'losetup' utility (to manually associate files + with loop devices) if you need to do something advanced, such as + specify an offset or cryptographic options to the loopback device. + (If you don't want umount to free the loop device, use "umount -D".) config BUSYBOX_CONFIG_FEATURE_MTAB_SUPPORT - bool " Support for a real /etc/mtab (instead of /proc/mounts)" + bool " Support for the old /etc/mtab file" default n depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT help - If your root filesystem is writable and you wish to have the 'mount' - utility create an mtab file listing the filesystems which have been - mounted then you should enable this option. Most people that use - BusyBox have a read-only root filesystem, so they will leave this - option disabled and BusyBox will use the /proc/mounts file. - -config BUSYBOX_CONFIG_FEATURE_MTAB_FILENAME - string " mtab file location" - default n - depends on BUSYBOX_CONFIG_FEATURE_MTAB_SUPPORT - help - Some people have a read only root filesystem, but they also wish to - have the 'mount' utility create an mtab file listing the filesystems - which have been mounted. This option allows you to specify an alternative - location for the mtab file, such as /var/mtab, or /tmp/mtab. The default - value is /etc/mtab, which is where this file is located on most desktop - Linux systems. + Historically, Unix systems kept track of the currently mounted + partitions in the file "/etc/mtab". These days, the kernel exports + the list of currently mounted partitions in "/proc/mounts", rendering + the old mtab file obsolete. (In modern systems, /etc/mtab should be + a symlink to /proc/mounts.) + + The only reason to have mount maintain an /etc/mtab file itself is if + your stripped-down embedded system does not have a /proc directory. + If you must use this, keep in mind it's inherently brittle (for + example a mount under chroot won't update it), can't handle modern + features like separate per-process filesystem namespaces, requires + that your /etc directory be writeable, tends to get easily confused + by --bind or --move mounts, and so on. (In brief: avoid.) endmenu -- cgit v1.2.3 From 676c017ecfced2e37aeec176f8aa6b9df90024f3 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 5 Apr 2006 02:09:22 +0000 Subject: large init script cleanup and merge of whiterussian changes, new dnsmasq config handling git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3588 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/Config.in | 3 - package/Sysconf.in | 31 ---- package/base-files/Makefile | 12 +- package/base-files/default/bin/firstboot | 134 ++++++++++------- package/base-files/default/bin/ipcalc | 32 ++++ package/base-files/default/bin/login | 12 +- package/base-files/default/etc/firewall.user | 29 ---- package/base-files/default/etc/functions.sh | 26 ---- .../base-files/default/etc/hotplug.d/net/10-net | 85 +++++------ package/base-files/default/etc/init.d/S10boot | 9 +- package/base-files/default/etc/init.d/S40network | 16 -- package/base-files/default/etc/init.d/S45firewall | 96 ------------ package/base-files/default/etc/init.d/S50telnet | 2 +- package/base-files/default/etc/init.d/S60cron | 8 +- package/base-files/default/etc/init.d/S98done | 9 ++ package/base-files/default/etc/init.d/S99done | 4 - package/base-files/default/etc/init.d/rcS | 10 +- package/base-files/default/etc/inittab | 1 - package/base-files/default/etc/preinit | 23 +-- package/base-files/default/sbin/halt | 3 - package/base-files/default/sbin/hotplug | 10 +- package/base-files/default/sbin/ifdown | 16 +- package/base-files/default/sbin/ifup | 22 +-- package/base-files/default/sbin/mount_root | 40 +++-- package/base-files/default/usr/lib/common.awk | 66 ++++++++ .../base-files/default/usr/lib/parse-config.awk | 40 +++++ .../default/usr/share/udhcpc/default.script | 37 +++-- package/busybox/config/miscutils/Config.in | 6 + package/busybox/config/networking/Config.in | 4 +- package/busybox/patches/220-awk_bitops.patch | 61 ++++++++ package/busybox/patches/230-passwd_salt.patch | 13 ++ package/busybox/patches/340-lock_util.patch | 167 +++++++++++++++++++++ package/dnsmasq/Makefile | 2 +- package/dnsmasq/files/S50dnsmasq | 30 ---- package/dnsmasq/files/dnsmasq.conf | 8 +- package/dnsmasq/files/dnsmasq.init | 45 ++++++ package/ez-ipupdate/files/ez-ipupdate.hotplug | 6 +- package/iptables/Makefile | 7 + package/iptables/files/firewall.awk | 64 ++++++++ package/iptables/files/firewall.config | 46 ++++++ package/iptables/files/firewall.init | 95 ++++++++++++ package/iptables/files/firewall.user | 31 ++++ package/linux-atm/files/br2684.init | 8 +- package/mtd/mtd.c | 17 ++- package/ntpclient/files/ntpclient.init | 3 +- package/parprouted/files/parprouted.default | 4 +- package/ppp/files/ifup.pppoa | 29 ++-- package/ppp/files/ifup.pppoe | 27 ++-- package/pptp/files/ifup.pptp | 41 ++--- .../base-files/files/ar7-2.4/etc/network.overrides | 28 ---- .../files/aruba-2.6/etc/network.overrides | 26 ---- .../base-files/files/brcm-2.4/etc/init.d/S04nvram | 66 ++++++++ .../files/brcm-2.4/etc/init.d/S05netconfig | 4 +- .../base-files/files/brcm-2.4/etc/init.d/S05nvram | 166 -------------------- .../files/brcm-2.4/etc/network.overrides | 41 ----- .../files/brcm-2.6/etc/init.d/S05netconfig | 4 +- .../files/brcm-2.6/etc/network.overrides | 31 ---- .../base-files/files/x86-2.4/etc/network.overrides | 26 ---- .../base-files/files/x86-2.6/etc/network.overrides | 26 ---- 59 files changed, 1022 insertions(+), 886 deletions(-) delete mode 100644 package/Sysconf.in create mode 100755 package/base-files/default/bin/ipcalc delete mode 100755 package/base-files/default/etc/firewall.user delete mode 100755 package/base-files/default/etc/init.d/S40network delete mode 100755 package/base-files/default/etc/init.d/S45firewall create mode 100755 package/base-files/default/etc/init.d/S98done delete mode 100755 package/base-files/default/etc/init.d/S99done delete mode 100755 package/base-files/default/sbin/halt create mode 100644 package/base-files/default/usr/lib/common.awk create mode 100644 package/base-files/default/usr/lib/parse-config.awk create mode 100644 package/busybox/patches/220-awk_bitops.patch create mode 100644 package/busybox/patches/230-passwd_salt.patch create mode 100644 package/busybox/patches/340-lock_util.patch delete mode 100755 package/dnsmasq/files/S50dnsmasq create mode 100644 package/dnsmasq/files/dnsmasq.init create mode 100644 package/iptables/files/firewall.awk create mode 100644 package/iptables/files/firewall.config create mode 100755 package/iptables/files/firewall.init create mode 100755 package/iptables/files/firewall.user delete mode 100644 target/linux/package/base-files/files/ar7-2.4/etc/network.overrides delete mode 100644 target/linux/package/base-files/files/aruba-2.6/etc/network.overrides create mode 100755 target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram delete mode 100755 target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram delete mode 100644 target/linux/package/base-files/files/brcm-2.4/etc/network.overrides delete mode 100644 target/linux/package/base-files/files/brcm-2.6/etc/network.overrides delete mode 100644 target/linux/package/base-files/files/x86-2.4/etc/network.overrides delete mode 100644 target/linux/package/base-files/files/x86-2.6/etc/network.overrides (limited to 'package/busybox/config/networking/Config.in') diff --git a/package/Config.in b/package/Config.in index 55fdba073a..619578024e 100644 --- a/package/Config.in +++ b/package/Config.in @@ -333,6 +333,3 @@ config BR2_PACKAGE_IMAGEBUILDER endmenu -source "package/Sysconf.in" - - diff --git a/package/Sysconf.in b/package/Sysconf.in deleted file mode 100644 index 6c0cac3cd8..0000000000 --- a/package/Sysconf.in +++ /dev/null @@ -1,31 +0,0 @@ -# - -menu "Runtime Configuration" - choice - bool "Telnet access" - default BR2_SYSCONF_TELNET_FAILSAFE_ONLY - - config BR2_SYSCONF_TELNET_FAILSAFE_ONLY - bool "open, failsafe only" - - config BR2_SYSCONF_TELNET_OPEN - bool "open" - - endchoice - - menu "Failsafe configuration" - - config BR2_SYSCONF_FAILSAFE_IP - string "IP Address" - default "192.168.1.1" - - config BR2_SYSCONF_FAILSAFE_NETMASK - string "Netmask" - default "255.255.255.0" - - config BR2_SYSCONF_FAILSAFE_MAC - string "MAC Address" - default "00:00:BA:DC:0D:ED" - - endmenu -endmenu diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 1fb0c14498..8517dcc685 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -55,23 +55,25 @@ $(IPKG_BASE): $(CP) ./default/* $(IDIR_BASE) $(SED) 's,$$R,r$(REV),g' $(IDIR_BASE)/etc/banner $(SED) 's,$$S,$(BOARD)-$(KERNEL),g' $(IDIR_BASE)/etc/ipkg.conf - mkdir -p $(IDIR_BASE)/sys - mkdir -p $(IDIR_BASE)/jffs mkdir -p $(IDIR_BASE)/dev + mkdir -p $(IDIR_BASE)/etc/crontabs + mkdir -p $(IDIR_BASE)/jffs + mkdir -p $(IDIR_BASE)/lib + mkdir -p $(IDIR_BASE)/mnt mkdir -p $(IDIR_BASE)/proc mkdir -p $(IDIR_BASE)/tmp - mkdir -p $(IDIR_BASE)/lib mkdir -p $(IDIR_BASE)/usr/lib mkdir -p $(IDIR_BASE)/usr/bin + mkdir -p $(IDIR_BASE)/sys + mkdir -p $(IDIR_BASE)/www ln -sf /tmp/resolv.conf $(IDIR_BASE)/etc/resolv.conf ln -sf /proc/mounts $(IDIR_BASE)/etc/mtab - rm -rf $(IDIR_BASE)/var + rm -f $(IDIR_BASE)/var ln -sf /tmp $(IDIR_BASE)/var -find $(IDIR_BASE) -type d -name CVS | xargs rm -rf -find $(IDIR_BASE) -type d -name .svn | xargs rm -rf -find $(IDIR_BASE) -name '.#*' | xargs rm -f mkdir -p $(IDIR_BASE)/etc - -grep \^BR2_SYSCONF $(TOPDIR)/.config > $(IDIR_BASE)/etc/sysconf $(IPKG_BUILD) $(IDIR_BASE) $(PACKAGE_DIR) $(IPKG_UCLIBC): diff --git a/package/base-files/default/bin/firstboot b/package/base-files/default/bin/firstboot index eff7063b1c..1d9b658b69 100755 --- a/package/base-files/default/bin/firstboot +++ b/package/base-files/default/bin/firstboot @@ -1,62 +1,88 @@ #!/bin/sh # $Id$ -mount | grep squashfs >&- || { - echo "You do not have a squashfs partition; aborting" - echo "(firstboot cannot be run on jffs2 based firmwares)" - return +rom=$(awk '/squashfs/ {print $2}' /proc/mounts) +jffs=$(awk '/jffs2/ {print $2}' /proc/mounts) + +dupe() { # + cd $1 + echo -n "creating directories... " + { + cd $2 + find . -xdev -type d + echo "./dev ./jffs ./mnt ./proc ./tmp ./sys" + # xdev skips mounted directories + cd $1 + } | xargs mkdir -p + echo "done" + + echo -n "setting up symlinks... " + for file in $(cd $2; find . -xdev -type f;); do + case "$file" in + "./rom/note") ;; #nothing + "./etc/config"|\ + "./etc/resolv.conf"|\ + "./usr/lib/ipkg/info") cp -af $2/$file $file;; + *) ln -sf /rom/${file#./*} $file;; + esac + done + for file in $(cd $2; find . -xdev -type l;); do + cp -af $2/${file#./*} $file + done + echo "done" } -[ -f "/tmp/.firstboot" ] && { - echo "firstboot is already running" - return +pivot() { # + mount -o move /proc $1/proc && \ + pivot_root $1 $1$2 && { + mount -o move $2/dev /dev + mount -o move $2/tmp /tmp + } } -touch /tmp/.firstboot -jdev=$(mount | awk '/jffs2/ {print $3}') +mountdp() { # + dev=$1; mnt=$2; shift 2; opt=$* + mount $dev $mnt $opt + dupe $mnt $rom + pivot $mnt /rom +} -if [ -z "$jdev" ]; then - echo -n "Creating jffs2 partition... " - mtd erase OpenWrt >&- 2>&- - mount -t jffs2 /dev/mtdblock/4 /jffs - echo "done" - cd /jffs -else - echo "firstboot has already been run" - echo "jffs2 partition is mounted, only resetting files" - cd $jdev -fi - -exec 2>/dev/null - -mount /dev/mtdblock/2 /rom -o ro - -echo -n "creating directories... " -{ - cd /rom - find . -type d - cd - -} | xargs mkdir -echo "done" - -echo -n "setting up symlinks... " -for file in $(cd /rom; find * -type f; find * -type l;) -do { - case "${file%/*}" in - "usr/lib/ipkg/info"|"etc/config") cp -f /rom/$file $file;; - *) ln -sf /rom/$file $file;; - esac -} done -echo "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 +ramoverlay() { + mkdir -p /tmp/root + mountdp /tmp/root /mnt -o bind +} + +[ "${0##*/}" = "firstboot" ] && { + [ -z "$rom" ] && { + echo "You do not have a squashfs partition; aborting" + echo "(firstboot cannot be run on jffs2 based firmwares)" + exit 1 + } + + [ "$1" = "switch2jffs" ] && { + mtd erase OpenWrt + mount -o remount,ro none / # try to avoid fs changing while copying + mount -o bind / /mnt + mount /dev/mtdblock/4 /rom/jffs -t jffs2 + echo -n "copying files ... " + cp -a /mnt/* /rom/jffs + umount /mnt + echo "done" + pivot /rom /mnt + mount -o move /mnt /tmp/root + pivot /jffs /rom + jffs2root --clean + exit 0 + } + + # script run manually + [ \! -z "$jffs" ] && { + echo "firstboot has already been run" + echo "jffs2 partition is mounted, only resetting files" + dupe $jffs $rom + exit 0 + } + + mtd erase OpenWrt + mountdp /dev/mtdblock/4 /jffs -t jffs2 +} diff --git a/package/base-files/default/bin/ipcalc b/package/base-files/default/bin/ipcalc new file mode 100755 index 0000000000..318980e5a2 --- /dev/null +++ b/package/base-files/default/bin/ipcalc @@ -0,0 +1,32 @@ +#!/bin/sh + +awk -f /usr/lib/common.awk -f - $* <limit) end=limit + + print "IP="int2ip(ipaddr) + print "NETMASK="int2ip(netmask) + print "BROADCAST="int2ip(broadcast) + print "NETWORK="int2ip(network) + print "PREFIX="32-bitcount(compl(netmask)) + + # range calculations: + # ipcalc + + if (ARGC > 3) { + print "START="int2ip(start) + print "END="int2ip(end) + } +} +EOF diff --git a/package/base-files/default/bin/login b/package/base-files/default/bin/login index bb065e54a1..8f9281726d 100755 --- a/package/base-files/default/bin/login +++ b/package/base-files/default/bin/login @@ -1,20 +1,16 @@ #!/bin/sh -. /etc/sysconf 2>&- - -[ "$FAILSAFE" != "true" ] && -[ "$BR2_SYSCONF_TELNET_FAILSAFE_ONLY" = "y" ] && +grep '^root:[^!]' /etc/passwd >&- 2>&- +[ "$?" = "0" -a -z "$FAILSAFE" ] && { - grep '^root:[^!]' /etc/passwd >&- 2>&- && - { echo "Login failed." exit 0 - } || { +} || { cat << EOF === IMPORTANT ============================ Use 'passwd' to set your login password this will disable telnet and enable SSH ------------------------------------------ EOF - } } + exec /bin/ash --login diff --git a/package/base-files/default/etc/firewall.user b/package/base-files/default/etc/firewall.user deleted file mode 100755 index 5774f0c64a..0000000000 --- a/package/base-files/default/etc/firewall.user +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -. /etc/functions.sh -. /etc/network.overrides -[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network - -WAN=$(nvram get wan_ifname) -LAN=$(nvram get lan_ifname) - -iptables -F input_rule -iptables -F output_rule -iptables -F forwarding_rule -iptables -t nat -F prerouting_rule -iptables -t nat -F postrouting_rule - -### BIG FAT DISCLAIMER -### The "-i $WAN" literally means packets that came in over the $WAN interface; -### this WILL NOT MATCH packets sent from the LAN to the WAN address. - -### Allow SSH on the WAN interface -# iptables -t nat -A prerouting_rule -i $WAN -p tcp --dport 22 -j ACCEPT -# iptables -A input_rule -i $WAN -p tcp --dport 22 -j ACCEPT - -### Port forwarding -# iptables -t nat -A prerouting_rule -i $WAN -p tcp --dport 22 -j DNAT --to 192.168.1.2 -# iptables -A forwarding_rule -i $WAN -p tcp --dport 22 -d 192.168.1.2 -j ACCEPT - -### DMZ (should be placed after port forwarding / accept rules) -# iptables -t nat -A prerouting_rule -i $WAN -j DNAT --to 192.168.1.2 -# iptables -A forwarding_rule -i $WAN -d 192.168.1.2 -j ACCEPT diff --git a/package/base-files/default/etc/functions.sh b/package/base-files/default/etc/functions.sh index e7126473f4..526ca52dda 100755 --- a/package/base-files/default/etc/functions.sh +++ b/package/base-files/default/etc/functions.sh @@ -1,6 +1,4 @@ #!/bin/sh -. /etc/nvram.sh - alias debug=${DEBUG:-:} # valid interface? @@ -13,27 +11,3 @@ if_valid () ( hotplug_dev() { env -i ACTION=$1 INTERFACE=$2 /sbin/hotplug net } - -bitcount () { - local c=$1 - echo $(( - c=((c>> 1)&0x55555555)+(c&0x55555555), - c=((c>> 2)&0x33333333)+(c&0x33333333), - c=((c>> 4)&0x0f0f0f0f)+(c&0x0f0f0f0f), - c=((c>> 8)&0x00ff00ff)+(c&0x00ff00ff), - c=((c>>16)&0x0000ffff)+(c&0x0000ffff) - )) -} - -valid_netmask () { - return $((-($1)&~$1)) -} - -ip2int () ( - set $(echo $1 | tr '\.' ' ') - echo $(($1<<24|$2<<16|$3<<8|$4)) -) - -int2ip () { - echo $(($1>>24&255)).$(($1>>16&255)).$(($1>>8&255)).$(($1&255)) -} diff --git a/package/base-files/default/etc/hotplug.d/net/10-net b/package/base-files/default/etc/hotplug.d/net/10-net index 0f384ec46b..4bb69378ff 100644 --- a/package/base-files/default/etc/hotplug.d/net/10-net +++ b/package/base-files/default/etc/hotplug.d/net/10-net @@ -1,32 +1,28 @@ #!/bin/sh -setup_eth() -{ - for part in $(nvram get unused_ifnames); do - [ "$part" = "$INTERFACE" ] && exit 0 - done - ifconfig "$INTERFACE" up 2>&- >&- -} - find_name() { - pppoa_ifname="atm0" # hack for ppp over atm, which has no ${proto}_ifname - interfaces="lan wan wifi $(nvram get ifnames)" - for ifname in $interfaces; do + for ifname in lan wan wifi ${ifnames}; do IFTYPE="${ifname}" - IFPROTO="$(nvram get ${IFTYPE}_proto)" - IFACE="$(nvram get ${IFTYPE}_ifname)" + eval "IFPROTO=\"\${${IFTYPE}_proto}\"" + eval "IFACE=\"\${${IFTYPE}_ifname}\"" case "$IFPROTO" in ""|none);; static|dhcp) [ "${IFACE}" = "$INTERFACE" ] && return 0 [ "${IFACE%%[0-9]*}" = "br" ] && { - for part in $(nvram get ${IFTYPE}_ifnames); do + eval "ifs=\"\${${IFTYPE}_ifnames}\"" + for part in $ifs; do [ "$part" = "$INTERFACE" ] && return 0 done } ;; + pppoa) + [ "$INTERFACE" = "atm0" \ + -a -x /sbin/ifup.${IFPROTO} ] && return 0 + ;; *) - [ "$(nvram get ${IFTYPE}_device)" = "$INTERFACE" \ + eval "device=\"\${${IFTYPE}_device}\"" + [ "$device" = "$INTERFACE" \ -a -x /sbin/ifup.${IFPROTO} ] && return 0 ;; esac @@ -39,17 +35,18 @@ find_name() do_ifup() { if="$3" - if_proto="$(nvram get ${2}_proto)" + eval "if_proto=\"\${${2}_proto}\"" pidfile=/var/run/${if}.pid [ -f $pidfile ] && $DEBUG kill $(cat $pidfile) case "$1" in static) - ip=$(nvram get ${2}_ipaddr) - ip6=$(nvram get ${2}_ip6addr) - netmask=$(nvram get ${2}_netmask) - gateway=$(nvram get ${2}_gateway) + eval "ip=\"\${${2}_ipaddr}\"" + eval "ip6=\"\${${2}_ip6addr}\"" + eval "netmask=\"\${${2}_netmask}\"" + eval "gateway=\"\${${2}_gateway}\"" + eval "dns=\"\${${2}_dns}\"" $DEBUG ifconfig $if $ip ${netmask:+netmask $netmask} broadcast + up [ -n "$ip6" ] && $DEBUG ifconfig $if add $ip6 @@ -58,24 +55,25 @@ do_ifup() { [ -f /tmp/resolv.conf ] || { debug "# --- creating /tmp/resolv.conf ---" - for dns in $(nvram get ${2}_dns); do - echo "nameserver $dns" >> /tmp/resolv.conf + for ns in $dns; do + echo "nameserver $ns" >> /tmp/resolv.conf done } env -i ACTION="ifup" INTERFACE="${2}" PROTO=static /sbin/hotplug "iface" & ;; dhcp) - DHCP_IP=$(nvram get ${2}_ipaddr) - DHCP_NETMASK=$(nvram get ${2}_netmask) + eval "ip=\"\${${2}_ipaddr}\"" + eval "netmask=\"\${${2}_netmask}\"" + eval "hostname=\"\${${2}_hostname}\"" + $DEBUG ifconfig $if $ip ${netmask:+netmask $netmask} broadcast + up - DHCP_ARGS="-i $if ${DHCP_IP:+-r $DHCP_IP} -b -p $pidfile" - DHCP_HOSTNAME=$(nvram get ${2}_hostname) - DHCP_HOSTNAME=${DHCP_HOSTNAME%%.*} - [ -z $DHCP_HOSTNAME ] || DHCP_ARGS="$DHCP_ARGS -H $DHCP_HOSTNAME" - [ "$if_proto" = "pptp" ] && DHCP_ARGS="$DHCP_ARGS -n -q" || DHCP_ARGS="$DHCP_ARGS -R &" - ${DEBUG:-eval} "udhcpc $DHCP_ARGS" + args="-i $if ${ip:+-r $ip} -b -p $pidfile" + hostname="${hostname%%.*}" + args="$args${hostname:+ -H $hostname}" + [ "$if_proto" = "pptp" ] && args="$args -n -q" || args="$args -R &" + ${DEBUG:-eval} "udhcpc $args" # hotplug events are handled by /usr/share/udhcpc/default.script ;; *) @@ -88,25 +86,23 @@ do_ifup() { do_register() { - case "${INTERFACE%%[0-9]*}" in - eth) setup_eth;; - esac - [ -z "$IFTYPE" -o -z "$IFPROTO" ] && { find_name || { case "${INTERFACE%%[0-9]*}" in wds) - for tmp in lan wifi; do - [ -z "$IFPROTO" ] && [ "$(nvram get ${tmp}_ifname)" = "br0" ] && { - IFPROTO="$(nvram get ${tmp}_proto)" + for ifname in lan wifi; do + eval "if=\"\${${ifname}_ifname}\"" + [ -z "$IFPROTO" ] && [ "$if" = "br0" ] && { + eval "IFPROTO=\"\${${2}_proto}\"" IFTYPE="${tmp}" } done [ -z "$IFPROTO" ] && return 0 ;; atm) - for tmp in lan wan wifi $(nvram get ifnames); do - [ "$(nvram get ${tmp}_proto)" = "pppoa" ] && { + for tmp in lan wan wifi ${ifnames}; do + eval "if_proto=\"\${${2}_proto}\"" + [ "$if_proto" = "pppoa" ] && { do_ifup "pppoa" "$tmp" "$INTERFACE" return 0 } @@ -122,16 +118,16 @@ do_register() case "${INTERFACE%%[0-9]*}" in ppp|atm);; *) - mac=$(nvram get ${IFTYPE}_hwaddr) + eval "mac=\"\${${IFTYPE}_hwaddr}\"" ${mac:+$DEBUG ifconfig $INTERFACE down hw ether $mac} ;; esac - if="$(nvram get ${IFTYPE}_ifname)" + eval "if=\"\${${IFTYPE}_ifname}\"" if [ "${if%%[0-9]}" = "br" ]; then if_valid "$INTERFACE" && { ifconfig "$if" 2>&- >&- || { - stp=$(nvram get ${IFTYPE}_stp) + eval "stp=\"\${${IFTYPE}_stp}\"" $DEBUG brctl addbr "$if" $DEBUG brctl setfd "$if" 0 $DEBUG brctl stp "$if" "${stp:-0}" @@ -151,8 +147,9 @@ do_register() } do_unregister() { - [ -z "$IFTYPE" -o -z "$IFPROTO" ] && find_name - [ -z "$IFTYPE" -o -z "$IFPROTO" ] && return 0 + [ -z "$IFTYPE" -o -z "$IFPROTO" ] && { + find_name || return 0 + } [ "${IFACE%%[0-9]*}" = "br" ] && { if [ "$INTERFACE" != "$IFACE" ]; then diff --git a/package/base-files/default/etc/init.d/S10boot b/package/base-files/default/etc/init.d/S10boot index 02fddee7ba..0cc519d8eb 100755 --- a/package/base-files/default/etc/init.d/S10boot +++ b/package/base-files/default/etc/init.d/S10boot @@ -1,14 +1,9 @@ #!/bin/sh -. /etc/nvram.sh - -[ "$(uname -r|grep -c 2.4)" = "1" ] && { - echo "S" > /proc/jffs2_bbc -} +[ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc vconfig set_name_type VLAN_PLUS_VID_NO_PAD -HOSTNAME=$(nvram get wan_hostname) -HOSTNAME=${HOSTNAME%%.*} +HOSTNAME=${wan_hostname%%.*} echo ${HOSTNAME:=OpenWrt}>/proc/sys/kernel/hostname mkdir -p /var/run diff --git a/package/base-files/default/etc/init.d/S40network b/package/base-files/default/etc/init.d/S40network deleted file mode 100755 index 168fd2979b..0000000000 --- a/package/base-files/default/etc/init.d/S40network +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -. /etc/functions.sh -[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network -case "$1" in - start|restart) -# ifup lan -# ifup wan -# ifup wifi -# wifi up - - for route in $(nvram get static_route); do { - eval "set $(echo $route | sed 's/:/ /g')" - $DEBUG route add -net $1 netmask $2 gw $3 metric $4 dev $5 - } done - ;; -esac diff --git a/package/base-files/default/etc/init.d/S45firewall b/package/base-files/default/etc/init.d/S45firewall deleted file mode 100755 index 8c67d82b18..0000000000 --- a/package/base-files/default/etc/init.d/S45firewall +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh - -## Please make changes in /etc/firewall.user -${FAILSAFE:+exit} - -. /etc/functions.sh -. /etc/network.overrides -[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network - -WAN=$(nvram get wan_ifname) -LAN=$(nvram get lan_ifname) - -## CLEAR TABLES -for T in filter nat; do - iptables -t $T -F - iptables -t $T -X -done - -iptables -N input_rule -iptables -N output_rule -iptables -N forwarding_rule - -iptables -t nat -N prerouting_rule -iptables -t nat -N postrouting_rule - -### INPUT -### (connections with the router as destination) - - # base case - iptables -P INPUT DROP - iptables -A INPUT -m state --state INVALID -j DROP - iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT - iptables -A INPUT -p tcp --tcp-flags SYN SYN --tcp-option \! 2 -j DROP - - # - # insert accept rule or to jump to new accept-check table here - # - iptables -A INPUT -j input_rule - - # allow - iptables -A INPUT ${WAN:+-i \! $WAN} -j ACCEPT # allow from lan/wifi interfaces - iptables -A INPUT -p icmp -j ACCEPT # allow ICMP - iptables -A INPUT -p gre -j ACCEPT # allow GRE - - # reject (what to do with anything not allowed earlier) - iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset - iptables -A INPUT -j REJECT --reject-with icmp-port-unreachable - -### OUTPUT -### (connections with the router as source) - - # base case - iptables -P OUTPUT DROP - iptables -A OUTPUT -m state --state INVALID -j DROP - iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT - - # - # insert accept rule or to jump to new accept-check table here - # - iptables -A OUTPUT -j output_rule - - # allow - iptables -A OUTPUT -j ACCEPT #allow everything out - - # reject (what to do with anything not allowed earlier) - iptables -A OUTPUT -p tcp -j REJECT --reject-with tcp-reset - iptables -A OUTPUT -j REJECT --reject-with icmp-port-unreachable - -### FORWARDING -### (connections routed through the router) - - # base case - iptables -P FORWARD DROP - iptables -A FORWARD -m state --state INVALID -j DROP - iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu - iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT - - # - # insert accept rule or to jump to new accept-check table here - # - iptables -A FORWARD -j forwarding_rule - - # allow - iptables -A FORWARD -i br0 -o br0 -j ACCEPT - [ -z "$WAN" ] || iptables -A FORWARD -i $LAN -o $WAN -j ACCEPT - - # reject (what to do with anything not allowed earlier) - # uses the default -P DROP - -### MASQ - iptables -t nat -A PREROUTING -j prerouting_rule - iptables -t nat -A POSTROUTING -j postrouting_rule - [ -z "$WAN" ] || iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE - -## USER RULES -[ -f /etc/firewall.user ] && . /etc/firewall.user diff --git a/package/base-files/default/etc/init.d/S50telnet b/package/base-files/default/etc/init.d/S50telnet index ff5659ed47..fb9687c8aa 100755 --- a/package/base-files/default/etc/init.d/S50telnet +++ b/package/base-files/default/etc/init.d/S50telnet @@ -1,2 +1,2 @@ #!/bin/sh -if awk -F: '/^root:/ && $2 !~ /\!/ {exit 1}' /etc/passwd 2>/dev/null || test $FAILSAFE; then telnetd -l /bin/login; fi +if awk -F: '/^root:/ && $2 !~ /\!/ {exit 1}' /etc/passwd 2>/dev/null; then telnetd -l /bin/login; fi diff --git a/package/base-files/default/etc/init.d/S60cron b/package/base-files/default/etc/init.d/S60cron index 6069b8177e..1752734267 100755 --- a/package/base-files/default/etc/init.d/S60cron +++ b/package/base-files/default/etc/init.d/S60cron @@ -1,6 +1,4 @@ #!/bin/sh -[ -d /etc/crontabs ] || mkdir -p /etc/crontabs -[ -e /var/spool/cron/crontabs ] || { - mkdir -p /var/spool/cron - ln -s /etc/crontabs /var/spool/cron/crontabs -} && crond -c /etc/crontabs +mkdir -p /var/spool/cron +ln -s /etc/crontabs /var/spool/cron/crontabs +crond -c /etc/crontabs diff --git a/package/base-files/default/etc/init.d/S98done b/package/base-files/default/etc/init.d/S98done new file mode 100755 index 0000000000..5d5ab49ce3 --- /dev/null +++ b/package/base-files/default/etc/init.d/S98done @@ -0,0 +1,9 @@ +#!/bin/sh +sysctl -p >&- + +# automagically run firstboot +{ mount|grep "on / type tmpfs" 1>&-; } && { + lock /tmp/.switch2jffs + firstboot switch2jffs + lock -u /tmp/.switch2jffs +} diff --git a/package/base-files/default/etc/init.d/S99done b/package/base-files/default/etc/init.d/S99done deleted file mode 100755 index a260ac3d6f..0000000000 --- a/package/base-files/default/etc/init.d/S99done +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# set leds to normal state -[ -f /proc/sys/diag ] && echo "0x00" > /proc/sys/diag -sysctl -p >&- diff --git a/package/base-files/default/etc/init.d/rcS b/package/base-files/default/etc/init.d/rcS index 10079c5932..b38e449781 100755 --- a/package/base-files/default/etc/init.d/rcS +++ b/package/base-files/default/etc/init.d/rcS @@ -1,8 +1,10 @@ #!/bin/sh -. /etc/nvram.sh -syslog_ip=$(nvram get log_ipaddr) -ipcalc -s "$syslog_ip" || syslog_ip="" -syslogd -C 16 ${syslog_ip:+-L -R $syslog_ip} +${FAILSAFE:+exit} + +[ -f /etc/config/network ] && . /etc/config/network +eval $(ipcalc "$log_ipaddr") +[ "$log_ipaddr" = "$IP" ] || log_ipaddr="" +syslogd -C 16 ${log_ipaddr:+-L -R $log_ipaddr} klogd #${FAILSAFE:+telnetd -l /bin/login; ifup lan; exit} for i in /etc/init.d/S*; do diff --git a/package/base-files/default/etc/inittab b/package/base-files/default/etc/inittab index 5916311e17..39e134cb16 100644 --- a/package/base-files/default/etc/inittab +++ b/package/base-files/default/etc/inittab @@ -1,4 +1,3 @@ ::sysinit:/etc/init.d/rcS -::shutdown:/sbin/halt tts/0::askfirst:/bin/ash --login #tts/1::askfirst:/bin/ash --login diff --git a/package/base-files/default/etc/preinit b/package/base-files/default/etc/preinit index ac9039ca71..5b676ca3ac 100755 --- a/package/base-files/default/etc/preinit +++ b/package/base-files/default/etc/preinit @@ -1,24 +1,11 @@ #!/bin/sh -. /etc/nvram.sh export PATH=/bin:/sbin:/usr/bin:/usr/sbin mount none /proc -t proc -insmod diag -[ -f /proc/sys/diag ] && echo 0x01 > /proc/sys/diag -sleep 1 -if [ -f /proc/sys/reset ] && [ $(cat /proc/sys/reset) = 1 -o "$(nvram get failsafe)" = 1 ]; then - export FAILSAFE=true - [ -x /usr/sbin/nvram -a "$(nvram get boot_wait)" != "on" ] && { - nvram set boot_wait=on - nvram commit - } - while :; do { echo $(((X=(X+1)%8)%2)) > /proc/sys/diag; sleep $((X==0)); } done & -fi -mount_root ${FAILSAFE:+failsafe} - -# automagically run firstboot -[ -z "$FAILSAFE" -a -z "$(nvram get no_root_swap)" ] && { - { mount|grep "on / type jffs2" 1>&-; } || firstboot +[ -f /etc/preinit.arch ] && . /etc/preinit.arch +[ -z "$FAILSAFE" ] || { + echo /bin/true > /proc/sys/kernel/hotplug + telnetd -l /bin/login <> /dev/null 2>&1 } - +mount_root ${FAILSAFE:+failsafe} exec /sbin/init diff --git a/package/base-files/default/sbin/halt b/package/base-files/default/sbin/halt deleted file mode 100755 index 39eed2612e..0000000000 --- a/package/base-files/default/sbin/halt +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -/usr/bin/killall5 -9 -#umount -ar diff --git a/package/base-files/default/sbin/hotplug b/package/base-files/default/sbin/hotplug index 3500f75201..106299343a 100755 --- a/package/base-files/default/sbin/hotplug +++ b/package/base-files/default/sbin/hotplug @@ -1,4 +1,7 @@ #!/bin/sh + +# bypass the normal hotplug path for firmware loading +# would otherwise cause problems with drivers like bcm43xx [ "$1" = "firmware" -a "$ACTION" = "add" ] && { [ -f "/lib/firmware/$FIRMWARE" ] && { echo 1 > "/sys$DEVPATH/loading" @@ -8,13 +11,8 @@ exit 0 } -[ -e /tmp/.failsafe ] && { - export FAILSAFE=true -} || { - [ -e /etc/config/network ] && . /etc/config/network -} . /etc/functions.sh -. /etc/network.overrides +. /etc/config/network PATH=/bin:/sbin:/usr/bin:/usr/sbin LOGNAME=root diff --git a/package/base-files/default/sbin/ifdown b/package/base-files/default/sbin/ifdown index d0120dcbe8..0d85ca8eab 100755 --- a/package/base-files/default/sbin/ifdown +++ b/package/base-files/default/sbin/ifdown @@ -1,26 +1,18 @@ #!/bin/sh [ $# = 0 ] && { echo " $0 "; exit; } . /etc/functions.sh -. /etc/network.overrides -[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network +. /etc/config/network debug "### ifdown $type ###" type=$1 -if_proto=$(nvram get ${type}_proto) -if=$(nvram get ${type}_ifname) +eval "if_proto=\"\${${type}_proto}\"" +eval "if=\"\${${type}_ifname}\"" +[ "${if%%[0-9]}" = "ppp" ] && eval "if=\"\${${type}_device}\"" case "$if_proto" in pppoa) hotplug_dev unregister atm0; exit 0 ;; ""|none) exit 0;; esac -[ "${if%%[0-9]*}" = "ppp" ] && if="$(nvram get ${type}_device)" - -if [ "${if%%[0-9]}" = "br" ]; then - for sif in $(nvram get ${type}_ifnames); do - hotplug_dev unregister "$sif" - done -fi - hotplug_dev unregister "$if" diff --git a/package/base-files/default/sbin/ifup b/package/base-files/default/sbin/ifup index 8ae6416685..a86a7671e8 100755 --- a/package/base-files/default/sbin/ifup +++ b/package/base-files/default/sbin/ifup @@ -1,32 +1,34 @@ #!/bin/sh [ $# = 0 ] && { echo " $0 "; exit; } . /etc/functions.sh -. /etc/network.overrides -[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network +. /etc/config/network ifdown $1 debug "### ifup $type ###" type=$1 -if_proto=$(nvram get ${type}_proto) -if=$(nvram get ${type}_ifname) +eval "if_proto=\"\${${type}_proto}\"" +eval "if=\"\${${type}_ifname}\"" +[ "${if%%[0-9]}" = "ppp" ] && eval "if=\"\${${type}_device}\"" case "$if_proto" in pppoa) hotplug_dev register atm0; exit 0 ;; pppoe) - ifconfig nas0 2>&- >&- || { - hotplug_dev register atm0 - exit 0 + # PPPoE over ATM + [ "$if" = "nas0" ] && { + ifconfig nas0 2>&- >&- || { + hotplug_dev register atm0 + exit 0 + } } ;; none|"") exit 0;; esac -[ "${if%%[0-9]*}" = "ppp" ] && if="$(nvram get ${type}_device)" - if [ "${if%%[0-9]}" = "br" ]; then - for sif in $(nvram get ${type}_ifnames); do + eval "ifnames=\"\${${type}_ifnames}\"" + for sif in $ifnames; do hotplug_dev register "$sif" done else diff --git a/package/base-files/default/sbin/mount_root b/package/base-files/default/sbin/mount_root index 427ff0444f..38252e83fe 100755 --- a/package/base-files/default/sbin/mount_root +++ b/package/base-files/default/sbin/mount_root @@ -1,40 +1,34 @@ #!/bin/sh -. /etc/nvram.sh -is_clean() { - grep Broadcom /proc/cpuinfo 2>&- >&- || return 0 - OFFSET="$((0x$(dd if=/dev/mtdblock/1 bs=1 skip=$((0x14)) count=2 2>&- | hexdump | grep 0000000 | cut -d ' ' -f 2) - 1))" - dd if=/dev/mtdblock/1 bs=1 skip=$OFFSET count=1 2>&- | hexdump -v | grep ' 0000' > /dev/null && return 255 || return 0 +is_dirty() { + grep Broadcom /proc/cpuinfo >&- || return 1 + OFFSET="$(($(hexdump -v /dev/mtdblock/1 -s 20 -n 2 -e '"%d"')-1))" + return $(hexdump -v /dev/mtdblock/1 -s $OFFSET -n 1 -e '"%d"') } +size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)&- if [ $? = 0 ] ; then if [ $(cat /proc/mtd | wc -l) = 6 ]; then - echo 5 > /proc/sys/diag - mtd unlock linux mtd erase OpenWrt jffs2root --move else - mtd unlock rootfs mount -o remount,rw /dev/root / fi else - if [ -z "$(nvram get no_root_swap)" ]; then - is_clean || { - mtd erase OpenWrt - mtd unlock linux - jffs2root --clean - } - mtd unlock OpenWrt - mount -t jffs2 /dev/mtdblock/4 /jffs - pivot_root /jffs /jffs/rom - mount none /proc -t proc - mount none /dev -t devfs - umount /rom/proc /rom/dev >&- - fi + . /bin/firstboot + is_dirty + [ $? != 0 ] && { + mount /dev/mtdblock/4 /jffs + pivot /jffs /rom + } || ramoverlay fi fi -mount none /tmp -t tmpfs -o nosuid,nodev,mode=1777,size=50% + +mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 mkdir -p /dev/pts mount none /dev/pts -t devpts -grep sysfs /proc/filesystems >&- && mount -t sysfs none /sys +mount -t sysfs none /sys 2>&- diff --git a/package/base-files/default/usr/lib/common.awk b/package/base-files/default/usr/lib/common.awk new file mode 100644 index 0000000000..63a8cf23d8 --- /dev/null +++ b/package/base-files/default/usr/lib/common.awk @@ -0,0 +1,66 @@ +function portstr(type, str) { + gsub(/-/, ":", str) + if (insmod_mport != 1) { + print "insmod ipt_multiport >&- 2>&-" + insmod_mport = 1 + } + if (type == "src") return " -m multiport --sports " str + else return " -m multiport --dports " str +} + +function str2ipt(str) { + str2data(str) + _cmd = "" + if (_l["src"] != "") _cmd = _cmd " -s " _l["src"] + if (_l["dest"] != "") _cmd = _cmd " -d " _l["dest"] + if (_l["proto"] != "") { + _cmd = _cmd " -p " _l["proto"] + } + # scripts need to check for proto="" and emit two rules in that case + if ((_l["proto"] == "") || (_l["proto"] == "tcp") || (_l["proto"] == "udp")) { + if (_l["sport"] != "") _cmd = _cmd portstr("src", _l["sport"]) + if (_l["dport"] != "") _cmd = _cmd portstr("dest", _l["dport"]) + } + if (_l["layer7"] != "") { + if (insmod_l7 != 1) { + print "insmod ipt_layer7 >&- 2>&-" + insmod_l7 = 1 + } + _cmd = _cmd " -m layer7 --l7proto " _l["layer7"] + } + return _cmd +} + +function str2data(str) { + delete _l + _n = split(str, _o, "[\t ]") + for (_i = 1; _i <= _n; _i++) { + _n2 = split(_o[_i], _c, "=") + if (_n2 == 2) _l[_c[1]] = _c[2] + } +} + +function bitcount(c) { + c=and(rshift(c, 1),0x55555555)+and(c,0x55555555) + c=and(rshift(c, 2),0x33333333)+and(c,0x33333333) + c=and(rshift(c, 4),0x0f0f0f0f)+and(c,0x0f0f0f0f) + c=and(rshift(c, 8),0x00ff00ff)+and(c,0x00ff00ff) + c=and(rshift(c,16),0x0000ffff)+and(c,0x0000ffff) + return c +} + +function validate_netmask(nm) { + return and(-nm,compl(nm)) +} + +function ip2int(ip) { + for (ret=0,n=split(ip,a,"\."),x=1;x<=n;x++) ret=or(lshift(ret,8),a[x]) + return ret +} + +function int2ip(ip,ret,x) { + ret=and(ip,255) + ip=rshift(ip,8) + for(;x<3;ret=and(ip,255)"."ret,ip=rshift(ip,8),x++); + return ret +} diff --git a/package/base-files/default/usr/lib/parse-config.awk b/package/base-files/default/usr/lib/parse-config.awk new file mode 100644 index 0000000000..bde5c0072b --- /dev/null +++ b/package/base-files/default/usr/lib/parse-config.awk @@ -0,0 +1,40 @@ +{ + line=$0 + gsub(/^[ \t]*/, "") + gsub(/[ \t]*$/, "") +} + +$1 == "@define" { + v[$2] = $3 +} + +$1 == "@ifdef" { + if_open = 1 + if (v[$2] != "") noprint = 0 + else noprint = 1 +} + +$1 == "@ifndef" { + if_open = 1 + if (v[$2] != "") noprint = 1 + else noprint = 0 +} + +$1 == "@else" { + if (noprint == 1) noprint = 0 + else noprint = 1 +} + +($1 !~ /^@/) && (noprint != 1) { + n=split(line "@@", a, /@@/) + for (i=1; i<=n; i++) { + if ((i % 2) == 1) printf a[i] + else printf v[a[i]] + } + print "" +} + +$1 == "@endif" { + if_open = 0 + noprint = 0 +} diff --git a/package/base-files/default/usr/share/udhcpc/default.script b/package/base-files/default/usr/share/udhcpc/default.script index 42d3eaf0c2..4604648e6b 100755 --- a/package/base-files/default/usr/share/udhcpc/default.script +++ b/package/base-files/default/usr/share/udhcpc/default.script @@ -1,18 +1,17 @@ #!/bin/sh [ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1 +. /etc/config/network RESOLV_CONF="/tmp/resolv.conf" hotplug_event() { - nvram show 2>&- | grep _proto=dhcp | { - while :; do - read FOO - [ -z "$FOO" ] && break - FOO="${FOO%%_*}" - [ "$(nvram get ${FOO}_ifname)" = "${interface}" ] || continue - env -i ACTION="$1" INTERFACE="${FOO}" PROTO=dhcp /sbin/hotplug iface - done - } + for ifname in lan wan wifi ${ifnames}; do + eval "proto=\"\${${ifname}_proto}\"" + eval "if=\"\${${ifname}_ifname}\"" + [ "$proto" = "dhcp" ] || continue + [ "$if" = "$interface" ] || continue + env -i ACTION="$1" INTERFACE="$ifname" PROTO=dhcp /sbin/hotplug iface + done } case "$1" in @@ -26,22 +25,20 @@ case "$1" in broadcast ${broadcast:-+} if [ -n "$router" ] ; then - - if [ "$router" != "$(route -n | grep '^0.0.0.0' | grep $interface | awk '{ print $2 }')" ] ; then - while route del default gw 0.0.0.0 dev $interface 2>&- ; do - echo "removing old default route" - done - for i in $router ; do - route add default gw $i dev $interface - done - fi + echo "deleting routers" + while route del default gw 0.0.0.0 dev $interface >&- 2>&- ; do :; done + + for i in $router ; do + echo "adding router $i" + route add default gw $i dev $interface + done fi echo -n > $RESOLV_CONF ${domain:+echo search $domain} >> $RESOLV_CONF for i in $dns ; do - echo adding dns $i - echo nameserver $i >> $RESOLV_CONF + echo "adding dns $i" + echo "nameserver $i" >> $RESOLV_CONF done hotplug_event ifup diff --git a/package/busybox/config/miscutils/Config.in b/package/busybox/config/miscutils/Config.in index 1ffb8c6536..404170188e 100644 --- a/package/busybox/config/miscutils/Config.in +++ b/package/busybox/config/miscutils/Config.in @@ -209,6 +209,12 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA Enables the 'hdparm -d' option to get/set using_dma flag. This is dangerous stuff, so you should probably say N. +config BUSYBOX_CONFIG_LOCK + bool "lock" + default y + help + Small utility for using locks in scripts + config BUSYBOX_CONFIG_MAKEDEVS bool "makedevs" default n diff --git a/package/busybox/config/networking/Config.in b/package/busybox/config/networking/Config.in index 14e6b5f79a..7e280b76e2 100644 --- a/package/busybox/config/networking/Config.in +++ b/package/busybox/config/networking/Config.in @@ -395,14 +395,14 @@ endif config BUSYBOX_CONFIG_IPCALC bool "ipcalc" - default y + default n help ipcalc takes an IP address and netmask and calculates the resulting broadcast, network, and host range. config BUSYBOX_CONFIG_FEATURE_IPCALC_FANCY bool " Fancy IPCALC, more options, adds 1 kbyte" - default y + default n depends on BUSYBOX_CONFIG_IPCALC help Adds the options hostname, prefix and silent to the output of "ipcalc". diff --git a/package/busybox/patches/220-awk_bitops.patch b/package/busybox/patches/220-awk_bitops.patch new file mode 100644 index 0000000000..2b85729135 --- /dev/null +++ b/package/busybox/patches/220-awk_bitops.patch @@ -0,0 +1,61 @@ +--- busybox-1.00/editors/awk.c.orig 2004-09-24 05:24:27 -04:00 ++++ busybox-1.00/editors/awk.c 2006-03-08 02:16:52 -05:00 +@@ -271,7 +271,8 @@ + /* builtins */ + enum { + B_a2=0, B_ix, B_ma, B_sp, B_ss, B_ti, B_lo, B_up, +- B_ge, B_gs, B_su ++ B_ge, B_gs, B_su, ++ B_an, B_co, B_ls, B_or, B_rs, B_xo, + }; + + /* tokens and their corresponding info values */ +@@ -311,6 +312,8 @@ + "\5while" NTC + "\4else" NTC + ++ "\3and" "\5compl" "\6lshift" "\2or" ++ "\6rshift" "\3xor" + "\5close" "\6system" "\6fflush" "\5atan2" /* BUILTIN */ + "\3cos" "\3exp" "\3int" "\3log" + "\4rand" "\3sin" "\4sqrt" "\5srand" +@@ -364,6 +367,8 @@ + ST_WHILE, + 0, + ++ OC_B|B_an|P(0x83), OC_B|B_co|P(0x41), OC_B|B_ls|P(0x83), OC_B|B_or|P(0x83), ++ OC_B|B_rs|P(0x83), OC_B|B_xo|P(0x83), + OC_FBLTIN|Sx|F_cl, OC_FBLTIN|Sx|F_sy, OC_FBLTIN|Sx|F_ff, OC_B|B_a2|P(0x83), + OC_FBLTIN|Nx|F_co, OC_FBLTIN|Nx|F_ex, OC_FBLTIN|Nx|F_in, OC_FBLTIN|Nx|F_lg, + OC_FBLTIN|F_rn, OC_FBLTIN|Nx|F_si, OC_FBLTIN|Nx|F_sq, OC_FBLTIN|Nx|F_sr, +@@ -1942,6 +1947,30 @@ + strncpy(s, as[0]+i, n); + s[n] = '\0'; + setvar_p(res, s); ++ break; ++ ++ case B_an: ++ setvar_i(res, (long)getvar_i(av[0]) & (long)getvar_i(av[1])); ++ break; ++ ++ case B_co: ++ setvar_i(res, ~(long)getvar_i(av[0])); ++ break; ++ ++ case B_ls: ++ setvar_i(res, (long)getvar_i(av[0]) << (long)getvar_i(av[1])); ++ break; ++ ++ case B_or: ++ setvar_i(res, (long)getvar_i(av[0]) | (long)getvar_i(av[1])); ++ break; ++ ++ case B_rs: ++ setvar_i(res, (long)((unsigned long)getvar_i(av[0]) >> (unsigned long)getvar_i(av[1]))); ++ break; ++ ++ case B_xo: ++ setvar_i(res, (long)getvar_i(av[0]) ^ (long)getvar_i(av[1])); + break; + + case B_lo: diff --git a/package/busybox/patches/230-passwd_salt.patch b/package/busybox/patches/230-passwd_salt.patch new file mode 100644 index 0000000000..0322a98439 --- /dev/null +++ b/package/busybox/patches/230-passwd_salt.patch @@ -0,0 +1,13 @@ +--- busybox-1.00/loginutils/passwd.c 2006-03-26 06:07:37 -05:00 ++++ busybox-1.00/loginutils/passwd.c 2006-03-26 06:09:03 -05:00 +@@ -386,7 +386,9 @@ + bzero(orig, sizeof(orig)); + + if (algo == 1) { +- cp = pw_encrypt(pass, "$1$"); ++ char salt[6]="$1$\0\0\0"; ++ memcpy(salt+3,crypt_make_salt(),3); ++ cp = pw_encrypt(pass, salt); + } else + cp = pw_encrypt(pass, crypt_make_salt()); + bzero(pass, sizeof pass); diff --git a/package/busybox/patches/340-lock_util.patch b/package/busybox/patches/340-lock_util.patch new file mode 100644 index 0000000000..f5c0c2e89e --- /dev/null +++ b/package/busybox/patches/340-lock_util.patch @@ -0,0 +1,167 @@ +diff -urN busybox.old/include/applets.h busybox.dev/include/applets.h +--- busybox.old/include/applets.h 2006-04-05 01:06:29.000000000 +0200 ++++ busybox.dev/include/applets.h 2006-04-05 01:19:09.000000000 +0200 +@@ -167,6 +167,7 @@ + USE_LN(APPLET(ln, ln_main, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_LOADFONT(APPLET(loadfont, loadfont_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_LOADKMAP(APPLET(loadkmap, loadkmap_main, _BB_DIR_SBIN, _BB_SUID_NEVER)) ++USE_LOCK(APPLET_NOUSAGE(lock, lock_main, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_LOGGER(APPLET(logger, logger_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_LOGIN(APPLET(login, login_main, _BB_DIR_BIN, _BB_SUID_ALWAYS)) + USE_LOGNAME(APPLET(logname, logname_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) +diff -urN busybox.old/miscutils/Config.in busybox.dev/miscutils/Config.in +--- busybox.old/miscutils/Config.in 2006-03-22 22:16:24.000000000 +0100 ++++ busybox.dev/miscutils/Config.in 2006-04-05 01:07:12.000000000 +0200 +@@ -209,6 +209,12 @@ + Enables the 'hdparm -d' option to get/set using_dma flag. + This is dangerous stuff, so you should probably say N. + ++config CONFIG_LOCK ++ bool "lock" ++ default y ++ help ++ Small utility for using locks in scripts ++ + config CONFIG_MAKEDEVS + bool "makedevs" + default n +diff -urN busybox.old/miscutils/Makefile.in busybox.dev/miscutils/Makefile.in +--- busybox.old/miscutils/Makefile.in 2006-03-22 22:16:24.000000000 +0100 ++++ busybox.dev/miscutils/Makefile.in 2006-04-05 01:10:50.000000000 +0200 +@@ -20,6 +20,7 @@ + MISCUTILS-$(CONFIG_EJECT) += eject.o + MISCUTILS-$(CONFIG_HDPARM) += hdparm.o + MISCUTILS-$(CONFIG_LAST) += last.o ++MISCUTILS-$(CONFIG_LOCK) += lock.o + MISCUTILS-${CONFIG_LESS} += less.o + MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o + MISCUTILS-$(CONFIG_MOUNTPOINT) += mountpoint.o +diff -urN busybox.old/miscutils/lock.c busybox.dev/miscutils/lock.c +--- busybox.old/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox.dev/miscutils/lock.c 2006-04-05 01:07:12.000000000 +0200 +@@ -0,0 +1,125 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "busybox.h" ++ ++static int unlock = 0; ++static int shared = 0; ++static int waitonly = 0; ++static int fd; ++static char *file; ++ ++static void usage(char *name) ++{ ++ fprintf(stderr, "Usage: %s [-suw] \n" ++ " -s Use shared locking\n" ++ " -u Unlock\n" ++ " -w Wait for the lock to become free, don't acquire lock\n" ++ "\n", name); ++ exit(1); ++} ++ ++static void exit_unlock(int sig) ++{ ++ flock(fd, LOCK_UN); ++ unlink(file); ++ exit(0); ++} ++ ++static int do_unlock(void) ++{ ++ FILE *f; ++ int i; ++ ++ f = fopen(file, "r"); ++ fscanf(f, "%d", &i); ++ if (i > 0) ++ kill(i, SIGTERM); ++ fclose(f); ++ ++ return 0; ++} ++ ++static int do_lock(void) ++{ ++ int pid; ++ char pidstr[8]; ++ ++ if ((fd = open(file, O_RDWR | O_CREAT, 0700)) < 0) { ++ fprintf(stderr, "Can't open %s\n", file); ++ return 1; ++ } ++ ++ if (flock(fd, (shared ? LOCK_SH : LOCK_EX)) < 0) { ++ fprintf(stderr, "Can't lock %s\n", file); ++ return 1; ++ } ++ ++ pid = fork(); ++ ++ if (pid < 0) ++ return -1; ++ ++ if (pid == 0) { ++ signal(SIGKILL, exit_unlock); ++ signal(SIGTERM, exit_unlock); ++ signal(SIGINT, exit_unlock); ++ if (waitonly) ++ exit_unlock(0); ++ else ++ while (1) ++ sleep(1); ++ } else { ++ if (!waitonly) { ++ lseek(fd, 0, SEEK_SET); ++ ftruncate(fd, 0); ++ sprintf(pidstr, "%d\n", pid); ++ write(fd, pidstr, strlen(pidstr)); ++ close(fd); ++ } ++ ++ return 0; ++ } ++} ++ ++#ifndef CONFIG_LOCK ++int main(int argc, char **argv) ++#else ++int lock_main(int argc, char **argv) ++#endif ++{ ++ char **args = &argv[1]; ++ int c = argc - 1; ++ ++ while ((*args != NULL) && (*args)[0] == '-') { ++ char *ch = *args; ++ while (*(++ch) > 0) { ++ switch(*ch) { ++ case 'w': ++ waitonly = 1; ++ break; ++ case 's': ++ shared = 1; ++ break; ++ case 'u': ++ unlock = 1; ++ break; ++ } ++ } ++ c--; ++ args++; ++ } ++ ++ if (c != 1) ++ usage(argv[0]); ++ ++ file = *args; ++ if (unlock) ++ return do_unlock(); ++ else ++ return do_lock(); ++} diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile index 393f0f014d..88bd9f21b9 100644 --- a/package/dnsmasq/Makefile +++ b/package/dnsmasq/Makefile @@ -31,6 +31,6 @@ $(IPKG_DNSMASQ): $(STRIP) $(IDIR_DNSMASQ)/usr/sbin/* install -d -m0755 $(IDIR_DNSMASQ)/etc/init.d/ install -m0644 ./files/dnsmasq.conf $(IDIR_DNSMASQ)/etc/dnsmasq.conf - install -m0755 ./files/S50dnsmasq $(IDIR_DNSMASQ)/etc/init.d/S50dnsmasq + install -m0755 ./files/dnsmasq.init $(IDIR_DNSMASQ)/etc/init.d/S50dnsmasq $(IPKG_BUILD) $(IDIR_DNSMASQ) $(PACKAGE_DIR) diff --git a/package/dnsmasq/files/S50dnsmasq b/package/dnsmasq/files/S50dnsmasq deleted file mode 100755 index 17e331fac8..0000000000 --- a/package/dnsmasq/files/S50dnsmasq +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -. /etc/functions.sh -. /etc/network.overrides -[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network - -# interface to use for DHCP -iface=lan - -ifname=$(nvram get ${iface}_ifname) -ipaddr=$(nvram get ${iface}_ipaddr) -netmask=$(nvram get ${iface}_netmask) - -# check for existing DHCP server -udhcpc -n -q -R -s /bin/true -i $ifname >&- || { - - ipaddr=$(ip2int $ipaddr) - netmask=$(ip2int ${netmask:-255.255.255.0}) - network=$((ipaddr&netmask)) - - start=$(nvram get dhcp_start) - start=$((network+${start:-100})) - end=$(nvram get dhcp_num) - end=$((start+${end:-150})) - - wanproto=$(nvram get wan_proto) - [ -z "$wanproto" -o "$wanproto" = "none" ] || wanif=$(nvram get wan_ifname) - - args="-K -F $(int2ip $start),$(int2ip $end),$(int2ip $netmask),12h ${wanif:+-I ${wanif} }" -} -dnsmasq ${args} diff --git a/package/dnsmasq/files/dnsmasq.conf b/package/dnsmasq/files/dnsmasq.conf index d4a9f082ca..7aed3a3da4 100644 --- a/package/dnsmasq/files/dnsmasq.conf +++ b/package/dnsmasq/files/dnsmasq.conf @@ -9,9 +9,15 @@ local=/lan/ domain=lan expand-hosts +@ifdef dhcp_enable +dhcp-range=@@start@@,@@end@@,@@netmask@@,@@lease@@ +@endif +@ifdef wan_ifname +except-interface=@@wan_ifname@@ +@endif + # enable dhcp (start,end,netmask,leasetime) dhcp-authoritative -#dhcp-range=192.168.1.100,192.168.1.250,255.255.255.0,12h dhcp-leasefile=/tmp/dhcp.leases # use /etc/ethers for static hosts; same format as --dhcp-host diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init new file mode 100644 index 0000000000..17ef43c3d5 --- /dev/null +++ b/package/dnsmasq/files/dnsmasq.init @@ -0,0 +1,45 @@ +#!/bin/sh +. /etc/config/network + +# The following is to automatically configure the DHCP settings +# based on config settings. Feel free to replace all this crap +# with a simple "dnsmasq" and manage everything via the +# /etc/dnsmasq.conf config file + +[ -f /etc/dnsmasq.conf ] || exit + +args="" +iface=lan +eval "ifname=\${${iface}_ifname}" + +dhcp_enable="${dhcp_enable:-1}" +dhcp_start="${dhcp_start:-100}" +dhcp_num="${dhcp_num:-50}" +dhcp_lease="${dhcp_lease:-12h}" + +# if dhcp_enable is unset and there is a dhcp server on the network already, default to dhcp_enable=0 +[ -z "$dhcp_enable" ] && udhcpc -n -q -R -s /bin/true -i $ifname >&- && dhcp_enable="${dhcp_enable:-0}" + +# dhcp_enable=0 disables the dhcp server +( + [ -z "$dhcp_enable" -o "$dhcp_enable" -eq 1 ] && { + # no existing DHCP server? + + # calculate settings + eval "ipaddr=\${${iface}_ipaddr}" + eval "netmask=\${${iface}_netmask}" + eval $(ipcalc $ipaddr $netmask ${dhcp_start:-100} ${dhcp_num:-150}) + + # and pass the args via config parser defines + echo "@define dhcp_enable 1" + echo "@define netmask $NETMASK" + echo "@define start $START" + echo "@define end $END" + echo "@define lease ${dhcp_lease:-12h}" + } + + # ignore requests from wan interface + [ -z "$wan_proto" -o "$wan_proto" = "none" ] || echo "@define wan_ifname $wan_ifname" + + cat /etc/dnsmasq.conf +) | awk -f /usr/lib/parse-config.awk | dnsmasq -C /proc/self/fd/0 diff --git a/package/ez-ipupdate/files/ez-ipupdate.hotplug b/package/ez-ipupdate/files/ez-ipupdate.hotplug index eb7ab326c4..c305458b1a 100644 --- a/package/ez-ipupdate/files/ez-ipupdate.hotplug +++ b/package/ez-ipupdate/files/ez-ipupdate.hotplug @@ -1,10 +1,10 @@ -. /etc/functions.sh NAME=ez-ipupdate CONFIG=/etc/$NAME.conf COMMAND=/usr/sbin/$NAME + [ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && { [ -x $COMMAND ] && [ -r $CONFIG ] && { - IFNAME=$(nvram get ${INTERFACE}_ifname) - $COMMAND -c $CONFIG -i $IFNAME 2>&1 | logger -t $NAME + eval "ifname=\"\${${INTERFACE}_ifname}\"" + $COMMAND -c $CONFIG -i $ifname 2>&1 | logger -t $NAME } & } diff --git a/package/iptables/Makefile b/package/iptables/Makefile index 298a9a9e0f..f16ac8be48 100644 --- a/package/iptables/Makefile +++ b/package/iptables/Makefile @@ -72,6 +72,13 @@ $(PKG_BUILD_DIR)/.built: touch $@ $(IPKG_IPTABLES): + install -d -m0755 $(IDIR_IPTABLES)/etc/config + install -m0644 ./files/firewall.config $(IDIR_IPTABLES)/etc/config/firewall + install -d -m0755 $(IDIR_IPTABLES)/etc/init.d + install -m0755 ./files/firewall.init $(IDIR_IPTABLES)/etc/init.d/S45firewall + install -m0755 ./files/firewall.user $(IDIR_IPTABLES)/etc/ + install -d -m0755 $(IDIR_IPTABLES)/usr/lib + install -m0644 ./files/firewall.awk $(IDIR_IPTABLES)/usr/lib install -d -m0755 $(IDIR_IPTABLES)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables $(IDIR_IPTABLES)/usr/sbin/ install -d -m0755 $(IDIR_IPTABLES)/usr/lib/iptables diff --git a/package/iptables/files/firewall.awk b/package/iptables/files/firewall.awk new file mode 100644 index 0000000000..1b63f83862 --- /dev/null +++ b/package/iptables/files/firewall.awk @@ -0,0 +1,64 @@ +BEGIN { + print "proto=\"$wan_proto\"" + print "[ -z \"$proto\" -o \"$proto\" = \"none\" ] && exit" + print "ifname=\"$wan_ifname\"" + print "[ -z \"$ifname\" ] && exit" + print "" + print "iptables -X input_$ifname 2>&- >&-" + print "iptables -N input_$ifname" + print "iptables -X forward_$ifname 2>&- >&-" + print "iptables -N forward_$ifname" + print "iptables -t nat -X prerouting_$ifname 2>&- >&-" + print "iptables -t nat -N prerouting_$ifname" + print "" + print "iptables -A input_rule -i \"$ifname\" -j input_$ifname" + print "iptables -A forwarding_rule -i \"$ifname\" -j forward_$ifname" + print "iptables -t nat -A prerouting_rule -i \"$ifname\" -j prerouting_$ifname" + print "" + FS=":" +} + +($1 == "accept") || ($1 == "drop") || ($1 == "forward") { + delete _opt + str2data($2) + if ((_l["proto"] == "") && (_l["sport"] _l["dport"] != "")) { + _opt[0] = " -p tcp" + _opt[1] = " -p udp" + } else { + _opt[0] = "" + } +} + +($1 == "accept") { + target = " -j ACCEPT" + for (o in _opt) { + print "iptables -t nat -A prerouting_$ifname" _opt[o] str2ipt($2) target + print "iptables -A input_$ifname " _opt[o] str2ipt($2) target + print "" + } +} + +($1 == "drop") { + for (o in _opt) { + print "iptables -t nat -A prerouting_$ifname" _opt[o] str2ipt($2) " -j DROP" + print "" + } +} + +($1 == "forward") { + target = " -j DNAT --to " $3 + fwopts = "" + if ($4 != "") { + if ((_l["proto"] == "tcp") || (_l["proto"] == "udp") || (_l["proto"] == "")) { + if (_l["proto"] != "") fwopts = " -p " _l["proto"] + fwopts = fwopts " --dport " $4 + target = target ":" $4 + } + else fwopts = "" + } + for (o in _opt) { + print "iptables -t nat -A prerouting_$ifname" _opt[o] str2ipt($2) target + print "iptables -A forward_$ifname " _opt[o] " -d " $3 fwopts " -j ACCEPT" + print "" + } +} diff --git a/package/iptables/files/firewall.config b/package/iptables/files/firewall.config new file mode 100644 index 0000000000..7edd4ba4e4 --- /dev/null +++ b/package/iptables/files/firewall.config @@ -0,0 +1,46 @@ +# RULE SYNTAX: +# +# forward::[:] +# - forwards all packets matched by to , +# optionally changing the port to +# +# accept: +# - accepts all traffic matched by +# +# drop: +# - drops all traffic matched by +# +# +# MATCHING OPTIONS: +# +# src= +# - match the source ip +# +# dest= +# - match the destination ip +# +# proto= +# - match the protocol by name or number +# +# sport= +# - match the source port(s), see below for syntax +# +# dport= +# - match the destination port(s), see below for syntax +# +# +# +# PORT SYNTAX: +# +# You can enter an arbitrary list of ports and port ranges in the following format: +# - 22,53,993,1000-1024 +# +# If you don't set the protocol to tcp or udp, it will apply to both +# +# +# +# EXAMPLES: +# +# drop:dport=22 src=1.3.3.7 +# accept:proto=tcp dport=22 +# forward:dport=60168:192.168.1.2:60169 diff --git a/package/iptables/files/firewall.init b/package/iptables/files/firewall.init new file mode 100755 index 0000000000..3804d044f8 --- /dev/null +++ b/package/iptables/files/firewall.init @@ -0,0 +1,95 @@ +#!/bin/sh + +## Please make changes in /etc/firewall.user + +. /etc/config/network +WAN="$wan_ifname" +LAN="$lan_ifname" + +## CLEAR TABLES +for T in filter nat; do + iptables -t $T -F + iptables -t $T -X +done + +iptables -N input_rule +iptables -N output_rule +iptables -N forwarding_rule + +iptables -t nat -N prerouting_rule +iptables -t nat -N postrouting_rule + +### INPUT +### (connections with the router as destination) + + # base case + iptables -P INPUT DROP + iptables -A INPUT -m state --state INVALID -j DROP + iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT + iptables -A INPUT -p tcp --tcp-flags SYN SYN --tcp-option \! 2 -j DROP + + # + # insert accept rule or to jump to new accept-check table here + # + iptables -A INPUT -j input_rule + + # allow + [ -z "$WAN" ] || iptables -A INPUT -i \! $WAN -j ACCEPT # allow from lan/wifi interfaces + iptables -A INPUT -p icmp -j ACCEPT # allow ICMP + iptables -A INPUT -p gre -j ACCEPT # allow GRE + + # reject (what to do with anything not allowed earlier) + iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset + iptables -A INPUT -j REJECT --reject-with icmp-port-unreachable + +### OUTPUT +### (connections with the router as source) + + # base case + iptables -P OUTPUT DROP + iptables -A OUTPUT -m state --state INVALID -j DROP + iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT + + # + # insert accept rule or to jump to new accept-check table here + # + iptables -A OUTPUT -j output_rule + + # allow + iptables -A OUTPUT -j ACCEPT #allow everything out + + # reject (what to do with anything not allowed earlier) + iptables -A OUTPUT -p tcp -j REJECT --reject-with tcp-reset + iptables -A OUTPUT -j REJECT --reject-with icmp-port-unreachable + +### FORWARDING +### (connections routed through the router) + + # base case + iptables -P FORWARD DROP + iptables -A FORWARD -m state --state INVALID -j DROP + iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu + iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT + + # + # insert accept rule or to jump to new accept-check table here + # + iptables -A FORWARD -j forwarding_rule + + # allow + iptables -A FORWARD -i br0 -o br0 -j ACCEPT + [ -z "$WAN" ] || iptables -A FORWARD -i $LAN -o $WAN -j ACCEPT + + # reject (what to do with anything not allowed earlier) + # uses the default -P DROP + +### MASQ + iptables -t nat -A PREROUTING -j prerouting_rule + iptables -t nat -A POSTROUTING -j postrouting_rule + [ -z "$WAN" ] || iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE + +## USER RULES +[ -f /etc/firewall.user ] && . /etc/firewall.user +[ -n "$WAN" -a -e /etc/config/firewall ] && { + awk -f /usr/lib/common.awk -f /usr/lib/firewall.awk /etc/config/firewall | ash +} diff --git a/package/iptables/files/firewall.user b/package/iptables/files/firewall.user new file mode 100755 index 0000000000..f13f50bf66 --- /dev/null +++ b/package/iptables/files/firewall.user @@ -0,0 +1,31 @@ +#!/bin/sh +. /etc/config/network + +WAN="$wan_ifname" +LAN="$lan_ifname" + +iptables -F input_rule +iptables -F output_rule +iptables -F forwarding_rule +iptables -t nat -F prerouting_rule +iptables -t nat -F postrouting_rule + +### BIG FAT DISCLAIMER +## The "-i $WAN" is used to match packets that come in via the $WAN interface. +## it WILL NOT MATCH packets sent from the $WAN ip address -- you won't be able +## to see the effects from within the LAN. + +### Open port to WAN +## -- This allows port 22 to be answered by (dropbear on) the router +# iptables -t nat -A prerouting_rule -i $WAN -p tcp --dport 22 -j ACCEPT +# iptables -A input_rule -i $WAN -p tcp --dport 22 -j ACCEPT + +### Port forwarding +## -- This forwards port 8080 on the WAN to port 80 on 192.168.1.2 +# iptables -t nat -A prerouting_rule -i $WAN -p tcp --dport 8080 -j DNAT --to 192.168.1.2:80 +# iptables -A forwarding_rule -i $WAN -p tcp --dport 80 -d 192.168.1.2 -j ACCEPT + +### DMZ +## -- Connections to ports not handled above will be forwarded to 192.168.1.2 +# iptables -t nat -A prerouting_rule -i $WAN -j DNAT --to 192.168.1.2 +# iptables -A forwarding_rule -i $WAN -d 192.168.1.2 -j ACCEPT diff --git a/package/linux-atm/files/br2684.init b/package/linux-atm/files/br2684.init index 88f40e76b6..242e7e5152 100644 --- a/package/linux-atm/files/br2684.init +++ b/package/linux-atm/files/br2684.init @@ -1,16 +1,14 @@ [ "${INTERFACE%%[0-9]*}" = "atm" ] && { case "$ACTION" in register) - [ "$(nvram get pppoe_atm)" = 1 ] && { - VPI=$(nvram get atm_vpi) - VCI=$(nvram get atm_vci) - case "$(nvram get atm_encaps)" in + [ "$pppoe_atm" = 1 ] && { + case "$atm_encaps" in 0|vc) ENCAPS=0 ;; 1|llc) ENCAPS=1 ;; *) ENCAPS=0 ;; esac insmod br2684 2>&- >&- - br2684ctl -c0 -e${ENCAPS} -a${VPI:-8}.${VCI:-35} & + br2684ctl -c0 -e${ENCAPS} -a${atm_vpi:-8}.${atm_vci:-35} & } ;; unregister) diff --git a/package/mtd/mtd.c b/package/mtd/mtd.c index 78d38fb6a9..23e99160a1 100644 --- a/package/mtd/mtd.c +++ b/package/mtd/mtd.c @@ -96,7 +96,7 @@ image_check_bcom(int imagefd, const char *mtd) } /* check if image fits to mtd device */ - fd = mtd_open(mtd, O_RDWR); + fd = mtd_open(mtd, O_RDWR | O_SYNC); if(fd < 0) { fprintf(stderr, "Could not open mtd device: %s\n", mtd); exit(1); @@ -113,6 +113,7 @@ image_check_bcom(int imagefd, const char *mtd) return 0; } + close(fd); return 1; } @@ -148,7 +149,7 @@ int mtd_check(char *mtd) struct mtd_info_user mtdInfo; int fd; - fd = mtd_open(mtd, O_RDWR); + fd = mtd_open(mtd, O_RDWR | O_SYNC); if(fd < 0) { fprintf(stderr, "Could not open mtd device: %s\n", mtd); return 0; @@ -171,7 +172,7 @@ mtd_unlock(const char *mtd) struct mtd_info_user mtdInfo; struct erase_info_user mtdLockInfo; - fd = mtd_open(mtd, O_RDWR); + fd = mtd_open(mtd, O_RDWR | O_SYNC); if(fd < 0) { fprintf(stderr, "Could not open mtd device: %s\n", mtd); exit(1); @@ -222,7 +223,7 @@ mtd_erase(const char *mtd) struct mtd_info_user mtdInfo; struct erase_info_user mtdEraseInfo; - fd = mtd_open(mtd, O_RDWR); + fd = mtd_open(mtd, O_RDWR | O_SYNC); if(fd < 0) { fprintf(stderr, "Could not open mtd device: %s\n", mtd); exit(1); @@ -260,8 +261,9 @@ mtd_write(int imagefd, const char *mtd, int quiet) size_t r, w, e; struct mtd_info_user mtdInfo; struct erase_info_user mtdEraseInfo; + int ret = 0; - fd = mtd_open(mtd, O_RDWR); + fd = mtd_open(mtd, O_RDWR | O_SYNC); if(fd < 0) { fprintf(stderr, "Could not open mtd device: %s\n", mtd); exit(1); @@ -318,7 +320,8 @@ mtd_write(int imagefd, const char *mtd, int quiet) } if (!quiet) fprintf(stderr, "\b\b\b\b"); - + + close(fd); return 0; } @@ -463,6 +466,8 @@ int main (int argc, char **argv) break; } + sync(); + if (boot) kill(1, 15); // send SIGTERM to init for reboot diff --git a/package/ntpclient/files/ntpclient.init b/package/ntpclient/files/ntpclient.init index c8505c5cad..a8944c60eb 100644 --- a/package/ntpclient/files/ntpclient.init +++ b/package/ntpclient/files/ntpclient.init @@ -1,9 +1,8 @@ #!/bin/sh -server=$(nvram get ntp_server) case "$ACTION" in ifup) ps x | grep '[n]tpclient' >&- || { - route -n 2>&- | grep '^0.0.0.0' >&- && /usr/sbin/ntpclient -c 1 -s -h ${server:-pool.ntp.org} & + route -n 2>&- | grep '^0.0.0.0' >&- && /usr/sbin/ntpclient -c 1 -s -h ${ntp_server:-pool.ntp.org} & } ;; ifdown) diff --git a/package/parprouted/files/parprouted.default b/package/parprouted/files/parprouted.default index 17169c4b37..7128a56a74 100755 --- a/package/parprouted/files/parprouted.default +++ b/package/parprouted/files/parprouted.default @@ -1,3 +1 @@ -LAN_IF=$(nvram get lan_ifname) -WIFI_IF=$(nvram get wifi_ifname) -OPTIONS="$LAN_IF $WIFI_IF" +OPTIONS="$lan_ifname $wifi_ifname" diff --git a/package/ppp/files/ifup.pppoa b/package/ppp/files/ifup.pppoa index baea25ebf2..277266c0f5 100644 --- a/package/ppp/files/ifup.pppoa +++ b/package/ppp/files/ifup.pppoa @@ -1,11 +1,10 @@ #!/bin/sh [ $# = 0 ] && { echo " $0 "; exit; } -. /etc/functions.sh -. /etc/network.overrides -[ -e /etc/config/network ] && . /etc/config/network +. /etc/config/network type=$1 -[ "$(nvram get ${type}_proto)" = "pppoa" ] || { +eval "proto=\"\${${type}_proto}\"" +[ "$proto" = "pppoa" ] || { echo "$0: ${type}_proto isn't pppoa" exit } @@ -14,32 +13,24 @@ for module in slhc ppp_generic pppoatm; do /sbin/insmod $module 2>&- >&- done -VPI=$(nvram get atm_vpi) -VCI=$(nvram get atm_vci) -USERNAME=$(nvram get ppp_username) -PASSWORD=$(nvram get ppp_passwd) -KEEPALIVE=$(nvram get ppp_redialperiod) -KEEPALIVE=${KEEPALIVE:+lcp-echo-interval 1 lcp-echo-failure $KEEPALIVE} -DEMAND=$(nvram get ppp_demand) -case "$DEMAND" in +KEEPALIVE=${ppp_redialperiod:+lcp-echo-interval $ppp_redialperiod lcp-echo-failure 5} +case "$ppp_demand" in on|1|enabled) - DEMAND=$(nvram get ppp_idletime) - DEMAND=${IDLETIME:+demand idle $IDLETIME} + DEMAND=${ppp_idletime:+demand idle $ppp_idletime} [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND} ;; *) DEMAND="persist";; esac -MTU=$(nvram get ppp_mtu) -MTU=${MTU:-1500} +MTU=${ppp_mtu:-1500} /usr/sbin/pppd \ - plugin pppoatm.so ${VPI:-8}.${VCI:-35} \ + plugin pppoatm.so ${atm_vpi:-8}.${atm_vci:-35} \ usepeerdns \ defaultroute \ linkname $type \ ipparam $type \ - user "$USERNAME" \ - password "$PASSWORD" \ + user "$ppp_username" \ + password "$ppp_passwd" \ mtu $MTU mru $MTU \ $DEMAND \ $KEEPALIVE diff --git a/package/ppp/files/ifup.pppoe b/package/ppp/files/ifup.pppoe index 1f9cd739c3..0f3c14ed0d 100644 --- a/package/ppp/files/ifup.pppoe +++ b/package/ppp/files/ifup.pppoe @@ -1,11 +1,10 @@ #!/bin/sh [ $# = 0 ] && { echo " $0 "; exit; } -. /etc/functions.sh -. /etc/network.overrides -[ -e /etc/config/network ] && . /etc/config/network +. /etc/config/network type=$1 -[ "$(nvram get ${type}_proto)" = "pppoe" ] || { +eval "proto=\"\${${type}_proto}\"" +[ "$proto" = "pppoe" ] || { echo "$0: ${type}_proto isn't pppoe" exit } @@ -14,22 +13,16 @@ for module in slhc ppp_generic pppox pppoe; do /sbin/insmod $module 2>&- >&- done -IFNAME=$(nvram get ${type}_device) -USERNAME=$(nvram get ppp_username) -PASSWORD=$(nvram get ppp_passwd) -KEEPALIVE=$(nvram get ppp_redialperiod) -KEEPALIVE=${KEEPALIVE:+lcp-echo-interval 1 lcp-echo-failure $KEEPALIVE} -DEMAND=$(nvram get ppp_demand) -case "$DEMAND" in +eval "IFNAME=\"\${${type}_device}\"" +KEEPALIVE=${ppp_redialperiod:+lcp-echo-interval $ppp_redialperiod lcp-echo-failure 5} +case "$ppp_demand" in on|1|enabled) - DEMAND=$(nvram get ppp_idletime) - DEMAND=${IDLETIME:+demand idle $IDLETIME} + DEMAND=${ppp_idletime:+demand idle $ppp_idletime} [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND} ;; *) DEMAND="persist";; esac -MTU=$(nvram get ppp_mtu) -MTU=${MTU:-1492} +MTU=${ppp_mtu:-1492} ifconfig $IFNAME up /usr/sbin/pppd \ @@ -39,8 +32,8 @@ ifconfig $IFNAME up defaultroute \ linkname $type \ ipparam $type \ - user "$USERNAME" \ - password "$PASSWORD" \ + user "$ppp_username" \ + password "$ppp_passwd" \ mtu $MTU mru $MTU \ $DEMAND \ $KEEPALIVE \ diff --git a/package/pptp/files/ifup.pptp b/package/pptp/files/ifup.pptp index 9b1ac07c26..a9bc579b56 100644 --- a/package/pptp/files/ifup.pptp +++ b/package/pptp/files/ifup.pptp @@ -1,8 +1,13 @@ #!/bin/sh -. /etc/functions.sh +[ $# = 0 ] && { echo " $0 "; exit; } +. /etc/config/network type=$1 -[ "$(nvram get ${type}_proto)" = "pptp" ] || exit +eval "proto=\"\${${type}_proto}\"" +[ "$proto" = "pptp" ] || { + echo "$0: ${type}_proto isn't pptp" + exit +} [ -d "/var/lock" ] || mkdir -p /var/lock || exit 1 @@ -10,35 +15,21 @@ for module in slhc ppp_generic ppp_async ip_gre; do /sbin/insmod $module 2>&- >&- done -PPTP_PROTO="$(nvram get pptp_proto)" -[ "$PPTP_PROTO" = "static" ] || PPTP_PROTO="" -PPTP_PROTO="${PPTP_PROTO:-dhcp}" -IP=$(nvram get pptp_server_ip) -USERNAME=$(nvram get ppp_username) -PASSWORD=$(nvram get ppp_passwd) -KEEPALIVE=$(nvram get ppp_redialperiod) -KEEPALIVE=${KEEPALIVE:+lcp-echo-interval 10 lcp-echo-failure $KEEPALIVE} -DEMAND=$(nvram get ppp_demand) -case "$DEMAND" in +KEEPALIVE=${ppp_redialperiod:+lcp-echo-interval $ppp_redialperiod lcp-echo-failure 5} +case "$ppp_demand" in on|1|enabled) - DEMAND=$(nvram get ppp_idletime) - DEMAND=${IDLETIME:+demand idle $IDLETIME} + DEMAND=${ppp_idletime:+demand idle $ppp_idletime} [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND} ;; *) DEMAND="persist";; esac -MTU=$(nvram get ppp_mtu) -MTU=${MTU:-1452} +MTU=${ppp_mtu:-1452} -do_ifup $PPTP_PROTO $type - -# hack for some buggy ISPs -NETMASK=$(nvram get ${type}_netmask) -IFNAME=$(nvram get ${type}_device) -[ -z "$NETMASK" -o -z "$IFNAME" ] || ifconfig $IFNAME netmask $NETMASK +[ "$pptp_proto" = "static" ] || pptp_proto="dhcp" +do_ifup $pptp_proto $type /usr/sbin/pppd \ - pty "/usr/sbin/pptp $IP --loglevel 0 --nolaunchpppd" \ + pty "/usr/sbin/pptp $pptp_server_ip --loglevel 0 --nolaunchpppd" \ file /etc/ppp/options.pptp \ connect /bin/true \ usepeerdns \ @@ -46,8 +37,8 @@ IFNAME=$(nvram get ${type}_device) replacedefaultroute \ linkname "$type" \ ipparam "$type" \ - user "$USERNAME" \ - password "$PASSWORD" \ + user "$ppp_username" \ + password "$ppp_passwd" \ mtu $MTU mru $MTU \ $DEMAND \ $KEEPALIVE diff --git a/target/linux/package/base-files/files/ar7-2.4/etc/network.overrides b/target/linux/package/base-files/files/ar7-2.4/etc/network.overrides deleted file mode 100644 index 9aa74aa934..0000000000 --- a/target/linux/package/base-files/files/ar7-2.4/etc/network.overrides +++ /dev/null @@ -1,28 +0,0 @@ -# NVRAM overrides -# -# This file handles the NVRAM quirks of various hardware. -# THIS FILE IS NOT A REPLACEMENT FOR NVRAM - -# Load sysconf defaults -[ -f /etc/sysconf ] && . /etc/sysconf - -DEFAULT_lan_proto="static" -DEFAULT_lan_ifname="br0" -DEFAULT_lan_ifnames="eth0" -DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"} -DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"} -DEFAULT_lan_hwaddr=`echo $(strings /dev/mtdblock/3 | grep -A1 maca | grep :)` -DEFAULT_lan_hwaddr=${DEFAULT_lan_hwaddr##* } -DEFAULT_lan_hwaddr=${DEFAULT_lan_hwaddr:-${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"}} - -# failsafe if reset is held -[ "$FAILSAFE" = "true" ] && { - echo "### YOU ARE IN FAILSAFE MODE ####" - lan_ifname=${DEFAULT_lan_proto} - lan_ifnames=${FAILSAFE_ifnames:-${DEFAULT_lan_ifnames}} - lan_ipaddr=$DEFAULT_lan_ipaddr - lan_netmask=$DEFAULT_lan_netmask - lan_hwaddr=$DEFAULT_lan_hwaddr - wan_ifname="none" - wifi_ifname="none" -} diff --git a/target/linux/package/base-files/files/aruba-2.6/etc/network.overrides b/target/linux/package/base-files/files/aruba-2.6/etc/network.overrides deleted file mode 100644 index 2df6acdd3d..0000000000 --- a/target/linux/package/base-files/files/aruba-2.6/etc/network.overrides +++ /dev/null @@ -1,26 +0,0 @@ -# NVRAM overrides -# -# This file handles the NVRAM quirks of various hardware. -# THIS FILE IS NOT A REPLACEMENT FOR NVRAM - -# Load sysconf defaults -[ -f /etc/sysconf ] && . /etc/sysconf - -DEFAULT_lan_proto="static" -DEFAULT_lan_ifname="br0" -DEFAULT_lan_ifnames="eth0" -DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"} -DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"} -# DEFAULT_lan_hwaddr=${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"} - -# failsafe if reset is held -[ "$FAILSAFE" = "true" ] && { - echo "### YOU ARE IN FAILSAFE MODE ####" - lan_ifname=${DEFAULT_lan_proto} - lan_ifnames=${FAILSAFE_ifnames:-${DEFAULT_lan_ifnames}} - lan_ipaddr=$DEFAULT_lan_ipaddr - lan_netmask=$DEFAULT_lan_netmask - lan_hwaddr=$DEFAULT_lan_hwaddr - wan_ifname="none" - wifi_ifname="none" -} diff --git a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram b/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram new file mode 100755 index 0000000000..4de124735b --- /dev/null +++ b/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram @@ -0,0 +1,66 @@ +#!/bin/sh +# NVRAM setup +# +# This file handles the NVRAM quirks of various hardware. + +# WGT634u +grep 'mtd0: 00060000' /proc/mtd 2>&- >&- && exit + +alias debug=${DEBUG:-:} + +nvram_default() { + [ -z "$(nvram get $1)" ] && nvram set "$1=$2" +} + +nvram_set() { # for the linksys fixup part + [ "$(nvram get "$1")" = "$2" -a "$2" != "" ] || { + COMMIT=1 + /usr/sbin/nvram set "$1=$2" + } +} + +# work around braindead CFE defaults in linksys routers +boardtype=$(nvram get boardtype) +boardnum=$(nvram get boardnum) +boardflags=$(($(nvram get boardflags))) +adm_switch="$(( ($boardflags & 0x80) >> 7 ))" + +case "$(( $boardtype ))" in + "1800") #0x708 + if [ "$adm_switch" = 0 ]; then + nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" + [ "$COMMIT" = 1 ] && { + nvram_set sdram_config 0x0062 + nvram_set clkfreq 216 + nvram_set sdram_ncdl 0x0 + nvram_set pa0itssit 62 + nvram_set pa0b0 0x15eb + nvram_set pa0b1 0xfa82 + nvram_set pa0b2 0xfe66 + nvram_set pa0maxpwr 0x4e + } + fi + ;; + "1127") #0x467 + nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" + [ "$COMMIT" = 1 ] && { + nvram_set sdram_config 0x0062 + nvram_set sdram_ncdl 0x0 + nvram_set pa0itssit 62 + nvram_set pa0b0 0x168b + nvram_set pa0b1 0xfabf + nvram_set pa0b2 0xfeaf + nvram_set pa0maxpwr 0x4e + } + ;; +esac +[ "$COMMIT" = "1" ] && nvram commit + +# hack for some motorola routers +nvram unset wl0gpio0 + +[ "$(nvram get il0macaddr)" = "00:90:4c:5f:00:2a" ] && { + # if default wifi mac, set two higher than the lan mac + nvram set il0macaddr=$(nvram get et0macaddr| + awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}') +} diff --git a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig b/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig index 51be73b5ba..6a626f54a5 100755 --- a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig +++ b/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig @@ -50,7 +50,7 @@ END { c["vlan1ports"] = "4 5" c["lan_ifnames"] = "vlan0 ath0" } - if (nvram["boardtype"] == "0x0467") { + if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) { c["vlan0ports"] = "0 1 2 3 5*" c["vlan1ports"] = "4 5" } @@ -101,6 +101,8 @@ END { print "" print "## PPP over Ethernet and PPTP" print "# wan_ifname=\"ppp0\"" + print "# ppp_username=\"my_username\"" + print "# ppp_passwd=\"my_password\"" print "# pptp_server_ip=\"192.168.0.1\"" } ' > /etc/config/network diff --git a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram b/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram deleted file mode 100755 index b985948d78..0000000000 --- a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram +++ /dev/null @@ -1,166 +0,0 @@ -#!/bin/sh -# NVRAM setup -# -# This file handles the NVRAM quirks of various hardware. - -. /etc/network.overrides -alias debug=${DEBUG:-:} - -# WGT634u -grep 'mtd0: 00060000' /proc/mtd 2>&- >&- && exit - -remap () { - for type in lan wifi wan pppoe - do - for s in '' s - do - eval nvram set ${type}_ifname$s=\"$(nvram get ${type}_ifname$s|sed s/$1/$2/g)\" - done - done -} - -nvram_default() { - [ -z "$(nvram get $1)" ] && nvram set "$1=$2" -} - -nvram_set() { # for the linksys fixup part - [ "$(nvram get "$1")" = "$2" -a "$2" != "" ] || { - COMMIT=1 - /usr/sbin/nvram set "$1=$2" - } -} - -# work around braindead CFE defaults in linksys routers -boardtype=$(nvram get boardtype) -boardflags=$(($(nvram get boardflags))) -[ "$boardtype" = "bcm94710dev" ] && boardtype="0xdeadbeef" -adm_switch="$(( ($boardflags & 0x80) >> 7 ))" -case "$(( $boardtype ))" in - "$((0x708))") - if [ "$adm_switch" = 0 ]; then - nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" - [ "$COMMIT" = 1 ] && { - nvram_set sdram_config 0x0062 - nvram_set clkfreq 216 - nvram_set sdram_ncdl 0x0 - nvram_set pa0itssit 62 - nvram_set pa0b0 0x15eb - nvram_set pa0b1 0xfa82 - nvram_set pa0b2 0xfe66 - nvram_set pa0maxpwr 0x4e - } - fi - ;; - "$((0x467))") - nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" - [ "$COMMIT" = 1 ] && { - nvram_set sdram_config 0x0062 - nvram_set sdram_ncdl 0x0 - nvram_set pa0itssit 62 - nvram_set pa0b0 0x168b - nvram_set pa0b1 0xfabf - nvram_set pa0b2 0xfeaf - nvram_set pa0maxpwr 0x4e - } - ;; -esac -[ "$COMMIT" = "1" ] && nvram commit - - -# linksys bug; remove when not using static configuration for lan -nvram set lan_proto="static" - -# hacks for wrt54g 1.x hardware -[ "$(nvram get boardnum)" = "42" \ --a "$(nvram get boardtype)" = "bcm94710dev" ] && { - debug "### wrt54g 1.x hack ###" - nvram set vlan1hwname="et0" - nvram set vlan2hwname="et0" - remap eth0 vlan2 - remap eth1 vlan1 -} - -# hacks for asus wl-500g deluxe -[ "$(nvram get boardtype)" = "bcm95365r" \ --a "$(nvram get boardnum)" = "45" ] && { - debug "### wl-500g deluxe hacks ###" - nvram set vlan0hwname="et0" - nvram set vlan1hwname="et0" - remap eth0.1 vlan0 - remap eth0 vlan1 - - # set up the vlan*ports variables for the asus wl-500g deluxe - # if they don't already exist - nvram_default vlan0ports "1 2 3 4 5*" - nvram_default vlan1ports "0 5" -} - -# hacks for asus -case "$(nvram get productid)" in - WL300g) - debug "### wl-300g hacks ###" - nvram set lan_ifnames="eth0 eth2" - nvram set wan_ifname="none" - ;; - WLHDD) - debug "### wl-hdd hacks ###" - nvram set lan_ifnames="eth1 eth2" - nvram set wan_ifname="none" - ;; - *) - # wl-500g defaults. these are placed here, because WL-HDD and WL-300g - # might have the same nvram settings. - [ "$(nvram get boardnum)" = "asusX" \ - -a "$(nvram get boardtype)" = "bcm94710dev" ] && { - nvram_default wan_device "eth1" - } - ;; -esac - -# hacks for wap54g hardware -[ "$(nvram get boardnum)" = "2" \ --o "$(nvram get boardnum)" = "1024" ] && { - debug "### wap54g hack ###" - nvram set wan_ifname="none" -} - -# hacks for buffalo wla2-g54l -[ "$(nvram get boardnum)" = "00" \ --a "$(nvram get product_name)" = "Product_name" \ --o "$(nvram get product_name)" = "WLA2-G54L" ] && { - debug "### wla2-g54l hacks ###" - nvram set wan_ifname="none" - nvram set lan_ifnames="vlan0" -} - -# needed at least for wrt54gs v1.1 and wrt54g v2.0, v2.2 -[ \! -z "$(nvram get boardrev)" ] && { - nvram_default wl0id 0x4320 -} - -# defaults -nvram_default lan_ifname "br0" -nvram_default lan_ifnames "$FAILSAFE_ifnames" - -nvram_default wan_ifname "vlan1" -nvram_default wan_device "vlan1" -nvram_default wan_proto "dhcp" - -nvram_default wl0_ssid OpenWrt -nvram_default wl0_mode ap -nvram_default wl0_infra 1 -nvram_default wl0_radio 1 - -WAN_PROTO="$(nvram get wan_proto)" -WAN_IFNAME="$(nvram get wan_ifname)" -case "$WAN_PROTO" in - pp*) [ "${WAN_IFNAME%%[0-9]*}" = "ppp" ] || nvram set wan_ifname=ppp0;; - *) [ "${WAN_IFNAME%%[0-9]*}" = "ppp" ] && nvram set wan_ifname="$(nvram get wan_device)";; -esac - -[ "$(nvram get il0macaddr)" = "00:90:4c:5f:00:2a" ] && { - # if default wifi mac, set two higher than the lan mac - nvram set il0macaddr=$(nvram get et0macaddr| - awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}') -} - diff --git a/target/linux/package/base-files/files/brcm-2.4/etc/network.overrides b/target/linux/package/base-files/files/brcm-2.4/etc/network.overrides deleted file mode 100644 index 72ef012653..0000000000 --- a/target/linux/package/base-files/files/brcm-2.4/etc/network.overrides +++ /dev/null @@ -1,41 +0,0 @@ -# NVRAM overrides -# -# This file handles the NVRAM quirks of various hardware. -# THIS FILE IS NOT A REPLACEMENT FOR NVRAM - -# Load sysconf defaults -[ -f /etc/sysconf ] && . /etc/sysconf - -# hacks for wrt54g 1.x hardware -[ "$(nvram get boardnum)" = "42" \ --a "$(nvram get boardtype)" = "bcm94710dev" ] && FAILSAFE_ifnames="vlan0 vlan2 eth2" - -# hacks for asus wl-500g deluxe -[ "$(nvram get boardtype)" = "bcm95365r" \ --a "$(nvram get boardnum)" = "45" ] && FAILSAFE_ifnames="vlan0 eth1" - -# hacks for wap54g hardware -[ "$(nvram get boardnum)" = "2" \ --o "$(nvram get boardnum)" = "1024" ] && FAILSAFE_ifnames="eth0 eth1" - -# hack for asus wl-500g hardware -[ "$(nvram get boardnum)" = "asusX" \ --a "$(nvram get boardtype)" = "bcm94710dev" ] && FAILSAFE_ifnames="eth0 eth1 eth2" - -FAILSAFE_ifnames=${FAILSAFE_ifnames:-"vlan0 eth1 eth2"} - -DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"} -DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"} -DEFAULT_lan_hwaddr=${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"} - -# failsafe if reset is held -[ "$FAILSAFE" = "true" ] && { - echo "### YOU ARE IN FAILSAFE MODE ####" - lan_ifname="br0" - lan_ifnames=$FAILSAFE_ifnames - lan_ipaddr=$DEFAULT_lan_ipaddr - lan_netmask=$DEFAULT_lan_netmask - lan_hwaddr=$DEFAULT_lan_hwaddr - wan_ifname="none" - wifi_ifname="none" -} diff --git a/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig b/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig index 51be73b5ba..6a626f54a5 100755 --- a/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig +++ b/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig @@ -50,7 +50,7 @@ END { c["vlan1ports"] = "4 5" c["lan_ifnames"] = "vlan0 ath0" } - if (nvram["boardtype"] == "0x0467") { + if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) { c["vlan0ports"] = "0 1 2 3 5*" c["vlan1ports"] = "4 5" } @@ -101,6 +101,8 @@ END { print "" print "## PPP over Ethernet and PPTP" print "# wan_ifname=\"ppp0\"" + print "# ppp_username=\"my_username\"" + print "# ppp_passwd=\"my_password\"" print "# pptp_server_ip=\"192.168.0.1\"" } ' > /etc/config/network diff --git a/target/linux/package/base-files/files/brcm-2.6/etc/network.overrides b/target/linux/package/base-files/files/brcm-2.6/etc/network.overrides deleted file mode 100644 index ded748b260..0000000000 --- a/target/linux/package/base-files/files/brcm-2.6/etc/network.overrides +++ /dev/null @@ -1,31 +0,0 @@ -# NVRAM overrides -# -# This file handles the NVRAM quirks of various hardware. -# THIS FILE IS NOT A REPLACEMENT FOR NVRAM - -# Load sysconf defaults -[ -f /etc/sysconf ] && . /etc/sysconf - -DEFAULT_lan_proto="static" -DEFAULT_lan_ifname="br0" -DEFAULT_lan_ifnames="vlan0 ath0" -DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"} -DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"} -DEFAULT_lan_hwaddr=${DEFAULT_lan_hwaddr:-${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"}} -DEFAULT_vlan0hwname="et0" -DEFAULT_vlan1hwname="et0" -DEFAULT_et0macaddr=$(ifconfig eth0| awk '/eth0/ {print $5 }') -DEFAULT_wan_proto="dhcp" -DEFAULT_wan_ifname="vlan1" - -# failsafe if reset is held -[ "$FAILSAFE" = "true" ] && { - echo "### YOU ARE IN FAILSAFE MODE ####" - lan_ifname=${DEFAULT_lan_proto} - lan_ifnames=${FAILSAFE_ifnames:-${DEFAULT_lan_ifnames}} - lan_ipaddr=$DEFAULT_lan_ipaddr - lan_netmask=$DEFAULT_lan_netmask - lan_hwaddr=$DEFAULT_lan_hwaddr - wan_ifname="none" - wifi_ifname="none" -} diff --git a/target/linux/package/base-files/files/x86-2.4/etc/network.overrides b/target/linux/package/base-files/files/x86-2.4/etc/network.overrides deleted file mode 100644 index e857d5b5f1..0000000000 --- a/target/linux/package/base-files/files/x86-2.4/etc/network.overrides +++ /dev/null @@ -1,26 +0,0 @@ -# NVRAM overrides -# -# This file handles the NVRAM quirks of various hardware. -# THIS FILE IS NOT A REPLACEMENT FOR NVRAM - -# Load sysconf defaults -[ -f /etc/sysconf ] && . /etc/sysconf - -DEFAULT_lan_proto="static" -DEFAULT_lan_ifname="br0" -DEFAULT_lan_ifnames="eth0" -DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"} -DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"} -DEFAULT_lan_hwaddr=${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"} - -# failsafe if reset is held -[ "$FAILSAFE" = "true" ] && { - echo "### YOU ARE IN FAILSAFE MODE ####" - lan_ifname=${DEFAULT_lan_proto} - lan_ifnames=${FAILSAFE_ifnames:-${DEFAULT_lan_ifnames}} - lan_ipaddr=$DEFAULT_lan_ipaddr - lan_netmask=$DEFAULT_lan_netmask - lan_hwaddr=$DEFAULT_lan_hwaddr - wan_ifname="none" - wifi_ifname="none" -} diff --git a/target/linux/package/base-files/files/x86-2.6/etc/network.overrides b/target/linux/package/base-files/files/x86-2.6/etc/network.overrides deleted file mode 100644 index e857d5b5f1..0000000000 --- a/target/linux/package/base-files/files/x86-2.6/etc/network.overrides +++ /dev/null @@ -1,26 +0,0 @@ -# NVRAM overrides -# -# This file handles the NVRAM quirks of various hardware. -# THIS FILE IS NOT A REPLACEMENT FOR NVRAM - -# Load sysconf defaults -[ -f /etc/sysconf ] && . /etc/sysconf - -DEFAULT_lan_proto="static" -DEFAULT_lan_ifname="br0" -DEFAULT_lan_ifnames="eth0" -DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"} -DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"} -DEFAULT_lan_hwaddr=${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"} - -# failsafe if reset is held -[ "$FAILSAFE" = "true" ] && { - echo "### YOU ARE IN FAILSAFE MODE ####" - lan_ifname=${DEFAULT_lan_proto} - lan_ifnames=${FAILSAFE_ifnames:-${DEFAULT_lan_ifnames}} - lan_ipaddr=$DEFAULT_lan_ipaddr - lan_netmask=$DEFAULT_lan_netmask - lan_hwaddr=$DEFAULT_lan_hwaddr - wan_ifname="none" - wifi_ifname="none" -} -- cgit v1.2.3 From 0d3fffa91dee49ba80032ce5c67f1cb47aee8f4d Mon Sep 17 00:00:00 2001 From: nico Date: Tue, 8 Aug 2006 10:27:25 +0000 Subject: update busybox to v1.2.1 git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4528 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/busybox/Makefile | 4 +- package/busybox/config/Config.in | 146 +- package/busybox/config/archival/Config.in | 40 +- package/busybox/config/console-tools/Config.in | 13 + package/busybox/config/coreutils/Config.in | 154 +- package/busybox/config/debianutils/Config.in | 25 +- package/busybox/config/editors/Config.in | 30 +- package/busybox/config/findutils/Config.in | 40 +- package/busybox/config/init/Config.in | 23 +- package/busybox/config/loginutils/Config.in | 6 +- package/busybox/config/miscutils/Config.in | 68 +- package/busybox/config/modutils/Config.in | 8 +- package/busybox/config/networking/Config.in | 313 ++-- package/busybox/config/networking/udhcp/Config.in | 12 +- package/busybox/config/procps/Config.in | 8 +- package/busybox/config/shell/Config.in | 64 +- package/busybox/config/sysklogd/Config.in | 10 +- package/busybox/config/util-linux/Config.in | 81 +- package/busybox/patches/100-killall5.patch | 48 +- package/busybox/patches/110-telnetd.patch | 34 +- package/busybox/patches/150-udhcp-release.patch | 42 +- package/busybox/patches/300-netmsg.patch | 50 +- .../patches/320-httpd_address_binding.patch | 86 +- package/busybox/patches/340-lock_util.patch | 66 +- package/busybox/patches/911-ipkg.patch | 1518 ++++++++++---------- package/busybox/patches/912-ipkg-no_warnings.patch | 4 + package/busybox/patches/913-libbb_hash.patch | 110 +- package/busybox/patches/914-ipkg-fixes.patch | 4 + 28 files changed, 1653 insertions(+), 1354 deletions(-) (limited to 'package/busybox/config/networking/Config.in') diff --git a/package/busybox/Makefile b/package/busybox/Makefile index 6a359688a5..6e9cf4194a 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox -PKG_VERSION:=1.1.3 +PKG_VERSION:=1.2.1 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.busybox.net/downloads -PKG_MD5SUM:=19a0b475169335f17e421cf644616fe7 +PKG_MD5SUM:=362b3dc0f2023ddfda901dc1f1a74391 PKG_CAT:=bzcat include $(INCLUDE_DIR)/package.mk diff --git a/package/busybox/config/Config.in b/package/busybox/config/Config.in index eedb4ba407..6a5d6a74d1 100644 --- a/package/busybox/config/Config.in +++ b/package/busybox/config/Config.in @@ -12,9 +12,26 @@ menu "Busybox Settings" menu "General Configuration" +config BUSYBOX_CONFIG_NITPICK + bool "See lots more (probably unnecessary) configuration options." + default n + help + Some BusyBox applets have more configuration options than anyone + will ever care about. To avoid drowining people in complexity, most + of the applet features that can be set to a sane default value are + hidden, unless you hit the above switch. + + This is better than to telling people to edit the busybox source + code, but not by much. + + See http://en.wikipedia.org/wiki/Fibber_McGee_and_Molly#The_Closet + + You have been warned. + choice prompt "Buffer allocation policy" default BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK + depends on BUSYBOX_CONFIG_NITPICK help There are 3 ways BusyBox can handle buffer allocations: - Use malloc. This costs code size for the call to xmalloc. @@ -36,15 +53,39 @@ config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS endchoice +config BUSYBOX_CONFIG_SHOW_USAGE + bool "Show terse applet usage messages" + default y + help + All BusyBox applets will show help messages when invoked with + wrong arguments. You can turn off printing these terse usage + messages if you say no here. + This will save you up to 7k. + config BUSYBOX_CONFIG_FEATURE_VERBOSE_USAGE bool "Show verbose applet usage messages" default y + select BUSYBOX_CONFIG_SHOW_USAGE help All BusyBox applets will show more verbose help messages when busybox is invoked with --help. This will add a lot of text to the busybox binary. In the default configuration, this will add about 13k, but it can add much more depending on your configuration. +config BUSYBOX_CONFIG_FEATURE_COMPRESS_USAGE + bool "Store applet usage messages in compressed form" + default n + depends on BUSYBOX_CONFIG_SHOW_USAGE && BUSYBOX_CONFIG_NITPICK + help + Store usage messages in compressed form, uncompress them on-the-fly + when --help is called. + + If you have a really tiny busybox with few applets enabled (and + bunzip2 isn't one of them), the overhead of the decompressor might + be noticeable. Also, if you run executables directly from ROM + and have very little memory, this might not be a win. Otherwise, + you probably want this. + config BUSYBOX_CONFIG_FEATURE_INSTALLER bool "Support --install [-s] to install applet links at runtime" default n @@ -61,25 +102,29 @@ config BUSYBOX_CONFIG_LOCALE_SUPPORT Enable this if your system has locale support and you would like busybox to support locale settings. -config BUSYBOX_CONFIG_FEATURE_DEVFS - bool "Support for devfs" +config BUSYBOX_CONFIG_GETOPT_LONG + bool default y - help - Enable if you want BusyBox to work with devfs. +# bool "Enable support for --long-options" +# default n +# help +# Enable this if you want busybox applets to use the gnu --long-option +# style, in addition to single character -a -b -c style options. config BUSYBOX_CONFIG_FEATURE_DEVPTS bool "Use the devpts filesystem for Unix98 PTYs" - default y if BUSYBOX_CONFIG_FEATURE_DEVFS + default y help Enable if you want BusyBox to use Unix98 PTY support. If enabled, busybox will use /dev/ptmx for the master side of the pseudoterminal and /dev/pts/ for the slave side. Otherwise, BSD style /dev/ttyp will be used. To use this option, you should have - devpts or devfs mounted. + devpts mounted. config BUSYBOX_CONFIG_FEATURE_CLEAN_UP bool "Clean up all memory before exiting (usually not needed)" default n + depends on BUSYBOX_CONFIG_NITPICK help As a size optimization, busybox normally exits without explicitly freeing dynamically allocated memory or closing files. This saves @@ -93,15 +138,25 @@ config BUSYBOX_CONFIG_FEATURE_SUID bool "Support for SUID/SGID handling" default y help - Support SUID and SGID binaries. + With this option you can install the busybox binary belonging + to root with the suid bit set, and it'll and it'll automatically drop + priviledges for applets that don't need root access. + + If you're really paranoid and don't want to do this, build two + busybox binaries with different applets in them (and the appropriate + symlinks pointing to each binary), and only set the suid bit on the + one that needs it. The applets currently marked to need the suid bit + are login, passwd, su, ping, traceroute, crontab, dnsd, ipcrm, ipcs, + and vlock. config BUSYBOX_CONFIG_FEATURE_SUID_CONFIG bool "Runtime SUID/SGID configuration via /etc/busybox.conf" default n if BUSYBOX_CONFIG_FEATURE_SUID depends on BUSYBOX_CONFIG_FEATURE_SUID help - Allow the SUID / SGID state of an applet to be determined runtime by - checking /etc/busybox.conf. The format of this file is as follows: + Allow the SUID / SGID state of an applet to be determined at runtime + by checking /etc/busybox.conf. (This is sort of a poor man's sudo.) + The format of this file is as follows: = [Ssx-][Ssx-][x-] (|).(|) @@ -138,17 +193,32 @@ config BUSYBOX_CONFIG_SELINUX bool "Support NSA Security Enhanced Linux" default n help - Enable support for SE Linux in applets ls, ps, and id. Also provide - the option of compiling in SE Linux applets. + Enable support for SELinux in applets ls, ps, and id. Also provide + the option of compiling in SELinux applets. - If you do not have a complete SE Linux Full Userland installed, this - stuff will not compile. Go visit + If you do not have a complete SELinux userland installed, this stuff + will not compile. Go visit http://www.nsa.gov/selinux/index.html - to download the necessary stuff to allow busybox to compile with this - option enabled. + to download the necessary stuff to allow busybox to compile with + this option enabled. Specifially, libselinux 1.28 or better is + directly required by busybox. If the installation is located in a + non-standard directory, provide it by invoking make as follows: + CFLAGS=-I \ + LDFLAGS=-L \ + make Most people will leave this set to 'N'. +config BUSYBOX_CONFIG_BUSYBOX_EXEC_PATH + string "Path to BusyBox executable" + default "/proc/self/exe" + help + When Busybox applets need to run other busybox applets, BusyBox + sometimes needs to exec() itself. When the /proc filesystem is + mounted, /proc/self/exe always points to the currently running + executable. If you haven't got /proc, set this to wherever you + want to run BusyBox from. + endmenu menu 'Build Options' @@ -167,21 +237,18 @@ config BUSYBOX_CONFIG_STATIC Most people will leave this set to 'N'. -# The busybox shared library feature is there so make standalone can produce -# smaller applets. Since make standalone isn't in yet, there's nothing using -# this yet, and so it's disabled. -config BUSYBOX_CONFIG_DISABLE_SHARED - bool - default n - config BUSYBOX_CONFIG_BUILD_LIBBUSYBOX bool "Build shared libbusybox" default n - depends on BUSYBOX_CONFIG_DISABLE_SHARED help Build a shared library libbusybox.so which contains all libraries used inside busybox. + This is an experimental feature intended to support the upcoming + "make standalone" mode. Enabling it against the one big busybox + binary serves no purpose (and increases the size). You should + almost certainly say "no" to this right now. + config BUSYBOX_CONFIG_FEATURE_FULL_LIBBUSYBOX bool "Feature-complete libbusybox" default n if !CONFIG_FEATURE_SHARED_BUSYBOX @@ -239,15 +306,6 @@ config BUSYBOX_CROSS_COMPILER_PREFIX then I would enter '/usr/i386-linux-uclibc/bin/i386-uclibc-' here, which will ensure the correct compiler is used. -config BUSYBOX_EXTRA_CFLAGS_OPTIONS - string - default "-Os " - help - Do you want to pass any extra CFLAGS options to the compiler as - you build BusyBox? If so, this is the option for you... For example, - if you want to add some simple compiler switches (like -march=i686), - or check for warnings using -Werror, just those options here. - config BUSYBOX_CONFIG_BUILD_AT_ONCE bool "Compile all sources at once" default n @@ -272,17 +330,27 @@ endmenu menu 'Debugging Options' config BUSYBOX_CONFIG_DEBUG - bool "Build BusyBox with Debugging symbols" + bool "Build BusyBox with extra Debugging symbols" default n help - Say Y here if you wish to compile BusyBox with debugging symbols. - This will allow you to use a debugger to examine BusyBox internals - while applets are running. This increases the size of the binary - considerably and should only be used when doing development. - If you are doing development and want to debug BusyBox, answer Y. + Say Y here if you wish to examine BusyBox internals while applets are + running. This increases the size of the binary considerably, and + should only be used when doing development. If you are doing + development and want to debug BusyBox, answer Y. Most people should answer N. +config BUSYBOX_CONFIG_DEBUG_PESSIMIZE + bool "Disable compiler optimizations." + default n + depends on BUSYBOX_CONFIG_DEBUG + help + The compiler's optimization of source code can eliminate and reorder + code, resulting in an executable that's hard to understand when + stepping through it with a debugger. This switches it off, resulting + in a much bigger executable that more closely matches the source + code. + choice prompt "Additional debugging library" default BUSYBOX_CONFIG_NO_DEBUG_LIB @@ -329,7 +397,7 @@ config BUSYBOX_CONFIG_DEBUG_YANK_SUSv2 bool "Disable obsolete features removed before SUSv3?" default y help - This option will disable backwards compatability with SuSv2, + This option will disable backwards compatibility with SuSv2, specifically, old-style numeric options ('command -1 ') will not be supported in head, tail, and fold. (Note: should yank from renice too.) diff --git a/package/busybox/config/archival/Config.in b/package/busybox/config/archival/Config.in index bd5c4b140f..ac71d753a2 100644 --- a/package/busybox/config/archival/Config.in +++ b/package/busybox/config/archival/Config.in @@ -29,7 +29,7 @@ config BUSYBOX_CONFIG_AR probably say N here. config BUSYBOX_CONFIG_FEATURE_AR_LONG_FILENAMES - bool " Enable support for long filenames (not need for debs)" + bool "Enable support for long filenames (not need for debs)" default n depends on BUSYBOX_CONFIG_AR help @@ -89,7 +89,7 @@ config BUSYBOX_CONFIG_DPKG_DEB probably say N here. config BUSYBOX_CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY - bool " extract only (-x)" + bool "extract only (-x)" default n depends on BUSYBOX_CONFIG_DPKG_DEB help @@ -106,7 +106,7 @@ config BUSYBOX_CONFIG_GUNZIP an archive, without decompressing it. config BUSYBOX_CONFIG_FEATURE_GUNZIP_UNCOMPRESS - bool " Uncompress support" + bool "Uncompress support" default y depends on BUSYBOX_CONFIG_GUNZIP help @@ -150,7 +150,7 @@ config BUSYBOX_CONFIG_TAR UNIX archive program. config BUSYBOX_CONFIG_FEATURE_TAR_CREATE - bool " Enable archive creation" + bool "Enable archive creation" default y depends on BUSYBOX_CONFIG_TAR help @@ -158,7 +158,7 @@ config BUSYBOX_CONFIG_FEATURE_TAR_CREATE tar archives using the `-c' option. config BUSYBOX_CONFIG_FEATURE_TAR_BZIP2 - bool " Enable -j option to handle .tar.bz2 files" + bool "Enable -j option to handle .tar.bz2 files" default y depends on BUSYBOX_CONFIG_TAR help @@ -166,7 +166,7 @@ config BUSYBOX_CONFIG_FEATURE_TAR_BZIP2 archives compressed with bzip2. config BUSYBOX_CONFIG_FEATURE_TAR_LZMA - bool " Enable -a option to handle .tar.lzma files" + bool "Enable -a option to handle .tar.lzma files" default n depends on BUSYBOX_CONFIG_TAR help @@ -174,7 +174,7 @@ config BUSYBOX_CONFIG_FEATURE_TAR_LZMA archives compressed with lzma. config BUSYBOX_CONFIG_FEATURE_TAR_FROM - bool " Enable -X (exclude from) and -T (include from) options)" + bool "Enable -X (exclude from) and -T (include from) options)" default y depends on BUSYBOX_CONFIG_TAR help @@ -182,7 +182,7 @@ config BUSYBOX_CONFIG_FEATURE_TAR_FROM a list of files to include or exclude from an archive. config BUSYBOX_CONFIG_FEATURE_TAR_GZIP - bool " Enable -z option" + bool "Enable -z option" default y depends on BUSYBOX_CONFIG_TAR help @@ -190,15 +190,15 @@ config BUSYBOX_CONFIG_FEATURE_TAR_GZIP when creating or extracting tar gziped archives. config BUSYBOX_CONFIG_FEATURE_TAR_COMPRESS - bool " Enable -Z option" + bool "Enable -Z option" default n depends on BUSYBOX_CONFIG_TAR help If you enable this option tar will be able to call uncompress, when extracting .tar.Z archives. -config BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY - bool " Enable support for old tar header format" +config BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY + bool "Enable support for old tar header format" default n depends on BUSYBOX_CONFIG_TAR help @@ -207,7 +207,7 @@ config BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY repacking your ancient archives with the new format. config BUSYBOX_CONFIG_FEATURE_TAR_GNU_EXTENSIONS - bool " Enable support for some GNU tar extensions" + bool "Enable support for some GNU tar extensions" default y depends on BUSYBOX_CONFIG_TAR help @@ -215,9 +215,9 @@ config BUSYBOX_CONFIG_FEATURE_TAR_GNU_EXTENSIONS linknames. config BUSYBOX_CONFIG_FEATURE_TAR_LONG_OPTIONS - bool " Enable long options" + bool "Enable long options" default n - depends on BUSYBOX_CONFIG_TAR + depends on BUSYBOX_CONFIG_TAR && BUSYBOX_CONFIG_GETOPT_LONG help Enable use of long options, increases size by about 400 Bytes @@ -244,11 +244,11 @@ config BUSYBOX_CONFIG_UNLZMA should probably say N here. config BUSYBOX_CONFIG_FEATURE_LZMA_FAST - bool " Optimze unlzma for speed" + bool "Optimze unlzma for speed" default n depends on BUSYBOX_CONFIG_UNLZMA help - This option reduce decompression time by about 33% at the cost of + This option reduces decompression time by about 33% at the cost of a 2K bigger binary. config BUSYBOX_CONFIG_UNZIP @@ -265,7 +265,7 @@ comment "Common options for cpio and tar" depends on BUSYBOX_CONFIG_CPIO || BUSYBOX_CONFIG_TAR config BUSYBOX_CONFIG_FEATURE_UNARCHIVE_TAPE - bool " Enable tape drive support" + bool "Enable tape drive support" default n depends on BUSYBOX_CONFIG_CPIO || BUSYBOX_CONFIG_TAR help @@ -275,7 +275,7 @@ comment "Common options for dpkg and dpkg_deb" depends on BUSYBOX_CONFIG_DPKG || BUSYBOX_CONFIG_DPKG_DEB config BUSYBOX_CONFIG_FEATURE_DEB_TAR_GZ - bool " gzip debian packages (normal)" + bool "gzip debian packages (normal)" default n if BUSYBOX_CONFIG_DPKG || BUSYBOX_CONFIG_DPKG_DEB depends on BUSYBOX_CONFIG_DPKG || BUSYBOX_CONFIG_DPKG_DEB help @@ -284,7 +284,7 @@ config BUSYBOX_CONFIG_FEATURE_DEB_TAR_GZ If you want compatibility with standard .deb's you should say yes here. config BUSYBOX_CONFIG_FEATURE_DEB_TAR_BZ2 - bool " bzip2 debian packages" + bool "bzip2 debian packages" default n depends on BUSYBOX_CONFIG_DPKG || BUSYBOX_CONFIG_DPKG_DEB help @@ -295,7 +295,7 @@ config BUSYBOX_CONFIG_FEATURE_DEB_TAR_BZ2 use an internal control.tar.bz2 or data.tar.bz2. config BUSYBOX_CONFIG_FEATURE_DEB_TAR_LZMA - bool " lzma debian packages" + bool "lzma debian packages" default n depends on BUSYBOX_CONFIG_DPKG || BUSYBOX_CONFIG_DPKG_DEB help diff --git a/package/busybox/config/console-tools/Config.in b/package/busybox/config/console-tools/Config.in index 4faaeb44b6..1efe300982 100644 --- a/package/busybox/config/console-tools/Config.in +++ b/package/busybox/config/console-tools/Config.in @@ -65,6 +65,13 @@ config BUSYBOX_CONFIG_SETCONSOLE This program redirects the system console to another device, like the current tty while logged in via telnet. +config BUSYBOX_CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_SET_CONSOLE && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the setconsole applet. + config BUSYBOX_CONFIG_SETKEYCODES bool "setkeycodes" default n @@ -72,4 +79,10 @@ config BUSYBOX_CONFIG_SETKEYCODES This program loads entries into the kernel's scancode-to-keycode map, allowing unusual keyboards to generate usable keycodes. +config BUSYBOX_CONFIG_SETLOGCONS + bool "setlogcons" + default n + help + This program redirects the output console of kernel messages. + endmenu diff --git a/package/busybox/config/coreutils/Config.in b/package/busybox/config/coreutils/Config.in index 53984e3951..6aaee5eb99 100644 --- a/package/busybox/config/coreutils/Config.in +++ b/package/busybox/config/coreutils/Config.in @@ -26,6 +26,13 @@ config BUSYBOX_CONFIG_CAT cat is used to concatenate files and print them to the standard output. Enable this option if you wish to enable the 'cat' utility. +config BUSYBOX_CONFIG_CATV + bool "catv" + default n + help + Display nonprinting characters as escape sequences (like some + implementations' cat -v option). + config BUSYBOX_CONFIG_CHGRP bool "chgrp" default y @@ -52,6 +59,12 @@ config BUSYBOX_CONFIG_CHROOT chroot is used to change the root directory and run a command. The default command is `/bin/sh'. +config BUSYBOX_CONFIG_CKSUM + bool "cksum" + default n + help + cksum is used to calculate the CRC32 checksum of a file. + config BUSYBOX_CONFIG_CMP bool "cmp" default n @@ -87,7 +100,7 @@ config BUSYBOX_CONFIG_DATE current time in the given format. config BUSYBOX_CONFIG_FEATURE_DATE_ISOFMT - bool " Enable ISO date format output (-I)" + bool "Enable ISO date format output (-I)" default y depends on BUSYBOX_CONFIG_DATE help @@ -102,6 +115,26 @@ config BUSYBOX_CONFIG_DD by default) using specific input and output blocksizes, while optionally performing conversions on it. +config BUSYBOX_CONFIG_FEATURE_DD_SIGNAL_HANDLING + bool "Enable DD signal handling for status reporting" + default y + depends on BUSYBOX_CONFIG_DD + help + sending a SIGUSR1 signal to a running `dd' process makes it + print to standard error the number of records read and written + so far, then to resume copying. + + $ dd if=/dev/zero of=/dev/null& pid=$! $ kill -USR1 $pid; sleep 1; kill $pid + 10899206+0 records in 10899206+0 records out + +config BUSYBOX_CONFIG_FEATURE_DD_IBS_OBS + bool "Enable ibs, obs and conv options" + default n + depends on BUSYBOX_CONFIG_DD + help + Enables support for writing a certain number of bytes in and out, + at a time, and performing conversions on the data stream. + config BUSYBOX_CONFIG_DF bool "df" default y @@ -109,6 +142,38 @@ config BUSYBOX_CONFIG_DF df reports the amount of disk space used and available on filesystems. +config BUSYBOX_CONFIG_DIFF + bool "diff" + default n + help + diff compares two files or directories and outputs the + differences between them in a form that can be given to + the patch command. + +config BUSYBOX_CONFIG_FEATURE_DIFF_BINARY + bool "Enable checks for binary files" + default n + depends on BUSYBOX_CONFIG_DIFF + help + This option enables support for checking for binary files + before a comparison is carried out. + +config BUSYBOX_CONFIG_FEATURE_DIFF_DIR + bool "Enable directory support" + default n + depends on BUSYBOX_CONFIG_DIFF + help + This option enables support for directory and subdirectory + comparison. + +config BUSYBOX_CONFIG_FEATURE_DIFF_MINIMAL + bool "Enable -d option to find smaller sets of changes" + default n + depends on BUSYBOX_CONFIG_DIFF + help + Enabling this option allows the use of -d to make diff + try hard to find the smallest possible set of changes. + config BUSYBOX_CONFIG_DIRNAME bool "dirname" default y @@ -127,6 +192,9 @@ config BUSYBOX_CONFIG_UNIX2DOS bool default n depends on BUSYBOX_CONFIG_DOS2UNIX + help + unix2dos is used to convert a text file from UNIX format to + DOS format, and vice versa. config BUSYBOX_CONFIG_DU bool "du (default blocksize of 512 bytes)" @@ -135,8 +203,8 @@ config BUSYBOX_CONFIG_DU du is used to report the amount of disk space used for specified files. -config BUSYBOX_CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K - bool " Use a default blocksize of 1024 bytes (1K)" +config BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K + bool "Use a default blocksize of 1024 bytes (1K)" default y depends on BUSYBOX_CONFIG_DU help @@ -150,7 +218,7 @@ config BUSYBOX_CONFIG_ECHO # this entry also appears in shell/Config.in, next to the echo builtin config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO - bool " Enable echo options (-n and -e)" + bool "Enable echo options (-n and -e)" default y depends on BUSYBOX_CONFIG_ECHO help @@ -164,6 +232,13 @@ config BUSYBOX_CONFIG_ENV a command; without options it displays the current environment. +config BUSYBOX_CONFIG_FEATURE_ENV_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_ENV && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the env applet. + config BUSYBOX_CONFIG_EXPR bool "expr" default y @@ -172,7 +247,7 @@ config BUSYBOX_CONFIG_EXPR to standard output. config BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64 - bool " Extend Posix numbers support to 64 bit" + bool "Extend Posix numbers support to 64 bit" default n depends on BUSYBOX_CONFIG_EXPR help @@ -200,7 +275,7 @@ config BUSYBOX_CONFIG_HEAD from files. config BUSYBOX_CONFIG_FEATURE_FANCY_HEAD - bool " Enable head options (-c, -q, and -v)" + bool "Enable head options (-c, -q, and -v)" default y depends on BUSYBOX_CONFIG_HEAD help @@ -225,6 +300,13 @@ config BUSYBOX_CONFIG_INSTALL help Copy files and set attributes. +config BUSYBOX_CONFIG_FEATURE_INSTALL_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_INSTALL && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the install applet. + config BUSYBOX_CONFIG_LENGTH bool "length" default y @@ -250,56 +332,56 @@ config BUSYBOX_CONFIG_LS ls is used to list the contents of directories. config BUSYBOX_CONFIG_FEATURE_LS_FILETYPES - bool " Enable filetyping options (-p and -F)" + bool "Enable filetyping options (-p and -F)" default y depends on BUSYBOX_CONFIG_LS help Enable the ls options (-p and -F). config BUSYBOX_CONFIG_FEATURE_LS_FOLLOWLINKS - bool " Enable symlinks dereferencing (-L)" + bool "Enable symlinks dereferencing (-L)" default y depends on BUSYBOX_CONFIG_LS help Enable the ls option (-L). config BUSYBOX_CONFIG_FEATURE_LS_RECURSIVE - bool " Enable recursion (-R)" + bool "Enable recursion (-R)" default y depends on BUSYBOX_CONFIG_LS help Enable the ls option (-R). config BUSYBOX_CONFIG_FEATURE_LS_SORTFILES - bool " Sort the file names" + bool "Sort the file names" default y depends on BUSYBOX_CONFIG_LS help Allow ls to sort file names alphabetically. config BUSYBOX_CONFIG_FEATURE_LS_TIMESTAMPS - bool " Show file timestamps" + bool "Show file timestamps" default y depends on BUSYBOX_CONFIG_LS help Allow ls to display timestamps for files. config BUSYBOX_CONFIG_FEATURE_LS_USERNAME - bool " Show username/groupnames" + bool "Show username/groupnames" default y depends on BUSYBOX_CONFIG_LS help Allow ls to display username/groupname for files. config BUSYBOX_CONFIG_FEATURE_LS_COLOR - bool " Allow use of color to identify file types" + bool "Allow use of color to identify file types" default y - depends on BUSYBOX_CONFIG_LS + depends on BUSYBOX_CONFIG_LS && BUSYBOX_CONFIG_GETOPT_LONG help This enables the --color option to ls. config BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT - bool " Produce colored ls output by default" + bool "Produce colored ls output by default" default y depends on BUSYBOX_CONFIG_FEATURE_LS_COLOR help @@ -321,6 +403,13 @@ config BUSYBOX_CONFIG_MKDIR help mkdir is used to create directories with the specified names. +config BUSYBOX_CONFIG_FEATURE_MKDIR_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_MKDIR && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the mkdir applet. + config BUSYBOX_CONFIG_MKFIFO bool "mkfifo" default y @@ -341,6 +430,13 @@ config BUSYBOX_CONFIG_MV help mv is used to move or rename files or directories. +config BUSYBOX_CONFIG_FEATURE_MV_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_MV && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the mv applet. + config BUSYBOX_CONFIG_NICE bool "nice" default n @@ -416,7 +512,7 @@ config BUSYBOX_CONFIG_SLEEP sleep is used to pause for a specified number of seconds, config BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP - bool " Enable multiple integer args and optional time suffixes" + bool "Enable multiple integer args and optional time suffixes" default y depends on BUSYBOX_CONFIG_SLEEP help @@ -429,7 +525,7 @@ config BUSYBOX_CONFIG_SORT sort is used to sort lines of text in specified files. config BUSYBOX_CONFIG_FEATURE_SORT_BIG - bool " full SuSv3 compliant sort (Support -ktcsbdfiozgM)" + bool "full SuSv3 compliant sort (Support -ktcsbdfiozgM)" default n depends on BUSYBOX_CONFIG_SORT help @@ -447,7 +543,7 @@ config BUSYBOX_CONFIG_STAT display file or filesystem status. config BUSYBOX_CONFIG_FEATURE_STAT_FORMAT - bool " Enable custom formats (-c)" + bool "Enable custom formats (-c)" default n depends on BUSYBOX_CONFIG_STAT help @@ -481,7 +577,7 @@ config BUSYBOX_CONFIG_TAIL from files. config BUSYBOX_CONFIG_FEATURE_FANCY_TAIL - bool " Enable extra tail options (-q, -s, and -v)" + bool "Enable extra tail options (-q, -s, and -v)" default y depends on BUSYBOX_CONFIG_TAIL help @@ -496,7 +592,7 @@ config BUSYBOX_CONFIG_TEE to standard output and files. config BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO - bool " Enable block i/o (larger/faster) instead of byte i/o." + bool "Enable block i/o (larger/faster) instead of byte i/o." default y depends on BUSYBOX_CONFIG_TEE help @@ -507,11 +603,11 @@ config BUSYBOX_CONFIG_TEST default y help test is used to check file types and compare values, - returning an appropriate exit code. The shells (ash - and bash) have test builtin. + returning an appropriate exit code. The bash shell + has test built in, ash can build it in optionally. config BUSYBOX_CONFIG_FEATURE_TEST_64 - bool " Extend test to 64 bit" + bool "Extend test to 64 bit" default n depends on BUSYBOX_CONFIG_TEST help @@ -532,7 +628,7 @@ config BUSYBOX_CONFIG_TR input, writing to standard output. config BUSYBOX_CONFIG_FEATURE_TR_CLASSES - bool " Enable character classes (such as [:upper:])" + bool "Enable character classes (such as [:upper:])" default n depends on BUSYBOX_CONFIG_TR help @@ -540,7 +636,7 @@ config BUSYBOX_CONFIG_FEATURE_TR_CLASSES tr [:upper:] [:lower:] to convert input into lowercase. config BUSYBOX_CONFIG_FEATURE_TR_EQUIV - bool " Enable equivalence classes" + bool "Enable equivalence classes" default n depends on BUSYBOX_CONFIG_TR help @@ -633,7 +729,7 @@ comment "Common options for cp and mv" depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV config BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS - bool " Preserve hard links" + bool "Preserve hard links" default y depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV help @@ -643,7 +739,7 @@ comment "Common options for ls, more and telnet" depends on BUSYBOX_CONFIG_LS || BUSYBOX_CONFIG_MORE || BUSYBOX_CONFIG_TELNET config BUSYBOX_CONFIG_FEATURE_AUTOWIDTH - bool " Calculate terminal & column widths" + bool "Calculate terminal & column widths" default y depends on BUSYBOX_CONFIG_LS || BUSYBOX_CONFIG_MORE || BUSYBOX_CONFIG_TELNET help @@ -657,7 +753,7 @@ comment "Common options for df, du, ls" depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE - bool " Support for human readable output (example 13k, 23M, 235G)" + bool "Support for human readable output (example 13k, 23M, 235G)" default y depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS help @@ -667,7 +763,7 @@ comment "Common options for md5sum, sha1sum" depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK - bool " Enable -c, -s and -w options" + bool "Enable -c, -s and -w options" default y depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM help diff --git a/package/busybox/config/debianutils/Config.in b/package/busybox/config/debianutils/Config.in index 71f2bf38af..bc98103c72 100644 --- a/package/busybox/config/debianutils/Config.in +++ b/package/busybox/config/debianutils/Config.in @@ -25,7 +25,7 @@ config BUSYBOX_CONFIG_READLINK of the file it points to config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW - bool " Enable canonicalization by following all symlinks (-f)" + bool "Enable canonicalization by following all symlinks (-f)" default n depends on BUSYBOX_CONFIG_READLINK help @@ -46,6 +46,13 @@ config BUSYBOX_CONFIG_RUN_PARTS Unless you know that run-parts is used in some of your scripts you can safely say N here. +config BUSYBOX_CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_RUN_PARTS && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the run-parts applet. + config BUSYBOX_CONFIG_START_STOP_DAEMON bool "start-stop-daemon" default n @@ -54,6 +61,22 @@ config BUSYBOX_CONFIG_START_STOP_DAEMON termination of system-level processes, usually the ones started during the startup of the system. +config BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_FANCY + bool "Support additional arguments" + default n + depends on BUSYBOX_CONFIG_START_STOP_DAEMON + help + Support additional arguments. + -o|--oknodo ignored since we exit with 0 anyway + -v|--verbose + +config BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_START_STOP_DAEMON && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the start-stop-daemon applet. + config BUSYBOX_CONFIG_WHICH bool "which" default y diff --git a/package/busybox/config/editors/Config.in b/package/busybox/config/editors/Config.in index 85074b333f..3c1a320bc3 100644 --- a/package/busybox/config/editors/Config.in +++ b/package/busybox/config/editors/Config.in @@ -13,13 +13,21 @@ config BUSYBOX_CONFIG_AWK the BusyBox implementation of that programming language. config BUSYBOX_CONFIG_FEATURE_AWK_MATH - bool " Enable math functions (requires libm)" + bool "Enable math functions (requires libm)" default y depends on BUSYBOX_CONFIG_AWK help Enable math functions of the Awk programming language. NOTE: This will require libm to be present for linking. +config BUSYBOX_CONFIG_ED + bool "ed" + default n + help + The original 1970's Unix text editor, from the days of teletypes. + Small, simple, evil. Part of SUSv3. If you're not already using + this, you don't need it. + config BUSYBOX_CONFIG_PATCH bool "patch" default n @@ -43,7 +51,7 @@ config BUSYBOX_CONFIG_VI you may wish to use something else. config BUSYBOX_CONFIG_FEATURE_VI_COLON - bool " Enable \":\" colon commands (no \"ex\" mode)" + bool "Enable \":\" colon commands (no \"ex\" mode)" default y depends on BUSYBOX_CONFIG_VI help @@ -51,7 +59,7 @@ config BUSYBOX_CONFIG_FEATURE_VI_COLON provide an "ex" mode. config BUSYBOX_CONFIG_FEATURE_VI_YANKMARK - bool " Enable yank/put commands and mark cmds" + bool "Enable yank/put commands and mark cmds" default y depends on BUSYBOX_CONFIG_VI help @@ -59,7 +67,7 @@ config BUSYBOX_CONFIG_FEATURE_VI_YANKMARK busybox vi. config BUSYBOX_CONFIG_FEATURE_VI_SEARCH - bool " Enable search and replace cmds" + bool "Enable search and replace cmds" default y depends on BUSYBOX_CONFIG_VI help @@ -67,7 +75,7 @@ config BUSYBOX_CONFIG_FEATURE_VI_SEARCH busybox vi. config BUSYBOX_CONFIG_FEATURE_VI_USE_SIGNALS - bool " Catch signals" + bool "Catch signals" default y depends on BUSYBOX_CONFIG_VI help @@ -76,14 +84,14 @@ config BUSYBOX_CONFIG_FEATURE_VI_USE_SIGNALS Ctrl-Z and Ctrl-C and alarms. config BUSYBOX_CONFIG_FEATURE_VI_DOT_CMD - bool " Remember previous cmd and \".\" cmd" + bool "Remember previous cmd and \".\" cmd" default y depends on BUSYBOX_CONFIG_VI help Make busybox vi remember the last command and be able to repeat it. config BUSYBOX_CONFIG_FEATURE_VI_READONLY - bool " Enable -R option and \"view\" mode" + bool "Enable -R option and \"view\" mode" default y depends on BUSYBOX_CONFIG_VI help @@ -91,28 +99,28 @@ config BUSYBOX_CONFIG_FEATURE_VI_READONLY open a file in read-only mode. config BUSYBOX_CONFIG_FEATURE_VI_SETOPTS - bool " Enable set-able options, ai ic showmatch" + bool "Enable set-able options, ai ic showmatch" default y depends on BUSYBOX_CONFIG_VI help Enable the editor to set some (ai, ic, showmatch) options. config BUSYBOX_CONFIG_FEATURE_VI_SET - bool " Support for :set" + bool "Support for :set" default y depends on BUSYBOX_CONFIG_VI help Support for ":set". config BUSYBOX_CONFIG_FEATURE_VI_WIN_RESIZE - bool " Handle window resize" + bool "Handle window resize" default y depends on BUSYBOX_CONFIG_VI help Make busybox vi behave nicely with terminals that get resized. config BUSYBOX_CONFIG_FEATURE_VI_OPTIMIZE_CURSOR - bool " Optimize cursor movement" + bool "Optimize cursor movement" default y depends on BUSYBOX_CONFIG_VI help diff --git a/package/busybox/config/findutils/Config.in b/package/busybox/config/findutils/Config.in index 9667bfba81..e708259888 100644 --- a/package/busybox/config/findutils/Config.in +++ b/package/busybox/config/findutils/Config.in @@ -11,8 +11,18 @@ config BUSYBOX_CONFIG_FIND help find is used to search your system to find specified files. +config BUSYBOX_CONFIG_FEATURE_FIND_PRINT0 + bool "Enable -print0 option" + default y + depends on BUSYBOX_CONFIG_FIND + help + Causes output names to be separated by a null character + rather than a newline. This allows names that contain + newlines and other whitespace to be more easily + interpreted by other programs. + config BUSYBOX_CONFIG_FEATURE_FIND_MTIME - bool " Enable modified time matching (-mtime) option" + bool "Enable modified time matching (-mtime) option" default n depends on BUSYBOX_CONFIG_FIND help @@ -20,7 +30,7 @@ config BUSYBOX_CONFIG_FEATURE_FIND_MTIME files, in days. config BUSYBOX_CONFIG_FEATURE_FIND_MMIN - bool " Enable modified time matching (-min) option" + bool "Enable modified time matching (-min) option" default n depends on BUSYBOX_CONFIG_FIND help @@ -28,14 +38,14 @@ config BUSYBOX_CONFIG_FEATURE_FIND_MMIN files, in minutes. config BUSYBOX_CONFIG_FEATURE_FIND_PERM - bool " Enable permissions matching (-perm) option" + bool "Enable permissions matching (-perm) option" default y depends on BUSYBOX_CONFIG_FIND help Enable searching based on file permissions. config BUSYBOX_CONFIG_FEATURE_FIND_TYPE - bool " Enable filetype matching (-type) option" + bool "Enable filetype matching (-type) option" default y depends on BUSYBOX_CONFIG_FIND help @@ -43,7 +53,7 @@ config BUSYBOX_CONFIG_FEATURE_FIND_TYPE directory, socket, device, etc.). config BUSYBOX_CONFIG_FEATURE_FIND_XDEV - bool " Enable stay in filesystem (-xdev) option" + bool "Enable stay in filesystem (-xdev) option" default y depends on BUSYBOX_CONFIG_FIND help @@ -51,7 +61,7 @@ config BUSYBOX_CONFIG_FEATURE_FIND_XDEV filesystem. config BUSYBOX_CONFIG_FEATURE_FIND_NEWER - bool " Enable -newer option for comparing file mtimes" + bool "Enable -newer option for comparing file mtimes" default n depends on BUSYBOX_CONFIG_FIND help @@ -59,14 +69,14 @@ config BUSYBOX_CONFIG_FEATURE_FIND_NEWER a modified time that is more recent than the specified FILE. config BUSYBOX_CONFIG_FEATURE_FIND_INUM - bool " Enable inode number matching (-inum) option" + bool "Enable inode number matching (-inum) option" default n depends on BUSYBOX_CONFIG_FIND help Support the 'find -inum' option for searching by inode number. config BUSYBOX_CONFIG_FEATURE_FIND_EXEC - bool " Enable (-exec) option allowing execution of commands" + bool "Enable (-exec) option allowing execution of commands" default y depends on BUSYBOX_CONFIG_FIND help @@ -80,7 +90,7 @@ config BUSYBOX_CONFIG_GREP grep is used to search files for a specified pattern. config BUSYBOX_CONFIG_FEATURE_GREP_EGREP_ALIAS - bool " Support extended regular expressions (egrep & grep -E)" + bool "Support extended regular expressions (egrep & grep -E)" default y depends on BUSYBOX_CONFIG_GREP help @@ -89,7 +99,7 @@ config BUSYBOX_CONFIG_FEATURE_GREP_EGREP_ALIAS and various repetition operators. config BUSYBOX_CONFIG_FEATURE_GREP_FGREP_ALIAS - bool " Alias fgrep to grep -F" + bool "Alias fgrep to grep -F" default y depends on BUSYBOX_CONFIG_GREP help @@ -98,7 +108,7 @@ config BUSYBOX_CONFIG_FEATURE_GREP_FGREP_ALIAS grep -F is always builtin, this just creates the fgrep alias. config BUSYBOX_CONFIG_FEATURE_GREP_CONTEXT - bool " Enable before and after context flags (-A, -B and -C)" + bool "Enable before and after context flags (-A, -B and -C)" default y depends on BUSYBOX_CONFIG_GREP help @@ -114,7 +124,7 @@ config BUSYBOX_CONFIG_XARGS every item from standard input. config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION - bool " Enable prompt and confirmation option -p" + bool "Enable prompt and confirmation option -p" default y depends on BUSYBOX_CONFIG_XARGS help @@ -122,7 +132,7 @@ config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION line and read a line from the terminal. config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_QUOTES - bool " Enable support single and double quotes and backslash" + bool "Enable support single and double quotes and backslash" default y depends on BUSYBOX_CONFIG_XARGS help @@ -130,7 +140,7 @@ config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_QUOTES and backslash for can use aruments with spaces. config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT - bool " Enable support options -x" + bool "Enable support options -x" default y depends on BUSYBOX_CONFIG_XARGS help @@ -138,7 +148,7 @@ config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is exceeded. config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM - bool " Enable options -0" + bool "Enable options -0" default y depends on BUSYBOX_CONFIG_XARGS help diff --git a/package/busybox/config/init/Config.in b/package/busybox/config/init/Config.in index 88dcaca2d3..3696f7017f 100644 --- a/package/busybox/config/init/Config.in +++ b/package/busybox/config/init/Config.in @@ -11,15 +11,23 @@ config BUSYBOX_CONFIG_INIT help init is the first program run when the system boots. +config BUSYBOX_CONFIG_DEBUG_INIT + bool "debugging aid" + default n + depends on BUSYBOX_CONFIG_INIT + help + Turn this on to disable all the dangerous + rebooting stuff when debugging. + config BUSYBOX_CONFIG_FEATURE_USE_INITTAB - bool " Support reading an inittab file" + bool "Support reading an inittab file" default y depends on BUSYBOX_CONFIG_INIT help Allow init to read an inittab file when the system boot. config BUSYBOX_CONFIG_FEATURE_INIT_SCTTY - bool " Support running commands with a controlling-tty" + bool "Support running commands with a controlling-tty" default n depends on BUSYBOX_CONFIG_INIT help @@ -30,14 +38,14 @@ config BUSYBOX_CONFIG_FEATURE_INIT_SCTTY the console is only accessed during development or for maintenance. config BUSYBOX_CONFIG_FEATURE_EXTRA_QUIET - bool " Be _extra_ quiet on boot" + bool "Be _extra_ quiet on boot" default n depends on BUSYBOX_CONFIG_INIT help Prevent init from logging some messages to the console during boot. config BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS - bool " Support dumping core for child processes (debugging only)" + bool "Support dumping core for child processes (debugging only)" default n depends on BUSYBOX_CONFIG_INIT help @@ -49,7 +57,7 @@ config BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS config BUSYBOX_CONFIG_FEATURE_INITRD - bool " Support running init from within an initrd (not initramfs)" + bool "Support running init from within an initrd (not initramfs)" default n depends on BUSYBOX_CONFIG_INIT help @@ -72,9 +80,4 @@ config BUSYBOX_CONFIG_MESG Mesg controls access to your terminal by others. It is typically used to allow or disallow other users to write to your terminal - default y - help - Stop all processes and (try to) power off the system. - endmenu - diff --git a/package/busybox/config/loginutils/Config.in b/package/busybox/config/loginutils/Config.in index 621d57643f..33a764e35c 100644 --- a/package/busybox/config/loginutils/Config.in +++ b/package/busybox/config/loginutils/Config.in @@ -84,14 +84,14 @@ config BUSYBOX_CONFIG_GETTY getty lets you log in on a tty, it is normally invoked by init. config BUSYBOX_CONFIG_FEATURE_UTMP - bool " Support utmp file" + bool "Support utmp file" depends on BUSYBOX_CONFIG_GETTY || BUSYBOX_CONFIG_LOGIN || BUSYBOX_CONFIG_SU || BUSYBOX_CONFIG_WHO default n help The file /var/run/utmp is used to track who is currently logged in. config BUSYBOX_CONFIG_FEATURE_WTMP - bool " Support wtmp file" + bool "Support wtmp file" depends on BUSYBOX_CONFIG_GETTY || BUSYBOX_CONFIG_LOGIN || BUSYBOX_CONFIG_SU || BUSYBOX_CONFIG_LAST default n select BUSYBOX_CONFIG_FEATURE_UTMP @@ -110,7 +110,7 @@ config BUSYBOX_CONFIG_LOGIN work properly. config BUSYBOX_CONFIG_FEATURE_SECURETTY - bool " Support for /etc/securetty" + bool "Support for /etc/securetty" default n depends on BUSYBOX_CONFIG_LOGIN help diff --git a/package/busybox/config/miscutils/Config.in b/package/busybox/config/miscutils/Config.in index 404170188e..f13d8ba0bc 100644 --- a/package/busybox/config/miscutils/Config.in +++ b/package/busybox/config/miscutils/Config.in @@ -34,8 +34,15 @@ config BUSYBOX_CONFIG_CROND Note that Busybox binary must be setuid root for this applet to work properly. +config BUSYBOX_CONFIG_DEBUG_CROND_OPTION + bool "Support debug option -d" + depends on BUSYBOX_CONFIG_CROND + default n + help + Support option -d to enter debug mode. + config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL - bool " Using /usr/sbin/sendmail?" + bool "Using /usr/sbin/sendmail?" default n depends on BUSYBOX_CONFIG_CROND help @@ -57,9 +64,11 @@ config BUSYBOX_CONFIG_DC precision arithmetic. config BUSYBOX_CONFIG_DEVFSD - bool "devfsd" + bool "devfsd (obsolete)" default n help + This is deprecated, and will be going away in a future release. + Provides compatibility with old device names on a devfs systems. You should set it to true if you have devfs enabled. The following keywords in devsfd.conf are supported: @@ -74,7 +83,8 @@ config BUSYBOX_CONFIG_DEVFSD_MODLOAD default n depends on BUSYBOX_CONFIG_DEVFSD help - This actually doesn't work with busybox modutils but needs the real modutils. + This actually doesn't work with busybox modutils but needs + the external modutils. config BUSYBOX_CONFIG_DEVFSD_FG_NP bool "Enables the -fg and -np options" @@ -91,6 +101,17 @@ config BUSYBOX_CONFIG_DEVFSD_VERBOSE help Increases logging to stderr or syslog. +config BUSYBOX_CONFIG_FEATURE_DEVFS + bool " Use devfs names for all devices (obsolete)" + default y + help + This tells busybox to look for names like /dev/loop/0 instead of + /dev/loop0. If your /dev directory has normal names instead of + devfs names, you don't want this. + + This is obsolete and will be going away someday. Consider it + deprecated. + config BUSYBOX_CONFIG_EJECT bool "eject" default n @@ -112,7 +133,7 @@ config BUSYBOX_CONFIG_LESS a wide array of features, and is an improvement over 'more'. config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS - bool " Enable bracket searching" + bool "Enable bracket searching" default n depends on BUSYBOX_CONFIG_LESS help @@ -120,7 +141,7 @@ config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS brackets, facilitating programming. config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS - bool " Enable extra flags" + bool "Enable extra flags" default n depends on BUSYBOX_CONFIG_LESS help @@ -130,7 +151,7 @@ config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS The -m flag enables a simpler status line with a percentage. config BUSYBOX_CONFIG_FEATURE_LESS_FLAGCS - bool " Enable flag changes" + bool "Enable flag changes" default n depends on BUSYBOX_CONFIG_LESS help @@ -138,14 +159,14 @@ config BUSYBOX_CONFIG_FEATURE_LESS_FLAGCS less itself. config BUSYBOX_CONFIG_FEATURE_LESS_MARKS - bool " Enable marks" + bool "Enable marks" default n depends on BUSYBOX_CONFIG_LESS help Marks enable positions in a file to be stored for easy reference. config BUSYBOX_CONFIG_FEATURE_LESS_REGEXP - bool " Enable regular expressions" + bool "Enable regular expressions" default n depends on BUSYBOX_CONFIG_LESS help @@ -160,16 +181,17 @@ config BUSYBOX_CONFIG_HDPARM BUSYBOX_CONFIG_FEATURE_HDPARM_GET_IDENTITY option).... config BUSYBOX_CONFIG_FEATURE_HDPARM_GET_IDENTITY - bool " Support obtaining detailed information directly from drives" + bool "Support obtaining detailed information directly from drives" default n depends on BUSYBOX_CONFIG_HDPARM help - Enables the -I and -Istdin options to obtain detailed information + Enables the -I and -i options to obtain detailed information directly from drives about their capabilities and supported ATA - feature set. Enabling this option will add about 16k... + feature set. If no device name is specified, hdparm will read + identify data from stdin. Enabling this option will add about 16k... config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF - bool " Register an IDE interface (DANGEROUS)" + bool "Register an IDE interface (DANGEROUS)" default n depends on BUSYBOX_CONFIG_HDPARM help @@ -177,7 +199,7 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF This is dangerous stuff, so you should probably say N. config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF - bool " Un-register an IDE interface (DANGEROUS)" + bool "Un-register an IDE interface (DANGEROUS)" default n depends on BUSYBOX_CONFIG_HDPARM help @@ -185,7 +207,7 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF This is dangerous stuff, so you should probably say N. config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET - bool " perform device reset (DANGEROUS)" + bool "perform device reset (DANGEROUS)" default n depends on BUSYBOX_CONFIG_HDPARM help @@ -193,7 +215,7 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET This is dangerous stuff, so you should probably say N. config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF - bool " tristate device for hotswap (DANGEROUS)" + bool "tristate device for hotswap (DANGEROUS)" default n depends on BUSYBOX_CONFIG_HDPARM help @@ -202,7 +224,7 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF stuff, so you should probably say N. config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA - bool " get/set using_dma flag (DANGEROUS)" + bool "get/set using_dma flag (DANGEROUS)" default n depends on BUSYBOX_CONFIG_HDPARM help @@ -231,7 +253,7 @@ config BUSYBOX_CONFIG_MAKEDEVS Device properties are passed as command line arguments. . 'table' reads device properties from a file or stdin, allowing - a batch of unrelated devices to be makde with one command. + a batch of unrelated devices to be made with one command. User/group names are allowed as an alternative to uid/gid. choice @@ -289,6 +311,18 @@ config BUSYBOX_CONFIG_SETSID help setsid runs a program in a new session +config BUSYBOX_CONFIG_TASKSET + bool "taskset" + default n + help + Retrieve or set a processes's CPU affinity + +config BUSYBOX_CONFIG_TASKSET + bool "taskset" + default n + help + Retrieve or set a processes's CPU affinity (on linux) + config BUSYBOX_CONFIG_TIME bool "time" default y diff --git a/package/busybox/config/modutils/Config.in b/package/busybox/config/modutils/Config.in index 7c9f50f16d..8151914100 100644 --- a/package/busybox/config/modutils/Config.in +++ b/package/busybox/config/modutils/Config.in @@ -84,7 +84,7 @@ config BUSYBOX_CONFIG_MODPROBE bool "modprobe" default n help - Handle the loading of modules, and their dependancies on a high + Handle the loading of modules, and their dependencies on a high level. Note that in the state, modprobe does not understand multiple @@ -111,7 +111,7 @@ comment "Options common to multiple modutils" config BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE # Simulate indentation - bool " Support tainted module checking with new kernels" + bool "Support tainted module checking with new kernels" default n depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_LSMOD help @@ -122,7 +122,7 @@ config BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE config BUSYBOX_CONFIG_FEATURE_2_4_MODULES # Simulate indentation - bool " Support version 2.2.x to 2.4.x Linux kernels" + bool "Support version 2.2.x to 2.4.x Linux kernels" default y depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_RMMOD help @@ -130,7 +130,7 @@ config BUSYBOX_CONFIG_FEATURE_2_4_MODULES config BUSYBOX_CONFIG_FEATURE_2_6_MODULES # Simulate indentation - bool " Support version 2.6.x Linux kernels" + bool "Support version 2.6.x Linux kernels" default y depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_RMMOD || BUSYBOX_CONFIG_MODPROBE help diff --git a/package/busybox/config/networking/Config.in b/package/busybox/config/networking/Config.in index 7e280b76e2..3e0cbc95d4 100644 --- a/package/busybox/config/networking/Config.in +++ b/package/busybox/config/networking/Config.in @@ -9,8 +9,8 @@ config BUSYBOX_CONFIG_FEATURE_IPV6 bool "Enable IPv6 support" default y help - Enable IPv6 support to busybox. This makes applets that talk IP - able to work with IPv6. + Enable IPv6 support in busybox. + This adds IPv6 support in the networking applets. config BUSYBOX_CONFIG_ARPING bool "arping" @@ -22,7 +22,7 @@ config BUSYBOX_CONFIG_DNSD bool "dnsd" default n help - Small and static DNS server deamon. + Small and static DNS server daemon. config BUSYBOX_CONFIG_ETHER_WAKE bool "ether-wake" @@ -34,8 +34,8 @@ config BUSYBOX_CONFIG_FAKEIDENTD bool "fakeidentd" default n help - fakeidentd listens to the ident port and returns a set fake - value whatever it gets. + fakeidentd listens on the ident port and returns a predefined + fake value on any query. config BUSYBOX_CONFIG_FTPGET bool "ftpget" @@ -49,6 +49,13 @@ config BUSYBOX_CONFIG_FTPPUT help Store a remote file via FTP. +config BUSYBOX_CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS + bool "Enable long options in ftpget/ftpput" + default n + depends on BUSYBOX_CONFIG_GETOPT_LONG && (CONFIG_FTPGET || BUSYBOX_CONFIG_FTPPUT) + help + Support long options for the ftpget/ftpput applet. + config BUSYBOX_CONFIG_HOSTNAME bool "hostname" default n @@ -61,52 +68,50 @@ config BUSYBOX_CONFIG_HTTPD help Serve web pages via an HTTP server. -config BUSYBOX_CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY - bool " Support using httpd only from inetd" - default n - depends on BUSYBOX_CONFIG_HTTPD - help - This option disables uid and port options for the httpd applet - but requires inetd server daemon. - -config BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH - bool " Enable Basic http Authentication" +config BUSYBOX_CONFIG_FEATURE_HTTPD_WITHOUT_INETD + bool "Support using httpd as a daemon (not from inetd)" default y depends on BUSYBOX_CONFIG_HTTPD help - Utilizes password settings from /etc/httpd.conf for basic - authentication on a per url basis. + This option enables uid and port options for the httpd applet, + and eliminates the need to be called from the inetd server daemon. -config BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5 - bool " Support MD5 crypted passwords for http Authentication" - default y - depends on BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH - help - Enables basic per url authentication from /etc/httpd.conf - using md5 passwords. - -if !CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY config BUSYBOX_CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP - bool " Support reloading the global config file using hup signal" - default y - depends on BUSYBOX_CONFIG_HTTPD + bool "Support reloading the global config file using hup signal" + default n + depends on BUSYBOX_CONFIG_HTTPD && BUSYBOX_CONFIG_FEATURE_HTTPD_WITHOUT_INETD help This option enables processing of SIGHUP to reload cached configuration settings. config BUSYBOX_CONFIG_FEATURE_HTTPD_SETUID - bool " Enable support -u option" + bool "Enable support -u option" default n - depends on BUSYBOX_CONFIG_HTTPD + depends on BUSYBOX_CONFIG_HTTPD && BUSYBOX_CONFIG_FEATURE_HTTPD_WITHOUT_INETD help This option allows the server to run as a specific user rather than defaulting to the user that starts the server. Use of this option requires special privileges to change to a different user. -endif + +config BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH + bool "Enable Basic http Authentication" + default y + depends on BUSYBOX_CONFIG_HTTPD + help + Utilizes password settings from /etc/httpd.conf for basic + authentication on a per url basis. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5 + bool "Support MD5 crypted passwords for http Authentication" + default y + depends on BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH + help + Enables basic per URL authentication from /etc/httpd.conf + using md5 passwords. config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES - bool " Support loading additional MIME types at run-time" + bool "Support loading additional MIME types at run-time" default y depends on BUSYBOX_CONFIG_HTTPD help @@ -114,26 +119,26 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES run-time to be specified in the configuration file. config BUSYBOX_CONFIG_FEATURE_HTTPD_CGI - bool " Support Common Gateway Interface (CGI)" + bool "Support Common Gateway Interface (CGI)" default y depends on BUSYBOX_CONFIG_HTTPD help This option allows scripts and executables to be invoked - when specific urls are requested. + when specific URLs are requested. config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR - bool " Enable support for running scripts through an interpreter" + bool "Enable support for running scripts through an interpreter" default n depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI help This option enables support for running scripts through an - interpreter. Turn this on, if you want PHP scripts to work + interpreter. Turn this on if you want PHP scripts to work properly. You need to supply an addition line in your httpd config file: *.php:/path/to/your/php config BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV - bool " Support the REMOTE_PORT environment variable for CGI" + bool "Support the REMOTE_PORT environment variable for CGI" default y depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI help @@ -141,11 +146,11 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV references that contain a unique port number. config BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR - bool " Enable the -e option for shell script CGI simplification." + bool "Enable the -e option for shell script CGI simplification." default y depends on BUSYBOX_CONFIG_HTTPD help - After set, this option allows html encoding arbitrary + This option allows html encoding arbitrary strings for display of the browser. Output goes to stdout. For example, httpd -e "" as "<Hello World>". @@ -157,7 +162,7 @@ config BUSYBOX_CONFIG_IFCONFIG Ifconfig is used to configure the kernel-resident network interfaces. config BUSYBOX_CONFIG_FEATURE_IFCONFIG_STATUS - bool " Enable status reporting output (+7k)" + bool "Enable status reporting output (+7k)" default y depends on BUSYBOX_CONFIG_IFCONFIG help @@ -165,7 +170,7 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_STATUS of the currently active interfaces. config BUSYBOX_CONFIG_FEATURE_IFCONFIG_SLIP - bool " Enable slip-specific options \"keepalive\" and \"outfill\"" + bool "Enable slip-specific options \"keepalive\" and \"outfill\"" default n depends on BUSYBOX_CONFIG_IFCONFIG help @@ -173,7 +178,7 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_SLIP planning on using serial lines, leave this unchecked. config BUSYBOX_CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ - bool " Enable options \"mem_start\", \"io_addr\", and \"irq\"" + bool "Enable options \"mem_start\", \"io_addr\", and \"irq\"" default n depends on BUSYBOX_CONFIG_IFCONFIG help @@ -181,7 +186,7 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ and/or the interrupt line used by the specified device. config BUSYBOX_CONFIG_FEATURE_IFCONFIG_HW - bool " Enable option \"hw\" (ether only)" + bool "Enable option \"hw\" (ether only)" default y depends on BUSYBOX_CONFIG_IFCONFIG help @@ -190,7 +195,7 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_HW class. config BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS - bool " Set the broadcast automatically" + bool "Set the broadcast automatically" default y depends on BUSYBOX_CONFIG_IFCONFIG help @@ -215,7 +220,7 @@ config BUSYBOX_CONFIG_IFUPDOWN standalone utilities. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP - bool " Use ip applet" + bool "Use ip applet" default n depends on BUSYBOX_CONFIG_IFUPDOWN help @@ -223,7 +228,7 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP than the default of using the older 'ifconfig' and 'route' utilities. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN - bool " Use busybox ip applet" + bool "Use busybox ip applet" default n depends on BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP select BUSYBOX_CONFIG_IP @@ -237,7 +242,7 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN utility or the "ifup" and "ifdown" applets will not work. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN - bool " Use busybox ifconfig and route applets" + bool "Use busybox ifconfig and route applets" default n depends on BUSYBOX_CONFIG_IFUPDOWN && !CONFIG_FEATURE_IFUPDOWN_IP select BUSYBOX_CONFIG_IFCONFIG @@ -251,21 +256,21 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN work. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV4 - bool " Enable support for IPv4" + bool "Enable support for IPv4" default n depends on BUSYBOX_CONFIG_IFUPDOWN help If you want busybox to talk IPv4, leave this on. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6 - bool " Enable support for IPv6" + bool "Enable support for IPv6" default n - depends on BUSYBOX_CONFIG_IFUPDOWN + depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_FEATURE_IPV6 help If you need support for IPv6, turn this option on. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPX - bool " Enable support for IPX" + bool "Enable support for IPX" default n depends on BUSYBOX_CONFIG_IFUPDOWN help @@ -273,7 +278,7 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPX networks. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING - bool " Enable mapping support" + bool "Enable mapping support" default n depends on BUSYBOX_CONFIG_IFUPDOWN help @@ -286,43 +291,43 @@ config BUSYBOX_CONFIG_INETD help Internet superserver daemon -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO - bool " Support echo service" +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO + bool "Support echo service" default n depends on BUSYBOX_CONFIG_INETD help Echo received data internal inetd service -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD - bool " Support discard service" +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD + bool "Support discard service" default n depends on BUSYBOX_CONFIG_INETD help Internet /dev/null internal inetd service -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME - bool " Support time service" +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME + bool "Support time service" default n depends on BUSYBOX_CONFIG_INETD help Return 32 bit time since 1900 internal inetd service -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME - bool " Support daytime service" +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME + bool "Support daytime service" default n depends on BUSYBOX_CONFIG_INETD help Return human-readable time internal inetd service -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN - bool " Support chargen service" +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN + bool "Support chargen service" default n depends on BUSYBOX_CONFIG_INETD help Familiar character generator internal inetd service config BUSYBOX_CONFIG_FEATURE_INETD_RPC - bool " Support RPC services" + bool "Support RPC services" default n depends on BUSYBOX_CONFIG_INETD help @@ -337,99 +342,88 @@ config BUSYBOX_CONFIG_IP utility. You generally don't need "ip" to use busybox with TCP/IP. -if BUSYBOX_CONFIG_IP && BUSYBOX_CONFIG_IPADDR - config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS - default n - comment " address (forced enabled for ipaddr)" -endif -if ! (CONFIG_IP && BUSYBOX_CONFIG_IPADDR) - config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS - bool " address" - default n - depends on BUSYBOX_CONFIG_IP - help - Address manipulation support for the "ip" applet. -endif - -if BUSYBOX_CONFIG_IP && BUSYBOX_CONFIG_IPLINK - config BUSYBOX_CONFIG_FEATURE_IP_LINK - default n - comment " link (forced enabled for iplink)" -endif -if !(CONFIG_IP && BUSYBOX_CONFIG_IPLINK) - config BUSYBOX_CONFIG_FEATURE_IP_LINK - bool " link" - default n - depends on BUSYBOX_CONFIG_IP - help - Configure network devices with "ip". -endif - -if BUSYBOX_CONFIG_IP && BUSYBOX_CONFIG_IPROUTE - config BUSYBOX_CONFIG_FEATURE_IP_ROUTE - default n - comment " route (forced enabled for iproute)" -endif -if !(CONFIG_IP && BUSYBOX_CONFIG_IPROUTE) - config BUSYBOX_CONFIG_FEATURE_IP_ROUTE - bool " route" - default n - depends on BUSYBOX_CONFIG_IP - help - Add support for routing table management to "ip". -endif - -if BUSYBOX_CONFIG_IP && BUSYBOX_CONFIG_IPTUNNEL - config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL - default n - comment " tunnel (forced enabled for iptunnel)" -endif -if !(CONFIG_IP && BUSYBOX_CONFIG_IPTUNNEL) - config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL - bool " tunnel" - default n - depends on BUSYBOX_CONFIG_IP - help - Add support for tunneling commands to "ip". -endif +config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS + bool "ip address" + default n + depends on BUSYBOX_CONFIG_IP + help + Address manipulation support for the "ip" applet. -config BUSYBOX_CONFIG_IPCALC - bool "ipcalc" +config BUSYBOX_CONFIG_FEATURE_IP_LINK + bool "ip link" default n + depends on BUSYBOX_CONFIG_IP help - ipcalc takes an IP address and netmask and calculates the - resulting broadcast, network, and host range. + Configure network devices with "ip". -config BUSYBOX_CONFIG_FEATURE_IPCALC_FANCY - bool " Fancy IPCALC, more options, adds 1 kbyte" +config BUSYBOX_CONFIG_FEATURE_IP_ROUTE + bool "ip route" default n - depends on BUSYBOX_CONFIG_IPCALC + depends on BUSYBOX_CONFIG_IP help - Adds the options hostname, prefix and silent to the output of "ipcalc". + Add support for routing table management to "ip". -config BUSYBOX_CONFIG_IPADDR - bool "ipaddr" +config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL + bool "ip tunnel" default n + depends on BUSYBOX_CONFIG_IP help - Equivalent to selecting address support to "ip", above. + Add support for tunneling commands to "ip". -config BUSYBOX_CONFIG_IPLINK - bool "iplink" +config BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS + bool "Support short forms of ip commands." default n + depends on BUSYBOX_CONFIG_IP help - Equivalent to selecting link support to "ip", above. + Also support short-form of ip commands: + ip addr -> ipaddr + ip link -> iplink + ip route -> iproute + ip tunnel -> iptunnel + + Say N unless you desparately need the short form of the ip + object commands. + +config BUSYBOX_CONFIG_IPADDR + bool + default n + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ADDRESS + +config BUSYBOX_CONFIG_IPLINK + bool + default n + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_LINK config BUSYBOX_CONFIG_IPROUTE - bool "iproute" + bool default n - help - Equivalent to selecting route support to "ip", above. + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ROUTE config BUSYBOX_CONFIG_IPTUNNEL - bool "iptunnel" + bool default n + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_TUNNEL + +config BUSYBOX_CONFIG_IPCALC + bool "ipcalc" + default n + help + ipcalc takes an IP address and netmask and calculates the + resulting broadcast, network, and host range. + +config BUSYBOX_CONFIG_FEATURE_IPCALC_FANCY + bool "Fancy IPCALC, more options, adds 1 kbyte" + default n + depends on BUSYBOX_CONFIG_IPCALC + help + Adds the options hostname, prefix and silent to the output of "ipcalc". + +config BUSYBOX_CONFIG_FEATURE_IPCALC_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_IPCALC && BUSYBOX_CONFIG_GETOPT_LONG help - Equivalent to selecting tunnel support to "ip", above. + Support long options for the ipcalc applet. config BUSYBOX_CONFIG_NAMEIF bool "nameif" @@ -486,7 +480,7 @@ config BUSYBOX_CONFIG_PING elicit an ICMP ECHO_RESPONSE from a host or gateway. config BUSYBOX_CONFIG_FEATURE_FANCY_PING - bool " Enable fancy ping output" + bool "Enable fancy ping output" default y depends on BUSYBOX_CONFIG_PING help @@ -501,7 +495,7 @@ config BUSYBOX_CONFIG_PING6 This will give you a ping that can talk IPv6. config BUSYBOX_CONFIG_FEATURE_FANCY_PING6 - bool " Enable fancy ping6 output" + bool "Enable fancy ping6 output" default y depends on BUSYBOX_CONFIG_PING6 help @@ -522,7 +516,7 @@ config BUSYBOX_CONFIG_TELNET used to test other simple protocols. config BUSYBOX_CONFIG_FEATURE_TELNET_TTYPE - bool " Pass TERM type to remote host" + bool "Pass TERM type to remote host" default y depends on BUSYBOX_CONFIG_TELNET help @@ -531,7 +525,7 @@ config BUSYBOX_CONFIG_FEATURE_TELNET_TTYPE things like ANSI colors and other control sequences behave. config BUSYBOX_CONFIG_FEATURE_TELNET_AUTOLOGIN - bool " Pass USER type to remote host" + bool "Pass USER type to remote host" default n depends on BUSYBOX_CONFIG_TELNET help @@ -583,7 +577,7 @@ config BUSYBOX_CONFIG_TELNETD config BUSYBOX_CONFIG_FEATURE_TELNETD_INETD - bool " Support call from inetd only" + bool "Support call from inetd only" default n depends on BUSYBOX_CONFIG_TELNETD help @@ -599,7 +593,7 @@ config BUSYBOX_CONFIG_TFTP for a network-enabled bootloader. config BUSYBOX_CONFIG_FEATURE_TFTP_GET - bool " Enable \"get\" command" + bool "Enable \"get\" command" default n depends on BUSYBOX_CONFIG_TFTP help @@ -607,7 +601,7 @@ config BUSYBOX_CONFIG_FEATURE_TFTP_GET a client to retrieve a file from a TFTP server. config BUSYBOX_CONFIG_FEATURE_TFTP_PUT - bool " Enable \"put\" command" + bool "Enable \"put\" command" default n depends on BUSYBOX_CONFIG_TFTP help @@ -615,14 +609,14 @@ config BUSYBOX_CONFIG_FEATURE_TFTP_PUT a client to transfer a file to a TFTP server. config BUSYBOX_CONFIG_FEATURE_TFTP_BLOCKSIZE - bool " Enable \"blocksize\" command" + bool "Enable \"blocksize\" command" default n depends on BUSYBOX_CONFIG_TFTP help Allow the client to specify the desired block size for transfers. -config BUSYBOX_CONFIG_FEATURE_TFTP_DEBUG - bool " Enable debug" +config BUSYBOX_CONFIG_DEBUG_TFTP + bool "Enable debug" default n depends on BUSYBOX_CONFIG_TFTP help @@ -637,7 +631,7 @@ config BUSYBOX_CONFIG_TRACEROUTE Utility to trace the route of IP packets config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE - bool " Enable verbose output" + bool "Enable verbose output" default y depends on BUSYBOX_CONFIG_TRACEROUTE help @@ -645,7 +639,7 @@ config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE hostnames and ICMP response types. config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE - bool " Enable loose source route" + bool "Enable loose source route" default n depends on BUSYBOX_CONFIG_TRACEROUTE help @@ -653,12 +647,13 @@ config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE (8 maximum). config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP - bool " Use ICMP instead of UDP" + bool "Use ICMP instead of UDP" default n depends on BUSYBOX_CONFIG_TRACEROUTE help Add feature to allow for ICMP ECHO instead of UDP datagrams. +source package/busybox/config/networking/udhcp/Config.in config BUSYBOX_CONFIG_VCONFIG bool "vconfig" @@ -674,27 +669,32 @@ config BUSYBOX_CONFIG_WGET HTTPS, and FTP servers. config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR - bool " Enable a nifty process meter (+2k)" + bool "Enable a nifty process meter (+2k)" default y depends on BUSYBOX_CONFIG_WGET help Enable the transfer progress bar for wget transfers. config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION - bool " Enable HTTP authentication" + bool "Enable HTTP authentication" default y depends on BUSYBOX_CONFIG_WGET help Support authenticated HTTP transfers. config BUSYBOX_CONFIG_FEATURE_WGET_IP6_LITERAL - bool " Enable IPv6 literal addresses" + bool "Enable IPv6 literal addresses" default y - depends on BUSYBOX_CONFIG_WGET + depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_FEATURE_IPV6 help Support IPv6 address literal notation in URLs. -source package/busybox/config/networking/udhcp/Config.in +config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS + bool "Enable long options" + default y + depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the wget applet. config BUSYBOX_CONFIG_ZCIP bool "zcip" @@ -708,4 +708,3 @@ config BUSYBOX_CONFIG_ZCIP in the busybox examples. endmenu - diff --git a/package/busybox/config/networking/udhcp/Config.in b/package/busybox/config/networking/udhcp/Config.in index d15128ce3f..741afa3279 100644 --- a/package/busybox/config/networking/udhcp/Config.in +++ b/package/busybox/config/networking/udhcp/Config.in @@ -5,7 +5,7 @@ menu "udhcp Server/Client" -config BUSYBOX_CONFIG_UDHCPD +config BUSYBOX_CONFIG_APP_UDHCPD bool "udhcp Server (udhcpd)" default n help @@ -14,7 +14,7 @@ config BUSYBOX_CONFIG_UDHCPD See http://udhcp.busybox.net for further details. -config BUSYBOX_CONFIG_UDHCPC +config BUSYBOX_CONFIG_APP_UDHCPC bool "udhcp Client (udhcpc)" default y help @@ -26,10 +26,10 @@ config BUSYBOX_CONFIG_UDHCPC See http://udhcp.busybox.net for further details. -config BUSYBOX_CONFIG_DUMPLEASES +config BUSYBOX_CONFIG_APP_DUMPLEASES bool "Lease display utility (dumpleases)" default n - depends on BUSYBOX_CONFIG_UDHCPD + depends on BUSYBOX_CONFIG_APP_UDHCPD help dumpleases displays the leases written out by the udhcpd server. Lease times are stored in the file by time remaining in lease, or @@ -40,7 +40,7 @@ config BUSYBOX_CONFIG_DUMPLEASES config BUSYBOX_CONFIG_FEATURE_UDHCP_SYSLOG bool " Log udhcp messages to syslog (instead of stdout)" default n - depends on BUSYBOX_CONFIG_UDHCPD || BUSYBOX_CONFIG_UDHCPC + depends on BUSYBOX_CONFIG_APP_UDHCPD || BUSYBOX_CONFIG_APP_UDHCPC help If selected, udhcpd will log all its messages to syslog, otherwise, it will attempt to log them to stdout. @@ -50,7 +50,7 @@ config BUSYBOX_CONFIG_FEATURE_UDHCP_SYSLOG config BUSYBOX_CONFIG_FEATURE_UDHCP_DEBUG bool " Compile udhcp with noisy debugging messages" default n - depends on BUSYBOX_CONFIG_UDHCPD || BUSYBOX_CONFIG_UDHCPC + depends on BUSYBOX_CONFIG_APP_UDHCPD || BUSYBOX_CONFIG_APP_UDHCPC help If selected, udhcpd will output extra debugging output. If using this option, compile uDHCP with "-g", and do not fork the daemon to diff --git a/package/busybox/config/procps/Config.in b/package/busybox/config/procps/Config.in index b94632b467..34d1ace087 100644 --- a/package/busybox/config/procps/Config.in +++ b/package/busybox/config/procps/Config.in @@ -51,14 +51,14 @@ config BUSYBOX_CONFIG_PIDOF those id's on the standard output. config BUSYBOX_CONFIG_FEATURE_PIDOF_SINGLE - bool " Enable argument for single shot (-s)" + bool "Enable argument for single shot (-s)" default n depends on BUSYBOX_CONFIG_PIDOF help Support argument '-s' for returning only the first pid found. config BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT - bool " Enable argument for omitting pids (-o)" + bool "Enable argument for omitting pids (-o)" default n depends on BUSYBOX_CONFIG_PIDOF help @@ -73,7 +73,7 @@ config BUSYBOX_CONFIG_PS ps gives a snapshot of the current processes. config BUSYBOX_CONFIG_FEATURE_PS_WIDE - bool " Enable argument for wide output (-w)" + bool "Enable argument for wide output (-w)" default n depends on BUSYBOX_CONFIG_PS help @@ -102,7 +102,7 @@ config BUSYBOX_CONFIG_TOP system. config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE - bool " Support showing CPU usage percentage (add 2k bytes)" + bool "Support showing CPU usage percentage (add 2k bytes)" default y depends on BUSYBOX_CONFIG_TOP help diff --git a/package/busybox/config/shell/Config.in b/package/busybox/config/shell/Config.in index b9a1b4d7a3..373c7461a4 100644 --- a/package/busybox/config/shell/Config.in +++ b/package/busybox/config/shell/Config.in @@ -48,14 +48,14 @@ comment "Ash Shell Options" depends on BUSYBOX_CONFIG_ASH config BUSYBOX_CONFIG_ASH_JOB_CONTROL - bool " Enable Job control" + bool "Job control" default y depends on BUSYBOX_CONFIG_ASH help Enable job control in the ash shell. config BUSYBOX_CONFIG_ASH_READ_NCHARS - bool " Enable 'read -n N' and 'read -s' support" + bool "'read -n N' and 'read -s' support" default n depends on BUSYBOX_CONFIG_ASH help @@ -63,7 +63,7 @@ config BUSYBOX_CONFIG_ASH_READ_NCHARS 'read -s' will read without echoing the user's input. config BUSYBOX_CONFIG_ASH_READ_TIMEOUT - bool " Enable 'read -t S' support." + bool "'read -t S' support." default y depends on BUSYBOX_CONFIG_ASH help @@ -72,21 +72,21 @@ config BUSYBOX_CONFIG_ASH_READ_TIMEOUT as a decimal fraction, e.g. 'read -t 2.5 foo'. config BUSYBOX_CONFIG_ASH_ALIAS - bool " Enable alias support" + bool "alias support" default y depends on BUSYBOX_CONFIG_ASH help Enable alias support in the ash shell. config BUSYBOX_CONFIG_ASH_MATH_SUPPORT - bool " Enable Posix math support" + bool "Posix math support" default y depends on BUSYBOX_CONFIG_ASH help Enable math support in the ash shell. config BUSYBOX_CONFIG_ASH_MATH_SUPPORT_64 - bool " Extend Posix math support to 64 bit" + bool "Extend Posix math support to 64 bit" default n depends on BUSYBOX_CONFIG_ASH_MATH_SUPPORT help @@ -95,52 +95,53 @@ config BUSYBOX_CONFIG_ASH_MATH_SUPPORT_64 large numbers. config BUSYBOX_CONFIG_ASH_GETOPTS - bool " Enable getopts builtin to parse positional parameters" + bool "Builtin getopt to parse positional parameters" default y depends on BUSYBOX_CONFIG_ASH help Enable getopts builtin in the ash shell. -config BUSYBOX_CONFIG_ASH_CMDCMD - bool " Enable cmdcmd to override shell builtins" +config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO + bool "Builtin version of 'echo'" default y + select BUSYBOX_CONFIG_ECHO depends on BUSYBOX_CONFIG_ASH help - Enable support for the ash 'command' builtin, which allows - you to run the specified command with the specified arguments, - even when there is an ash builtin command with the same name. + Enable support for echo, built in to ash. -config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO - bool " Enable builtin version of 'echo'" +config BUSYBOX_CONFIG_ASH_BUILTIN_TEST + bool "Builtin version of 'test'" default y + select BUSYBOX_CONFIG_TEST depends on BUSYBOX_CONFIG_ASH help - Enable support for echo, built in to ash. + Enable support for test, built in to ash. -# this entry also appears in coreutils/Config.in, next to the echo applet -config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO - bool " Enable echo options (-n and -e)" +config BUSYBOX_CONFIG_ASH_CMDCMD + bool "'command' command to override shell builtins" default y - depends on BUSYBOX_CONFIG_ASH_BUILTIN_ECHO + depends on BUSYBOX_CONFIG_ASH help - This adds options (-n and -e) to echo. + Enable support for the ash 'command' builtin, which allows + you to run the specified command with the specified arguments, + even when there is an ash builtin command with the same name. config BUSYBOX_CONFIG_ASH_MAIL - bool " Check for new mail on interactive shells" + bool "Check for new mail on interactive shells" default n depends on BUSYBOX_CONFIG_ASH help Enable "check for new mail" in the ash shell. config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE - bool " Optimize for size instead of speed" + bool "Optimize for size instead of speed" default y depends on BUSYBOX_CONFIG_ASH help Compile ash for reduced size at the price of speed. config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT - bool " Enable pseudorandom generator and variable $RANDOM" + bool "Pseudorandom generator and variable $RANDOM" default n depends on BUSYBOX_CONFIG_ASH help @@ -151,7 +152,7 @@ config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT variable will no longer have special treatment. config BUSYBOX_CONFIG_ASH_EXPAND_PRMT - bool " Expand prompt string" + bool "Expand prompt string" default n depends on BUSYBOX_CONFIG_ASH help @@ -229,13 +230,18 @@ config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE_SHELL is generally used when creating a statically linked version of busybox for use as a rescue shell, in the event that you screw up your system. + Note that this will *also* cause applets to take precedence + over shell builtins of the same name. So turning this on will + eliminate any performance gained by turning on the builtin "echo" + and "test" commands in ash. + Note that when using this option, the shell will attempt to directly run '/bin/busybox'. If you do not have the busybox binary sitting in that exact location with that exact name, this option will not work at all. config BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING - bool "command line editing" + bool "Command line editing" default y depends on BUSYBOX_CONFIG_MSH || BUSYBOX_CONFIG_LASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH help @@ -250,28 +256,28 @@ config BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING_VI turned on and off with "set -o vi" and "set +o vi". config BUSYBOX_CONFIG_FEATURE_COMMAND_HISTORY - int "history size" + int "History size" default 15 depends on BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING help Specify command history size in shell. config BUSYBOX_CONFIG_FEATURE_COMMAND_SAVEHISTORY - bool "history saving" + bool "History saving" default n depends on BUSYBOX_CONFIG_ASH && BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING help Enable history saving in ash shell. config BUSYBOX_CONFIG_FEATURE_COMMAND_TAB_COMPLETION - bool "tab completion" + bool "Tab completion" default y depends on BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING help Enable tab completion in shell. config BUSYBOX_CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION - bool "username completion" + bool "Username completion" default n depends on BUSYBOX_CONFIG_FEATURE_COMMAND_TAB_COMPLETION help diff --git a/package/busybox/config/sysklogd/Config.in b/package/busybox/config/sysklogd/Config.in index 209bdff053..f120695664 100644 --- a/package/busybox/config/sysklogd/Config.in +++ b/package/busybox/config/sysklogd/Config.in @@ -21,7 +21,7 @@ config BUSYBOX_CONFIG_SYSLOGD you wait long enough.... config BUSYBOX_CONFIG_FEATURE_ROTATE_LOGFILE - bool " Rotate message files" + bool "Rotate message files" default y depends on BUSYBOX_CONFIG_SYSLOGD help @@ -29,7 +29,7 @@ config BUSYBOX_CONFIG_FEATURE_ROTATE_LOGFILE on his own. No need to use an external rotatescript. config BUSYBOX_CONFIG_FEATURE_REMOTE_LOG - bool " Remote Log support" + bool "Remote Log support" default y depends on BUSYBOX_CONFIG_SYSLOGD help @@ -43,7 +43,7 @@ config BUSYBOX_CONFIG_FEATURE_REMOTE_LOG by an intruder. config BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG - bool " Circular Buffer support" + bool "Circular Buffer support" default y depends on BUSYBOX_CONFIG_SYSLOGD help @@ -65,7 +65,7 @@ config BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE used to record system log messages. config BUSYBOX_CONFIG_LOGREAD - bool " logread" + bool "logread" default y depends on BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG help @@ -75,7 +75,7 @@ config BUSYBOX_CONFIG_LOGREAD stored in the syslogd circular buffer. config BUSYBOX_CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING - bool " logread double buffering" + bool "logread double buffering" default n depends on BUSYBOX_CONFIG_LOGREAD help diff --git a/package/busybox/config/util-linux/Config.in b/package/busybox/config/util-linux/Config.in index 474ef02f0d..9081555ef4 100644 --- a/package/busybox/config/util-linux/Config.in +++ b/package/busybox/config/util-linux/Config.in @@ -27,7 +27,7 @@ config BUSYBOX_CONFIG_FBSET if you wish to enable the 'fbset' utility. config BUSYBOX_CONFIG_FEATURE_FBSET_FANCY - bool " Turn on extra fbset options" + bool "Turn on extra fbset options" default n depends on BUSYBOX_CONFIG_FBSET help @@ -37,7 +37,7 @@ config BUSYBOX_CONFIG_FEATURE_FBSET_FANCY options. config BUSYBOX_CONFIG_FEATURE_FBSET_READMODE - bool " Turn on fbset readmode support" + bool "Turn on fbset readmode support" default n depends on BUSYBOX_CONFIG_FBSET help @@ -80,7 +80,7 @@ config BUSYBOX_FDISK_SUPPORT_LARGE_DISKS Enable this option to support large disks > 4GB. config BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE - bool " Write support" + bool "Write support" default n depends on BUSYBOX_CONFIG_FDISK help @@ -89,7 +89,7 @@ config BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE disabled, you will only be able to view the partition table. config BUSYBOX_CONFIG_FEATURE_AIX_LABEL - bool " Support AIX disklabels" + bool "Support AIX disklabels" default n depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE help @@ -97,7 +97,7 @@ config BUSYBOX_CONFIG_FEATURE_AIX_LABEL Most people can safely leave this option disabled. config BUSYBOX_CONFIG_FEATURE_SGI_LABEL - bool " Support SGI disklabels" + bool "Support SGI disklabels" default n depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE help @@ -105,7 +105,7 @@ config BUSYBOX_CONFIG_FEATURE_SGI_LABEL Most people can safely leave this option disabled. config BUSYBOX_CONFIG_FEATURE_SUN_LABEL - bool " Support SUN disklabels" + bool "Support SUN disklabels" default n depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE help @@ -113,7 +113,7 @@ config BUSYBOX_CONFIG_FEATURE_SUN_LABEL Most people can safely leave this option disabled. config BUSYBOX_CONFIG_FEATURE_OSF_LABEL - bool " Support BSD disklabels" + bool "Support BSD disklabels" default n depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE help @@ -121,7 +121,7 @@ config BUSYBOX_CONFIG_FEATURE_OSF_LABEL and define and edit BSD disk slices. config BUSYBOX_CONFIG_FEATURE_FDISK_ADVANCED - bool " Support expert mode" + bool "Support expert mode" default n depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE help @@ -164,7 +164,7 @@ comment "Minix filesystem support" depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX config BUSYBOX_CONFIG_FEATURE_MINIX2 - bool " Support Minix fs v2 (fsck_minix/mkfs_minix)" + bool "Support Minix fs v2 (fsck_minix/mkfs_minix)" default n depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX help @@ -199,17 +199,17 @@ config BUSYBOX_CONFIG_HWCLOCK shutdown in the hardware clock, so the hardware will keep the correct time when Linux is _not_ running. -config BUSYBOX_CONFIG_FEATURE_HWCLOCK_LONGOPTIONS - bool " Support long options (--hctosys,...)" +config BUSYBOX_CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS + bool "Support long options (--hctosys,...)" default n - depends on BUSYBOX_CONFIG_HWCLOCK + depends on BUSYBOX_CONFIG_HWCLOCK && BUSYBOX_CONFIG_GETOPT_LONG help By default, the hwclock utility only uses short options. If you are overly fond of its long options, such as --hctosys, --utc, etc) then enable this option. config BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS - bool " Use FHS /var/lib/hwclock/adjtime" + bool "Use FHS /var/lib/hwclock/adjtime" default n depends on BUSYBOX_CONFIG_HWCLOCK help @@ -255,7 +255,7 @@ config BUSYBOX_CONFIG_MDEV from sysfs. config BUSYBOX_CONFIG_FEATURE_MDEV_CONF - bool " Support /etc/mdev.conf" + bool "Support /etc/mdev.conf" default n depends on BUSYBOX_CONFIG_MDEV help @@ -265,16 +265,31 @@ config BUSYBOX_CONFIG_FEATURE_MDEV_CONF That's device name (with regex match), uid:gid, and permissions. - Optionally, that can be followed (on the same line) by an asterisk - and a command line to run after creating the corresponding device(s), - ala: - - hdc root:cdrom 660 *ln -s hdc cdrom - Config file parsing stops on the first matching line. If no config entry is matched, devices are created with default 0:0 660. (Make the last line match .* to override this.) +config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC + bool "Support command execution at device addition/removal" + default n + depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF + help + This adds support for an optional field to /etc/mdev.conf, consisting + of a special character and a command line to run after creating the + corresponding device(s) and before removing, ala: + + hdc root:cdrom 660 *ln -s $MDEV cdrom + + The $MDEV environment variable is set to the name of the device. + + The special characters and their meanings are: + @ Run after creating the device. + $ Run before removing the device. + * Run both after creating and before removing the device. + + Commands are executed via system() so you need /bin/sh, meaning you + probably want to select a default shell in the Shells menu. + config BUSYBOX_CONFIG_MKSWAP bool "mkswap" default n @@ -288,6 +303,16 @@ config BUSYBOX_CONFIG_MKSWAP Once you have created swap space using 'mkswap' you need to enable the swap space using the 'swapon' utility. +config BUSYBOX_CONFIG_FEATURE_MKSWAP_V0 + bool "version 0 support" + default n + depends on BUSYBOX_CONFIG_MKSWAP +# depends on BUSYBOX_CONFIG_MKSWAP && BUSYBOX_CONFIG_DEPRECATED + help + Enable support for the old v0 style. + If your kernel is older than 2.1.117, then v0 support is the + only option. + config BUSYBOX_CONFIG_MORE bool "more" default y @@ -299,7 +324,7 @@ config BUSYBOX_CONFIG_MORE any need to reading text files, you can leave this disabled. config BUSYBOX_CONFIG_FEATURE_USE_TERMIOS - bool " Use termios to manipulate the screen" + bool "Use termios to manipulate the screen" default y depends on BUSYBOX_CONFIG_MORE help @@ -321,7 +346,7 @@ config BUSYBOX_CONFIG_MOUNT the 'mount' utility. config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS - bool " Support mounting NFS file systems" + bool "Support mounting NFS file systems" default y depends on BUSYBOX_CONFIG_MOUNT help @@ -403,7 +428,7 @@ config BUSYBOX_CONFIG_UMOUNT also want to enable 'umount'. config BUSYBOX_CONFIG_FEATURE_UMOUNT_ALL - bool " umount -a option" + bool "umount -a option" default y depends on BUSYBOX_CONFIG_UMOUNT help @@ -413,7 +438,7 @@ comment "Common options for mount/umount" depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT config BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP - bool " Support loopback mounts" + bool "Support loopback mounts" default y depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT help @@ -429,7 +454,7 @@ config BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP (If you don't want umount to free the loop device, use "umount -D".) config BUSYBOX_CONFIG_FEATURE_MTAB_SUPPORT - bool " Support for the old /etc/mtab file" + bool "Support for the old /etc/mtab file" default n depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT help @@ -445,7 +470,11 @@ config BUSYBOX_CONFIG_FEATURE_MTAB_SUPPORT example a mount under chroot won't update it), can't handle modern features like separate per-process filesystem namespaces, requires that your /etc directory be writeable, tends to get easily confused - by --bind or --move mounts, and so on. (In brief: avoid.) + by --bind or --move mounts, won't update if you rename a directory + that contains a mount point, and so on. (In brief: avoid.) + + About the only reason to use this is if you've removed /proc from + your kernel. endmenu diff --git a/package/busybox/patches/100-killall5.patch b/package/busybox/patches/100-killall5.patch index 6f1585d0d4..9828224800 100644 --- a/package/busybox/patches/100-killall5.patch +++ b/package/busybox/patches/100-killall5.patch @@ -1,18 +1,18 @@ -diff -Nur busybox-1.1.1/include/applets.h busybox-1.1.1-owrt/include/applets.h ---- busybox-1.1.1/include/applets.h 2006-03-22 22:16:24.000000000 +0100 -+++ busybox-1.1.1-owrt/include/applets.h 2006-04-01 18:23:43.000000000 +0200 -@@ -154,6 +154,7 @@ - USE_IPTUNNEL(APPLET(iptunnel, iptunnel_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_KILL(APPLET(kill, kill_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_KILLALL(APPLET(killall, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -+USE_KILLALL5(APPLET(killall5, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) - USE_KLOGD(APPLET(klogd, klogd_main, _BB_DIR_SBIN, _BB_SUID_NEVER)) - USE_LASH(APPLET(lash, lash_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_LAST(APPLET(last, last_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -diff -Nur busybox-1.1.1/include/usage.h busybox-1.1.1-owrt/include/usage.h ---- busybox-1.1.1/include/usage.h 2006-03-22 22:16:24.000000000 +0100 -+++ busybox-1.1.1-owrt/include/usage.h 2006-04-01 18:22:53.000000000 +0200 -@@ -1598,6 +1598,13 @@ +diff -ruN busybox-1.2.0-old/include/applets.h busybox-1.2.0-new/include/applets.h +--- busybox-1.2.0-old/include/applets.h 2006-07-01 00:42:10.000000000 +0200 ++++ busybox-1.2.0-new/include/applets.h 2006-07-31 00:29:34.000000000 +0200 +@@ -157,6 +157,7 @@ + USE_IPTUNNEL(APPLET(iptunnel, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_KILL(APPLET(kill, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_KILLALL(APPLET_ODDNAME(killall, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall)) ++USE_KILLALL5(APPLET_ODDNAME(killall5, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall5)) + USE_KLOGD(APPLET(klogd, _BB_DIR_SBIN, _BB_SUID_NEVER)) + USE_LASH(APPLET(lash, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_LAST(APPLET(last, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) +diff -ruN busybox-1.2.0-old/include/usage.h busybox-1.2.0-new/include/usage.h +--- busybox-1.2.0-old/include/usage.h 2006-07-01 00:42:10.000000000 +0200 ++++ busybox-1.2.0-new/include/usage.h 2006-07-31 00:25:57.000000000 +0200 +@@ -1503,6 +1503,13 @@ #define killall_example_usage \ "$ killall apache\n" @@ -26,9 +26,9 @@ diff -Nur busybox-1.1.1/include/usage.h busybox-1.1.1-owrt/include/usage.h #define klogd_trivial_usage \ "[-c n] [-n]" #define klogd_full_usage \ -diff -Nur busybox-1.1.1/procps/Config.in busybox-1.1.1-owrt/procps/Config.in ---- busybox-1.1.1/procps/Config.in 2006-03-22 22:16:25.000000000 +0100 -+++ busybox-1.1.1-owrt/procps/Config.in 2006-04-01 18:22:53.000000000 +0200 +diff -ruN busybox-1.2.0-old/procps/Config.in busybox-1.2.0-new/procps/Config.in +--- busybox-1.2.0-old/procps/Config.in 2006-07-01 00:42:12.000000000 +0200 ++++ busybox-1.2.0-new/procps/Config.in 2006-07-31 00:25:57.000000000 +0200 @@ -38,6 +38,11 @@ specified commands. If no signal name is specified, SIGTERM is sent. @@ -41,10 +41,10 @@ diff -Nur busybox-1.1.1/procps/Config.in busybox-1.1.1-owrt/procps/Config.in config CONFIG_PIDOF bool "pidof" default n -diff -Nur busybox-1.1.1/procps/kill.c busybox-1.1.1-owrt/procps/kill.c ---- busybox-1.1.1/procps/kill.c 2006-03-22 22:16:25.000000000 +0100 -+++ busybox-1.1.1-owrt/procps/kill.c 2006-04-01 18:22:53.000000000 +0200 -@@ -34,6 +34,7 @@ +diff -ruN busybox-1.2.0-old/procps/kill.c busybox-1.2.0-new/procps/kill.c +--- busybox-1.2.0-old/procps/kill.c 2006-07-01 00:42:12.000000000 +0200 ++++ busybox-1.2.0-new/procps/kill.c 2006-07-31 00:25:57.000000000 +0200 +@@ -20,6 +20,7 @@ #define KILL 0 #define KILLALL 1 @@ -52,7 +52,7 @@ diff -Nur busybox-1.1.1/procps/kill.c busybox-1.1.1-owrt/procps/kill.c int kill_main(int argc, char **argv) { -@@ -48,6 +49,9 @@ +@@ -34,6 +35,9 @@ #else whichApp = KILL; #endif @@ -62,7 +62,7 @@ diff -Nur busybox-1.1.1/procps/kill.c busybox-1.1.1-owrt/procps/kill.c /* Parse any options */ if (argc < 2) -@@ -126,6 +130,20 @@ +@@ -112,6 +116,20 @@ } } diff --git a/package/busybox/patches/110-telnetd.patch b/package/busybox/patches/110-telnetd.patch index f14143aa62..8ebb6de645 100644 --- a/package/busybox/patches/110-telnetd.patch +++ b/package/busybox/patches/110-telnetd.patch @@ -1,7 +1,7 @@ -diff -ur busybox-1.1.0/networking/telnetd.c busybox-1.1.0-owrt/networking/telnetd.c ---- busybox-1.1.0/networking/telnetd.c 2006-01-11 06:43:51.000000000 +0100 -+++ busybox-1.1.0-owrt/networking/telnetd.c 2006-01-14 17:41:20.000000000 +0100 -@@ -45,6 +45,7 @@ +diff -ruN busybox-1.2.0-old/networking/telnetd.c busybox-1.2.0-new/networking/telnetd.c +--- busybox-1.2.0-old/networking/telnetd.c 2006-07-01 00:42:02.000000000 +0200 ++++ busybox-1.2.0-new/networking/telnetd.c 2006-07-31 10:52:30.000000000 +0200 +@@ -44,6 +44,7 @@ #include #include #include @@ -9,7 +9,7 @@ diff -ur busybox-1.1.0/networking/telnetd.c busybox-1.1.0-owrt/networking/telnet #include "busybox.h" -@@ -394,11 +395,13 @@ +@@ -391,11 +392,13 @@ struct in_addr bind_addr = { .s_addr = 0x0 }; #endif /* CONFIG_FEATURE_TELNETD_INETD */ int c; @@ -25,7 +25,7 @@ diff -ur busybox-1.1.0/networking/telnetd.c busybox-1.1.0-owrt/networking/telnet #endif /* CONFIG_FEATURE_TELNETD_INETD */ int maxlen, w, r; -@@ -413,6 +416,9 @@ +@@ -410,6 +413,9 @@ case 'f': issuefile = optarg; break; @@ -35,17 +35,17 @@ diff -ur busybox-1.1.0/networking/telnetd.c busybox-1.1.0-owrt/networking/telnet case 'l': loginpath = optarg; break; -@@ -465,6 +471,13 @@ +@@ -459,6 +465,13 @@ sa.sin_addr = bind_addr; #endif -+ /* Set it to listen on the specified interface */ -+ if (interface_name) { -+ strncpy(interface.ifr_ifrn.ifrn_name, interface_name, IFNAMSIZ); -+ (void)setsockopt(master_fd, SOL_SOCKET, -+ SO_BINDTODEVICE, &interface, sizeof(interface)); -+ } -+ - if (bind(master_fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) { - bb_perror_msg_and_die("bind"); - } ++ /* Set it to listen on the specified interface */ ++ if (interface_name) { ++ strncpy(interface.ifr_ifrn.ifrn_name, interface_name, IFNAMSIZ); ++ (void)setsockopt(master_fd, SOL_SOCKET, ++ SO_BINDTODEVICE, &interface, sizeof(interface)); ++ } ++ + bb_xbind(master_fd, (struct sockaddr *) &sa, sizeof(sa)); + bb_xlisten(master_fd, 1); + bb_xdaemon(0, 0); diff --git a/package/busybox/patches/150-udhcp-release.patch b/package/busybox/patches/150-udhcp-release.patch index 6420ae6a6a..1e1c00ef29 100644 --- a/package/busybox/patches/150-udhcp-release.patch +++ b/package/busybox/patches/150-udhcp-release.patch @@ -1,7 +1,7 @@ -diff -Nur busybox-1.1.1/include/usage.h busybox-1.1.1-owrt/include/usage.h ---- busybox-1.1.1/include/usage.h 2006-04-01 18:26:21.000000000 +0200 -+++ busybox-1.1.1-owrt/include/usage.h 2006-04-01 18:27:45.000000000 +0200 -@@ -3268,6 +3268,7 @@ +diff -ruN busybox-1.2.0-old/include/usage.h busybox-1.2.0-new/include/usage.h +--- busybox-1.2.0-old/include/usage.h 2006-07-31 10:47:56.000000000 +0200 ++++ busybox-1.2.0-new/include/usage.h 2006-07-31 11:08:49.000000000 +0200 +@@ -3190,6 +3190,7 @@ "\t-n,\t--now\tExit with failure if lease cannot be immediately negotiated\n" \ "\t-p,\t--pidfile=file\tStore process ID of daemon in file\n" \ "\t-q,\t--quit\tQuit after obtaining lease\n" \ @@ -9,10 +9,10 @@ diff -Nur busybox-1.1.1/include/usage.h busybox-1.1.1-owrt/include/usage.h "\t-r,\t--request=IP\tIP address to request (default: none)\n" \ "\t-s,\t--script=file\tRun file at dhcp events (default: /usr/share/udhcpc/default.script)\n" \ "\t-t,\t--retries=NUM\tSend up to NUM request packets\n"\ -diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/udhcp/dhcpc.c ---- busybox-1.1.1/networking/udhcp/dhcpc.c 2006-03-22 22:16:19.000000000 +0100 -+++ busybox-1.1.1-owrt/networking/udhcp/dhcpc.c 2006-04-01 18:28:19.000000000 +0200 -@@ -49,6 +49,7 @@ +diff -ruN busybox-1.2.0-old/networking/udhcp/dhcpc.c busybox-1.2.0-new/networking/udhcp/dhcpc.c +--- busybox-1.2.0-old/networking/udhcp/dhcpc.c 2006-07-01 00:42:02.000000000 +0200 ++++ busybox-1.2.0-new/networking/udhcp/dhcpc.c 2006-07-31 11:08:49.000000000 +0200 +@@ -47,6 +47,7 @@ .abort_if_no_lease = 0, .foreground = 0, .quit_after_lease = 0, @@ -20,15 +20,7 @@ diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/u .background_if_no_lease = 0, .interface = "eth0", .pidfile = NULL, -@@ -82,6 +83,7 @@ - " immediately negotiated.\n" - " -p, --pidfile=file Store process ID of daemon in file\n" - " -q, --quit Quit after obtaining lease\n" -+" -R, --release Release IP on quit\n" - " -r, --request=IP IP address to request (default: none)\n" - " -s, --script=file Run file at dhcp events (default:\n" - " " DEFAULT_SCRIPT ")\n" -@@ -203,6 +205,7 @@ +@@ -163,6 +164,7 @@ {"now", no_argument, 0, 'n'}, {"pidfile", required_argument, 0, 'p'}, {"quit", no_argument, 0, 'q'}, @@ -36,7 +28,7 @@ diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/u {"request", required_argument, 0, 'r'}, {"script", required_argument, 0, 's'}, {"timeout", required_argument, 0, 'T'}, -@@ -214,7 +217,7 @@ +@@ -174,7 +176,7 @@ /* get options */ while (1) { int option_index = 0; @@ -45,7 +37,7 @@ diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/u if (c == -1) break; switch (c) { -@@ -284,6 +287,9 @@ +@@ -244,6 +246,9 @@ case 'q': client_config.quit_after_lease = 1; break; @@ -55,7 +47,7 @@ diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/u case 'r': requested_ip = inet_addr(optarg); break; -@@ -527,8 +533,11 @@ +@@ -488,8 +493,11 @@ state = BOUND; change_mode(LISTEN_NONE); @@ -68,7 +60,7 @@ diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/u if (!client_config.foreground) client_background(); -@@ -553,12 +562,13 @@ +@@ -514,12 +522,13 @@ case SIGUSR1: perform_renew(); break; @@ -85,10 +77,10 @@ diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/u } } else if (retval == -1 && errno == EINTR) { /* a signal was caught */ -diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.h busybox-1.1.1-owrt/networking/udhcp/dhcpc.h ---- busybox-1.1.1/networking/udhcp/dhcpc.h 2006-03-22 22:16:19.000000000 +0100 -+++ busybox-1.1.1-owrt/networking/udhcp/dhcpc.h 2006-04-01 18:27:45.000000000 +0200 -@@ -19,6 +19,7 @@ +diff -ruN busybox-1.2.0-old/networking/udhcp/dhcpc.h busybox-1.2.0-new/networking/udhcp/dhcpc.h +--- busybox-1.2.0-old/networking/udhcp/dhcpc.h 2006-07-01 00:42:02.000000000 +0200 ++++ busybox-1.2.0-new/networking/udhcp/dhcpc.h 2006-07-31 11:08:49.000000000 +0200 +@@ -18,6 +18,7 @@ struct client_config_t { char foreground; /* Do not fork */ char quit_after_lease; /* Quit after obtaining lease */ diff --git a/package/busybox/patches/300-netmsg.patch b/package/busybox/patches/300-netmsg.patch index ad4fcd04d0..428e321390 100644 --- a/package/busybox/patches/300-netmsg.patch +++ b/package/busybox/patches/300-netmsg.patch @@ -1,21 +1,23 @@ - - Copyright (C) 2006 OpenWrt.org - -diff -Nur busybox-1.1.1/include/applets.h busybox-1.1.1-owrt/include/applets.h ---- busybox-1.1.1/include/applets.h 2006-04-01 18:26:21.000000000 +0200 -+++ busybox-1.1.1-owrt/include/applets.h 2006-04-01 18:36:28.000000000 +0200 -@@ -197,6 +197,7 @@ - USE_MV(APPLET(mv, mv_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_NAMEIF(APPLET(nameif, nameif_main, _BB_DIR_SBIN, _BB_SUID_NEVER)) - USE_NC(APPLET(nc, nc_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -+USE_NETMSG(APPLET_NOUSAGE(netmsg, netmsg_main, _BB_DIR_BIN, _BB_SUID_ALWAYS)) - USE_NETSTAT(APPLET(netstat, netstat_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_NICE(APPLET(nice, nice_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_NOHUP(APPLET(nohup, nohup_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -diff -Nur busybox-1.1.1/networking/Config.in busybox-1.1.1-owrt/networking/Config.in ---- busybox-1.1.1/networking/Config.in 2006-03-22 22:16:19.000000000 +0100 -+++ busybox-1.1.1-owrt/networking/Config.in 2006-04-01 18:35:32.000000000 +0200 -@@ -451,6 +451,12 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +diff -ruN busybox-1.2.0-old/include/applets.h busybox-1.2.0-new/include/applets.h +--- busybox-1.2.0-old/include/applets.h 2006-07-31 10:47:56.000000000 +0200 ++++ busybox-1.2.0-new/include/applets.h 2006-07-31 11:21:00.000000000 +0200 +@@ -200,6 +200,7 @@ + USE_MV(APPLET(mv, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_NAMEIF(APPLET(nameif, _BB_DIR_SBIN, _BB_SUID_NEVER)) + USE_NC(APPLET(nc, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) ++USE_NETMSG(APPLET_NOUSAGE(netmsg, netmsg, _BB_DIR_BIN, _BB_SUID_ALWAYS)) + USE_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_NOHUP(APPLET(nohup, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) +diff -ruN busybox-1.2.0-old/networking/Config.in busybox-1.2.0-new/networking/Config.in +--- busybox-1.2.0-old/networking/Config.in 2006-07-01 00:42:02.000000000 +0200 ++++ busybox-1.2.0-new/networking/Config.in 2006-07-31 11:18:01.000000000 +0200 +@@ -445,6 +445,12 @@ help A simple Unix utility which reads and writes data across network connections. @@ -28,9 +30,9 @@ diff -Nur busybox-1.1.1/networking/Config.in busybox-1.1.1-owrt/networking/Confi config CONFIG_NC_GAPING_SECURITY_HOLE bool "gaping security hole" -diff -Nur busybox-1.1.1/networking/Makefile.in busybox-1.1.1-owrt/networking/Makefile.in ---- busybox-1.1.1/networking/Makefile.in 2006-03-22 22:16:19.000000000 +0100 -+++ busybox-1.1.1-owrt/networking/Makefile.in 2006-04-01 18:35:32.000000000 +0200 +diff -ruN busybox-1.2.0-old/networking/Makefile.in busybox-1.2.0-new/networking/Makefile.in +--- busybox-1.2.0-old/networking/Makefile.in 2006-07-01 00:42:02.000000000 +0200 ++++ busybox-1.2.0-new/networking/Makefile.in 2006-07-31 11:18:01.000000000 +0200 @@ -30,6 +30,7 @@ NETWORKING-$(CONFIG_IPTUNNEL) += iptunnel.o NETWORKING-$(CONFIG_NAMEIF) += nameif.o @@ -39,9 +41,9 @@ diff -Nur busybox-1.1.1/networking/Makefile.in busybox-1.1.1-owrt/networking/Mak NETWORKING-$(CONFIG_NETSTAT) += netstat.o NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o NETWORKING-$(CONFIG_PING) += ping.o -diff -Nur busybox-1.1.1/networking/netmsg.c busybox-1.1.1-owrt/networking/netmsg.c ---- busybox-1.1.1/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-owrt/networking/netmsg.c 2006-04-01 18:35:32.000000000 +0200 +diff -ruN busybox-1.2.0-old/networking/netmsg.c busybox-1.2.0-new/networking/netmsg.c +--- busybox-1.2.0-old/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0-new/networking/netmsg.c 2006-07-31 11:18:01.000000000 +0200 @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2006 Felix Fietkau diff --git a/package/busybox/patches/320-httpd_address_binding.patch b/package/busybox/patches/320-httpd_address_binding.patch index b9503aa02a..68487b88c7 100644 --- a/package/busybox/patches/320-httpd_address_binding.patch +++ b/package/busybox/patches/320-httpd_address_binding.patch @@ -1,28 +1,20 @@ - - Copyright (C) 2006 OpenWrt.org - ---- busybox-1.1.1/networking/httpd.c 2006-03-22 22:16:19.000000000 +0100 -+++ busybox-1.1.1.new/networking/httpd.c 2006-04-01 19:41:42.150744624 +0200 -@@ -110,6 +110,7 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +diff -ruN busybox-1.2.0-old/networking/httpd.c busybox-1.2.0-new/networking/httpd.c +--- busybox-1.2.0-old/networking/httpd.c 2006-07-01 00:42:02.000000000 +0200 ++++ busybox-1.2.0-new/networking/httpd.c 2006-08-01 10:06:58.000000000 +0200 +@@ -99,6 +99,7 @@ #include #include /* for connect and socket*/ #include /* for sockaddr_in */ +#include - #include #include #include -@@ -204,8 +205,8 @@ - - void bb_show_usage(void) - { -- fprintf(stderr, "Usage: %s [-p ] [-c configFile] [-d/-e ] " -- "[-r realm] [-u user] [-h homedir]\n", bb_applet_name); -+ fprintf(stderr, "Usage: %s [-p ] [-l ] [-c configFile]" -+ "[-d/-e ] [-r realm] [-u user] [-h homedir]\n", bb_applet_name); - exit(1); - } - #endif -@@ -255,6 +256,7 @@ + #include /* for open modes */ +@@ -165,6 +166,7 @@ #endif unsigned port; /* server initial port and for set env REMOTE_PORT */ @@ -30,7 +22,7 @@ union HTTPD_FOUND { const char *found_mime_type; const char *found_moved_temporarily; -@@ -958,7 +960,10 @@ +@@ -868,7 +870,10 @@ /* inet_addr() returns a value that is already in network order */ memset(&lsocket, 0, sizeof(lsocket)); lsocket.sin_family = AF_INET; @@ -39,61 +31,61 @@ + if (config->address != NULL) lsocket.sin_addr.s_addr = ((struct in_addr *) ((gethostbyname(config->address))->h_addr))->s_addr; + else lsocket.sin_addr.s_addr = htons(INADDR_ANY); + } - lsocket.sin_port = htons(config->port) ; - fd = socket(AF_INET, SOCK_STREAM, 0); - if (fd >= 0) { -@@ -1996,6 +2001,7 @@ + lsocket.sin_port = htons(config->port); + fd = bb_xsocket(AF_INET, SOCK_STREAM, 0); + /* tell the OS it's OK to reuse a previous address even though */ +@@ -1899,6 +1904,7 @@ USE_FEATURE_HTTPD_AUTH_MD5(m_opt_md5,) USE_FEATURE_HTTPD_SETUID(u_opt_setuid,) - SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(p_opt_port,) -+ SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(l_opt_addr,) + USE_FEATURE_HTTPD_WITHOUT_INETD(p_opt_port,) ++ USE_FEATURE_HTTPD_WITHOUT_INETD(l_opt_addr,) }; static const char httpd_opts[]="c:d:h:" -@@ -2003,7 +2009,7 @@ +@@ -1906,7 +1912,7 @@ USE_FEATURE_HTTPD_BASIC_AUTH("r:") USE_FEATURE_HTTPD_AUTH_MD5("m:") USE_FEATURE_HTTPD_SETUID("u:") -- SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY("p:"); -+ SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY("p:l:"); +- USE_FEATURE_HTTPD_WITHOUT_INETD("p:"); ++ USE_FEATURE_HTTPD_WITHOUT_INETD("p:l:"); #define OPT_CONFIG_FILE (1<port = 80; + config->address = ""; #endif config->ContentLength = -1; -@@ -2061,6 +2071,7 @@ +@@ -1960,6 +1970,7 @@ USE_FEATURE_HTTPD_AUTH_MD5(, &pass) USE_FEATURE_HTTPD_SETUID(, &s_uid) - SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(, &s_port) -+ SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(, &s_addr) + USE_FEATURE_HTTPD_WITHOUT_INETD(, &s_port) ++ USE_FEATURE_HTTPD_WITHOUT_INETD(, &s_addr) ); if(opt & OPT_DECODE_URL) { -@@ -2082,6 +2093,8 @@ - #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY +@@ -1981,6 +1992,8 @@ + #ifdef CONFIG_FEATURE_HTTPD_WITHOUT_INETD if(opt & OPT_PORT) config->port = bb_xgetlarg(s_port, 10, 1, 0xffff); + if (opt & OPT_ADDRESS) diff --git a/package/busybox/patches/340-lock_util.patch b/package/busybox/patches/340-lock_util.patch index ad594e68db..a86948d597 100644 --- a/package/busybox/patches/340-lock_util.patch +++ b/package/busybox/patches/340-lock_util.patch @@ -1,21 +1,23 @@ - - Copyright (C) 2006 OpenWrt.org - -diff -urN busybox.old/include/applets.h busybox.dev/include/applets.h ---- busybox.old/include/applets.h 2006-04-05 01:06:29.000000000 +0200 -+++ busybox.dev/include/applets.h 2006-04-05 01:19:09.000000000 +0200 -@@ -167,6 +167,7 @@ - USE_LN(APPLET(ln, ln_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_LOADFONT(APPLET(loadfont, loadfont_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) - USE_LOADKMAP(APPLET(loadkmap, loadkmap_main, _BB_DIR_SBIN, _BB_SUID_NEVER)) -+USE_LOCK(APPLET_NOUSAGE(lock, lock_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_LOGGER(APPLET(logger, logger_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) - USE_LOGIN(APPLET(login, login_main, _BB_DIR_BIN, _BB_SUID_ALWAYS)) - USE_LOGNAME(APPLET(logname, logname_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -diff -urN busybox.old/miscutils/Config.in busybox.dev/miscutils/Config.in ---- busybox.old/miscutils/Config.in 2006-03-22 22:16:24.000000000 +0100 -+++ busybox.dev/miscutils/Config.in 2006-04-05 01:07:12.000000000 +0200 -@@ -209,6 +209,12 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +diff -ruN busybox-1.2.0-old/include/applets.h busybox-1.2.0-new/include/applets.h +--- busybox-1.2.0-old/include/applets.h 2006-07-31 11:21:00.000000000 +0200 ++++ busybox-1.2.0-new/include/applets.h 2006-08-01 10:21:15.000000000 +0200 +@@ -169,6 +169,7 @@ + USE_LN(APPLET(ln, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_LOADFONT(APPLET(loadfont, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_LOADKMAP(APPLET(loadkmap, _BB_DIR_SBIN, _BB_SUID_NEVER)) ++USE_LOCK(APPLET_NOUSAGE(lock, lock, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_LOGGER(APPLET(logger, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_ALWAYS)) + USE_LOGNAME(APPLET(logname, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) +diff -ruN busybox-1.2.0-old/miscutils/Config.in busybox-1.2.0-new/miscutils/Config.in +--- busybox-1.2.0-old/miscutils/Config.in 2006-07-01 00:42:09.000000000 +0200 ++++ busybox-1.2.0-new/miscutils/Config.in 2006-08-01 10:21:15.000000000 +0200 +@@ -231,6 +231,12 @@ Enables the 'hdparm -d' option to get/set using_dma flag. This is dangerous stuff, so you should probably say N. @@ -28,20 +30,9 @@ diff -urN busybox.old/miscutils/Config.in busybox.dev/miscutils/Config.in config CONFIG_MAKEDEVS bool "makedevs" default n -diff -urN busybox.old/miscutils/Makefile.in busybox.dev/miscutils/Makefile.in ---- busybox.old/miscutils/Makefile.in 2006-03-22 22:16:24.000000000 +0100 -+++ busybox.dev/miscutils/Makefile.in 2006-04-05 01:10:50.000000000 +0200 -@@ -20,6 +20,7 @@ - MISCUTILS-$(CONFIG_EJECT) += eject.o - MISCUTILS-$(CONFIG_HDPARM) += hdparm.o - MISCUTILS-$(CONFIG_LAST) += last.o -+MISCUTILS-$(CONFIG_LOCK) += lock.o - MISCUTILS-${CONFIG_LESS} += less.o - MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o - MISCUTILS-$(CONFIG_MOUNTPOINT) += mountpoint.o -diff -urN busybox.old/miscutils/lock.c busybox.dev/miscutils/lock.c ---- busybox.old/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox.dev/miscutils/lock.c 2006-04-05 01:07:12.000000000 +0200 +diff -ruN busybox-1.2.0-old/miscutils/lock.c busybox-1.2.0-new/miscutils/lock.c +--- busybox-1.2.0-old/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0-new/miscutils/lock.c 2006-08-01 10:21:15.000000000 +0200 @@ -0,0 +1,133 @@ +/* + * Copyright (C) 2006 Felix Fietkau @@ -176,3 +167,14 @@ diff -urN busybox.old/miscutils/lock.c busybox.dev/miscutils/lock.c + else + return do_lock(); +} +diff -ruN busybox-1.2.0-old/miscutils/Makefile.in busybox-1.2.0-new/miscutils/Makefile.in +--- busybox-1.2.0-old/miscutils/Makefile.in 2006-07-01 00:42:09.000000000 +0200 ++++ busybox-1.2.0-new/miscutils/Makefile.in 2006-08-01 10:21:15.000000000 +0200 +@@ -20,6 +20,7 @@ + MISCUTILS-$(CONFIG_EJECT) += eject.o + MISCUTILS-$(CONFIG_HDPARM) += hdparm.o + MISCUTILS-$(CONFIG_LAST) += last.o ++MISCUTILS-$(CONFIG_LOCK) += lock.o + MISCUTILS-${CONFIG_LESS} += less.o + MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o + MISCUTILS-$(CONFIG_MOUNTPOINT) += mountpoint.o diff --git a/package/busybox/patches/911-ipkg.patch b/package/busybox/patches/911-ipkg.patch index 1d7a4e3574..1824e03c42 100644 --- a/package/busybox/patches/911-ipkg.patch +++ b/package/busybox/patches/911-ipkg.patch @@ -1,21 +1,13 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. # # add ipkg support to busybox # -diff -ruN busybox-1.1.2-orig/Makefile busybox-1.1.2+ipkg-0.99.162/Makefile ---- busybox-1.1.2-orig/Makefile 2006-04-10 21:45:46.000000000 +0200 -+++ busybox-1.1.2+ipkg-0.99.162/Makefile 2006-05-09 02:06:48.000000000 +0200 -@@ -25,7 +25,7 @@ - export srctree=$(top_srcdir) - vpath %/Config.in $(srctree) - --DIRS:=applets archival archival/libunarchive coreutils console-tools \ -+DIRS:=applets archival archival/libipkg archival/libunarchive coreutils console-tools \ - debianutils editors findutils init miscutils modutils networking \ - networking/libiproute networking/udhcp procps loginutils shell \ - sysklogd util-linux e2fsprogs libpwdgrp coreutils/libcoreutils libbb -diff -ruN busybox-1.1.2-orig/archival/Config.in busybox-1.1.2+ipkg-0.99.162/archival/Config.in ---- busybox-1.1.2-orig/archival/Config.in 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/Config.in 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/Config.in busybox-1.2.0+ipkg-0.99.162/archival/Config.in +--- busybox-1.2.0-orig/archival/Config.in 2006-07-01 00:42:04.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/archival/Config.in 2006-07-22 16:31:25.000000000 +0200 @@ -121,6 +121,14 @@ gzip is used to compress files. It's probably the most widely used UNIX compression program. @@ -31,21 +23,10 @@ diff -ruN busybox-1.1.2-orig/archival/Config.in busybox-1.1.2+ipkg-0.99.162/arch config CONFIG_RPM2CPIO bool "rpm2cpio" default n -diff -ruN busybox-1.1.2-orig/archival/Makefile.in busybox-1.1.2+ipkg-0.99.162/archival/Makefile.in ---- busybox-1.1.2-orig/archival/Makefile.in 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/Makefile.in 2006-05-09 02:06:48.000000000 +0200 -@@ -20,6 +20,7 @@ - ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o - ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o - ARCHIVAL-$(CONFIG_GZIP) += gzip.o -+ARCHIVAL-$(CONFIG_IPKG) += ipkg.o - ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o - ARCHIVAL-$(CONFIG_RPM) += rpm.o - ARCHIVAL-$(CONFIG_TAR) += tar.o -diff -ruN busybox-1.1.2-orig/archival/dpkg.c busybox-1.1.2+ipkg-0.99.162/archival/dpkg.c ---- busybox-1.1.2-orig/archival/dpkg.c 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/dpkg.c 2006-05-09 02:06:48.000000000 +0200 -@@ -1530,6 +1530,10 @@ +diff -ruN busybox-1.2.0-orig/archival/dpkg.c busybox-1.2.0+ipkg-0.99.162/archival/dpkg.c +--- busybox-1.2.0-orig/archival/dpkg.c 2006-07-01 00:42:04.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/archival/dpkg.c 2006-07-22 16:31:25.000000000 +0200 +@@ -1430,6 +1430,10 @@ return(ar_handle->sub_archive->buffer); } @@ -56,7 +37,7 @@ diff -ruN busybox-1.1.2-orig/archival/dpkg.c busybox-1.1.2+ipkg-0.99.162/archiva static void data_extract_all_prefix(archive_handle_t *archive_handle) { char *name_ptr = archive_handle->file_header->name; -@@ -1544,6 +1548,8 @@ +@@ -1442,6 +1446,8 @@ return; } @@ -65,9 +46,9 @@ diff -ruN busybox-1.1.2-orig/archival/dpkg.c busybox-1.1.2+ipkg-0.99.162/archiva static void unpack_package(deb_file_t *deb_file) { const char *package_name = name_hashtable[package_hashtable[deb_file->package]->name]; -diff -ruN busybox-1.1.2-orig/archival/ipkg.c busybox-1.1.2+ipkg-0.99.162/archival/ipkg.c ---- busybox-1.1.2-orig/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/ipkg.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/ipkg.c busybox-1.2.0+ipkg-0.99.162/archival/ipkg.c +--- busybox-1.2.0-orig/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/ipkg.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,26 @@ +/* ipkg.c - the itsy package management system + @@ -95,134 +76,9 @@ diff -ruN busybox-1.1.2-orig/archival/ipkg.c busybox-1.1.2+ipkg-0.99.162/archiva +{ + return ipkg_op(argc, argv); +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/Makefile busybox-1.1.2+ipkg-0.99.162/archival/libipkg/Makefile ---- busybox-1.1.2-orig/archival/libipkg/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/Makefile 2006-05-09 02:06:48.000000000 +0200 -@@ -0,0 +1,32 @@ -+# Makefile for busybox -+# -+# Copyright (C) 1999-2004 by Erik Andersen -+# -+# 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 of the License, 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. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+# -+ -+top_srcdir=../.. -+top_builddir=../.. -+srcdir=$(top_srcdir)/archival/libipkg -+LIBIPKG_DIR:=./ -+include $(top_builddir)/Rules.mak -+include $(top_builddir)/.config -+include $(srcdir)/Makefile.in -+all: $(libraries-y) -+-include $(top_builddir)/.depend -+ -+clean: -+ rm -f *.o *.a $(AR_TARGET) -+ -diff -ruN busybox-1.1.2-orig/archival/libipkg/Makefile.in busybox-1.1.2+ipkg-0.99.162/archival/libipkg/Makefile.in ---- busybox-1.1.2-orig/archival/libipkg/Makefile.in 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/Makefile.in 2006-05-09 02:06:48.000000000 +0200 -@@ -0,0 +1,85 @@ -+# Makefile for busybox -+# -+# Copyright (C) 1999-2004 by Erik Andersen -+# -+# 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 of the License, 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. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+# -+ -+LIBIPKG_AR:=libipkg.a -+ifndef $(LIBIPKG_DIR) -+LIBIPKG_DIR:=$(top_builddir)/archival/libipkg/ -+endif -+srcdir=$(top_srcdir)/archival/libipkg -+ -+LIBIPKG_CORE_SOURCES:= \ -+ args.c \ -+ libipkg.c \ -+ user.c \ -+ -+LIBIPKG_CMD_SOURCES:= \ -+ ipkg_cmd.c \ -+ ipkg_configure.c \ -+ ipkg_download.c \ -+ ipkg_install.c \ -+ ipkg_remove.c \ -+ ipkg_upgrade.c \ -+ -+LIBIPKG_DB_SOURCES:= \ -+ hash_table.c \ -+ ipkg_conf.c \ -+ ipkg_utils.c \ -+ pkg.c \ -+ pkg_depends.c \ -+ pkg_extract.c \ -+ pkg_hash.c \ -+ pkg_parse.c \ -+ pkg_vec.c \ -+ -+LIBIPKG_LIST_SOURCES:= \ -+ conffile.c \ -+ conffile_list.c \ -+ nv_pair.c \ -+ nv_pair_list.c \ -+ pkg_dest.c \ -+ pkg_dest_list.c \ -+ pkg_src.c \ -+ pkg_src_list.c \ -+ str_list.c \ -+ void_list.c \ -+ -+LIBIPKG_UTIL_SOURCES:= \ -+ file_util.c \ -+ ipkg_message.c \ -+ md5.c \ -+ str_util.c \ -+ xsystem.c \ -+ -+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_CORE_SOURCES) -+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_CMD_SOURCES) -+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_DB_SOURCES) -+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_LIST_SOURCES) -+LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_UTIL_SOURCES) -+LIBIPKG_OBJS=$(patsubst %.c,$(LIBIPKG_DIR)%.o, $(LIBIPKG-y)) -+ -+CFLAGS += -DIPKG_LIB -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(TARGET_ARCH)\"" -+ -+libraries-$(CONFIG_IPKG) += $(LIBIPKG_DIR)$(LIBIPKG_AR) -+ -+$(LIBIPKG_DIR)$(LIBIPKG_AR): $(LIBIPKG_OBJS) -+ $(do_ar) -+ -+$(LIBIPKG_OBJS): $(LIBIPKG_DIR)%.o : $(srcdir)/%.c -+ $(compile.c) -+ -diff -ruN busybox-1.1.2-orig/archival/libipkg/args.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/args.c ---- busybox-1.1.2-orig/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/args.c 2006-05-09 02:12:03.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/args.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/args.c +--- busybox-1.2.0-orig/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/args.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,242 @@ +/* args.c - parse command-line args + @@ -466,9 +322,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/args.c busybox-1.1.2+ipkg-0.99.162 +{ + bb_error_msg("version %s\n", IPKG_VERSION); +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/args.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/args.h ---- busybox-1.1.2-orig/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/args.h 2006-05-09 02:12:03.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/args.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/args.h +--- busybox-1.2.0-orig/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/args.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,72 @@ +/* args.h - parse command-line args + @@ -542,9 +398,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/args.h busybox-1.1.2+ipkg-0.99.162 +void args_usage(char *complaint); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile.c ---- busybox-1.1.2-orig/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile.c +--- busybox-1.2.0-orig/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,64 @@ +/* conffile.c - the itsy package management system + @@ -610,9 +466,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile.c busybox-1.1.2+ipkg-0.99 + + return ret; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile.h ---- busybox-1.1.2-orig/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile.h +--- busybox-1.2.0-orig/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,30 @@ +/* conffile.h - the itsy package management system + @@ -644,9 +500,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile.h busybox-1.1.2+ipkg-0.99 + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile_list.c ---- busybox-1.1.2-orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile_list.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile_list.c +--- busybox-1.2.0-orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile_list.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,47 @@ +/* conffile_list.c - the itsy package management system + @@ -695,9 +551,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile_list.c busybox-1.1.2+ipkg + return nv_pair_list_pop(list); +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile_list.h ---- busybox-1.1.2-orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/conffile_list.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/conffile_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile_list.h +--- busybox-1.2.0-orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/conffile_list.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,36 @@ +/* conffile_list.h - the itsy package management system + @@ -735,9 +591,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/conffile_list.h busybox-1.1.2+ipkg + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/file_util.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.c ---- busybox-1.1.2-orig/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/file_util.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/file_util.c +--- busybox-1.2.0-orig/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/file_util.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,177 @@ +/* file_util.c - convenience routines for common stat operations + @@ -916,9 +772,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/file_util.c busybox-1.1.2+ipkg-0.9 + return md5sum_hex; +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/file_util.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.h ---- busybox-1.1.2-orig/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/file_util.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/file_util.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/file_util.h +--- busybox-1.2.0-orig/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/file_util.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,29 @@ +/* file_util.h - convenience routines for common file operations + @@ -949,9 +805,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/file_util.h busybox-1.1.2+ipkg-0.9 +char *file_md5sum_alloc(const char *file_name); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/hash_table.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/hash_table.c ---- busybox-1.1.2-orig/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/hash_table.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/hash_table.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/hash_table.c +--- busybox-1.2.0-orig/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/hash_table.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,155 @@ +/* hash.c - hash tables for ipkg + @@ -1108,9 +964,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/hash_table.c busybox-1.1.2+ipkg-0. + } +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/hash_table.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/hash_table.h ---- busybox-1.1.2-orig/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/hash_table.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/hash_table.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/hash_table.h +--- busybox-1.2.0-orig/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/hash_table.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,44 @@ +/* hash.h - hash tables for ipkg + @@ -1156,87 +1012,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/hash_table.h busybox-1.1.2+ipkg-0. +void hash_table_foreach(hash_table_t *hash, void (*f)(const char *key, void *entry, void *data), void *data); + +#endif /* _HASH_TABLE_H_ */ -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg.h 2006-05-09 02:06:48.000000000 +0200 -@@ -0,0 +1,74 @@ -+/* ipkg.h - the itsy package management system -+ -+ Carl D. Worth -+ -+ Copyright (C) 2001 University of Southern California -+ -+ 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. -+*/ -+ -+#ifndef IPKG_H -+#define IPKG_H -+ -+/* -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+*/ -+ -+#if 0 -+#define IPKG_DEBUG_NO_TMP_CLEANUP -+#endif -+ -+#include "ipkg_includes.h" -+#include "ipkg_conf.h" -+#include "ipkg_message.h" -+ -+#define IPKG_PKG_EXTENSION ".ipk" -+#define DPKG_PKG_EXTENSION ".deb" -+ -+#define IPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-" -+#define IPKG_PKG_VERSION_SEP_CHAR '_' -+ -+#define IPKG_STATE_DIR_PREFIX IPKGLIBDIR"/ipkg" -+#define IPKG_LISTS_DIR_SUFFIX "lists" -+#define IPKG_INFO_DIR_SUFFIX "info" -+#define IPKG_STATUS_FILE_SUFFIX "status" -+ -+#define IPKG_BACKUP_SUFFIX "-ipkg.backup" -+ -+#define IPKG_LIST_DESCRIPTION_LENGTH 128 -+ -+#define IPKG_VERSION "0.99.162" -+ -+ -+enum ipkg_error { -+ IPKG_SUCCESS = 0, -+ IPKG_PKG_DEPS_UNSATISFIED, -+ IPKG_PKG_IS_ESSENTIAL, -+ IPKG_PKG_HAS_DEPENDENTS, -+ IPKG_PKG_HAS_NO_CANDIDATE -+}; -+typedef enum ipkg_error ipkg_error_t; -+ -+extern int ipkg_state_changed; -+ -+ -+struct errlist { -+ char * errmsg; -+ struct errlist * next; -+} ; -+ -+extern struct errlist* error_list; -+ -+extern ipkg_conf_t *global_conf; -+ -+#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c 2006-05-09 02:23:37.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_cmd.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,1431 @@ +/* ipkg_cmd.c - the itsy package management system + @@ -2669,9 +2447,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.c busybox-1.1.2+ipkg-0.99 +} + + -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_cmd.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_cmd.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_cmd.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,46 @@ +/* ipkg_cmd.h - the itsy package management system + @@ -2719,9 +2497,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_cmd.h busybox-1.1.2+ipkg-0.99 +int pkg_mark_provides(pkg_t *pkg); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_conf.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.c 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_conf.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_conf.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_conf.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,711 @@ +/* ipkg_conf.c - the itsy package management system + @@ -3434,9 +3212,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_conf.c busybox-1.1.2+ipkg-0.9 + sprintf_alloc(&root_filename, "%s%s", (conf->offline_root ? conf->offline_root : ""), filename); + return root_filename; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_conf.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_conf.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_conf.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_conf.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_conf.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,107 @@ +/* ipkg_conf.h - the itsy package management system + @@ -3545,9 +3323,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_conf.h busybox-1.1.2+ipkg-0.9 +char *root_filename_alloc(ipkg_conf_t *conf, char *filename); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_configure.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_configure.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_configure.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_configure.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_configure.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_configure.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,40 @@ +/* ipkg_configure.c - the itsy package management system + @@ -3589,9 +3367,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_configure.c busybox-1.1.2+ipk + return 0; +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_configure.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_configure.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_configure.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_configure.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_configure.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_configure.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,25 @@ +/* ipkg_configure.h - the itsy package management system + @@ -3618,9 +3396,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_configure.h busybox-1.1.2+ipk +int ipkg_configure(ipkg_conf_t *ipkg_conf, pkg_t *pkg); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_download.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.c 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_download.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,195 @@ +/* ipkg_download.c - the itsy package management system + @@ -3817,9 +3595,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_download.c busybox-1.1.2+ipkg + } + return 0; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_download.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_download.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_download.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_download.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,30 @@ +/* ipkg_download.h - the itsy package management system + @@ -3851,36 +3629,114 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_download.h busybox-1.1.2+ipkg +int ipkg_prepare_url_for_install(ipkg_conf_t *conf, const char *url, char **namep); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_includes.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_includes.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_includes.h 2006-05-09 02:06:48.000000000 +0200 -@@ -0,0 +1,79 @@ -+#ifndef IPKG_INCLUDES_H -+#define IPKG_INCLUDES_H +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg.h 2006-07-22 16:31:25.000000000 +0200 +@@ -0,0 +1,74 @@ ++/* ipkg.h - the itsy package management system + -+/* Define to 1 if you have the header file. */ -+#define HAVE_MEMORY_H 1 ++ Carl D. Worth + -+/* Define to 1 if you have the header file. */ -+#define HAVE_REGEX_H 1 ++ Copyright (C) 2001 University of Southern California + -+/* Define to 1 if you have the header file. */ -+#define HAVE_STDLIB_H 1 ++ 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. + -+/* Define to 1 if you have the header file. */ -+#define HAVE_STRINGS_H 1 ++ 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. ++*/ + -+/* Define to 1 if you have the header file. */ -+#define HAVE_STRING_H 1 ++#ifndef IPKG_H ++#define IPKG_H + -+/* Define to 1 if you have the header file. */ -+#define HAVE_SYS_STAT_H 1 ++/* ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++*/ + -+/* Define to 1 if you have that is POSIX.1 compatible. */ -+#define HAVE_SYS_WAIT_H 1 ++#if 0 ++#define IPKG_DEBUG_NO_TMP_CLEANUP ++#endif + -+/* Define to 1 if you have the header file. */ -+#define HAVE_UNISTD_H 1 ++#include "ipkg_includes.h" ++#include "ipkg_conf.h" ++#include "ipkg_message.h" ++ ++#define IPKG_PKG_EXTENSION ".ipk" ++#define DPKG_PKG_EXTENSION ".deb" ++ ++#define IPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-" ++#define IPKG_PKG_VERSION_SEP_CHAR '_' ++ ++#define IPKG_STATE_DIR_PREFIX IPKGLIBDIR"/ipkg" ++#define IPKG_LISTS_DIR_SUFFIX "lists" ++#define IPKG_INFO_DIR_SUFFIX "info" ++#define IPKG_STATUS_FILE_SUFFIX "status" ++ ++#define IPKG_BACKUP_SUFFIX "-ipkg.backup" ++ ++#define IPKG_LIST_DESCRIPTION_LENGTH 128 ++ ++#define IPKG_VERSION "0.99.162" ++ ++ ++enum ipkg_error { ++ IPKG_SUCCESS = 0, ++ IPKG_PKG_DEPS_UNSATISFIED, ++ IPKG_PKG_IS_ESSENTIAL, ++ IPKG_PKG_HAS_DEPENDENTS, ++ IPKG_PKG_HAS_NO_CANDIDATE ++}; ++typedef enum ipkg_error ipkg_error_t; ++ ++extern int ipkg_state_changed; ++ ++ ++struct errlist { ++ char * errmsg; ++ struct errlist * next; ++} ; ++ ++extern struct errlist* error_list; ++ ++extern ipkg_conf_t *global_conf; ++ ++#endif +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_includes.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_includes.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_includes.h 2006-07-22 16:31:25.000000000 +0200 +@@ -0,0 +1,79 @@ ++#ifndef IPKG_INCLUDES_H ++#define IPKG_INCLUDES_H ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_MEMORY_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_REGEX_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STDLIB_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STRINGS_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STRING_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_STAT_H 1 ++ ++/* Define to 1 if you have that is POSIX.1 compatible. */ ++#define HAVE_SYS_WAIT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 @@ -3934,9 +3790,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_includes.h busybox-1.1.2+ipkg +#endif + +#endif /* IPKG_INCLUDES_H */ -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_install.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_install.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_install.c 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_install.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_install.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_install.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,1942 @@ +/* ipkg_install.c - the itsy package management system + @@ -5880,9 +5736,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_install.c busybox-1.1.2+ipkg- +} + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_install.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_install.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_install.h 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_install.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_install.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_install.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,35 @@ +/* ipkg_install.h - the itsy package management system + @@ -5919,9 +5775,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_install.h busybox-1.1.2+ipkg- +int name_mark_dependencies_for_installation(ipkg_conf_t *conf, const char *pkg_name, pkg_vec_t *pkgs_needed); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_message.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_message.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_message.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_message.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_message.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_message.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,61 @@ +/* ipkg_message.c - the itsy package management system + @@ -5984,9 +5840,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_message.c busybox-1.1.2+ipkg- + } +} +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_message.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_message.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_message.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_message.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_message.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_message.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,32 @@ +/* ipkg_message.h - the itsy package management system + @@ -6020,9 +5876,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_message.h busybox-1.1.2+ipkg- +extern void ipkg_message(ipkg_conf_t *conf, message_level_t level, char *fmt, ...); + +#endif /* _IPKG_MESSAGE_H_ */ -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_remove.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_remove.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_remove.c 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_remove.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_remove.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_remove.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,383 @@ +/* ipkg_remove.c - the itsy package management system + @@ -6407,9 +6263,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_remove.c busybox-1.1.2+ipkg-0 + + return 0; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_remove.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_remove.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_remove.h 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_remove.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_remove.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_remove.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,33 @@ +/* ipkg_remove.h - the itsy package management system + @@ -6444,9 +6300,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_remove.h busybox-1.1.2+ipkg-0 + + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.c 2006-05-09 02:12:04.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,77 @@ +/* ipkg_upgrade.c - the itsy package management system + @@ -6525,9 +6381,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.c busybox-1.1.2+ipkg- + new->state_flag |= SF_USER; + return ipkg_install_pkg(conf, new,1); +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_upgrade.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,18 @@ +/* ipkg_upgrade.c - the itsy package management system + @@ -6547,9 +6403,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_upgrade.h busybox-1.1.2+ipkg- +#include "ipkg.h" + +int ipkg_upgrade_pkg(ipkg_conf_t *conf, pkg_t *old); -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_utils.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_utils.c ---- busybox-1.1.2-orig/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_utils.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_utils.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_utils.c +--- busybox-1.2.0-orig/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_utils.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,181 @@ +/* ipkg_utils.c - the itsy package management system + @@ -6732,9 +6588,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_utils.c busybox-1.1.2+ipkg-0. +} + + -diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_utils.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_utils.h ---- busybox-1.1.2-orig/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/ipkg_utils.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/ipkg_utils.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_utils.h +--- busybox-1.2.0-orig/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/ipkg_utils.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,29 @@ +/* ipkg_utils.h - the itsy package management system + @@ -6765,9 +6621,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/ipkg_utils.h busybox-1.1.2+ipkg-0. +int line_is_blank(const char *line); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/libipkg.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.c ---- busybox-1.1.2-orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.c 2006-05-09 02:12:05.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/libipkg.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/libipkg.c +--- busybox-1.2.0-orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/libipkg.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,527 @@ +/* ipkglib.c - the itsy package management system + @@ -7296,9 +7152,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/libipkg.c busybox-1.1.2+ipkg-0.99. +} + +#endif /* IPKG_LIB */ -diff -ruN busybox-1.1.2-orig/archival/libipkg/libipkg.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.h ---- busybox-1.1.2-orig/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/libipkg.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/libipkg.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/libipkg.h +--- busybox-1.2.0-orig/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/libipkg.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,87 @@ +/* ipkglib.h - the itsy package management system + @@ -7387,9 +7243,134 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/libipkg.h busybox-1.1.2+ipkg-0.99. + + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/md5.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.c ---- busybox-1.1.2-orig/archival/libipkg/md5.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/Makefile busybox-1.2.0+ipkg-0.99.162/archival/libipkg/Makefile +--- busybox-1.2.0-orig/archival/libipkg/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/Makefile 2006-07-22 16:31:25.000000000 +0200 +@@ -0,0 +1,32 @@ ++# Makefile for busybox ++# ++# Copyright (C) 1999-2004 by Erik Andersen ++# ++# 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 of the License, 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. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++# ++ ++top_srcdir=../.. ++top_builddir=../.. ++srcdir=$(top_srcdir)/archival/libipkg ++LIBIPKG_DIR:=./ ++include $(top_builddir)/Rules.mak ++include $(top_builddir)/.config ++include $(srcdir)/Makefile.in ++all: $(libraries-y) ++-include $(top_builddir)/.depend ++ ++clean: ++ rm -f *.o *.a $(AR_TARGET) ++ +diff -ruN busybox-1.2.0-orig/archival/libipkg/Makefile.in busybox-1.2.0+ipkg-0.99.162/archival/libipkg/Makefile.in +--- busybox-1.2.0-orig/archival/libipkg/Makefile.in 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/Makefile.in 2006-07-22 16:31:25.000000000 +0200 +@@ -0,0 +1,85 @@ ++# Makefile for busybox ++# ++# Copyright (C) 1999-2004 by Erik Andersen ++# ++# 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 of the License, 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. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++# ++ ++LIBIPKG_AR:=libipkg.a ++ifndef $(LIBIPKG_DIR) ++LIBIPKG_DIR:=$(top_builddir)/archival/libipkg/ ++endif ++srcdir=$(top_srcdir)/archival/libipkg ++ ++LIBIPKG_CORE_SOURCES:= \ ++ args.c \ ++ libipkg.c \ ++ user.c \ ++ ++LIBIPKG_CMD_SOURCES:= \ ++ ipkg_cmd.c \ ++ ipkg_configure.c \ ++ ipkg_download.c \ ++ ipkg_install.c \ ++ ipkg_remove.c \ ++ ipkg_upgrade.c \ ++ ++LIBIPKG_DB_SOURCES:= \ ++ hash_table.c \ ++ ipkg_conf.c \ ++ ipkg_utils.c \ ++ pkg.c \ ++ pkg_depends.c \ ++ pkg_extract.c \ ++ pkg_hash.c \ ++ pkg_parse.c \ ++ pkg_vec.c \ ++ ++LIBIPKG_LIST_SOURCES:= \ ++ conffile.c \ ++ conffile_list.c \ ++ nv_pair.c \ ++ nv_pair_list.c \ ++ pkg_dest.c \ ++ pkg_dest_list.c \ ++ pkg_src.c \ ++ pkg_src_list.c \ ++ str_list.c \ ++ void_list.c \ ++ ++LIBIPKG_UTIL_SOURCES:= \ ++ file_util.c \ ++ ipkg_message.c \ ++ md5.c \ ++ str_util.c \ ++ xsystem.c \ ++ ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_CORE_SOURCES) ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_CMD_SOURCES) ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_DB_SOURCES) ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_LIST_SOURCES) ++LIBIPKG-$(CONFIG_IPKG) += $(LIBIPKG_UTIL_SOURCES) ++LIBIPKG_OBJS=$(patsubst %.c,$(LIBIPKG_DIR)%.o, $(LIBIPKG-y)) ++ ++CFLAGS += -DIPKG_LIB -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(TARGET_ARCH)\"" ++ ++libraries-$(CONFIG_IPKG) += $(LIBIPKG_DIR)$(LIBIPKG_AR) ++ ++$(LIBIPKG_DIR)$(LIBIPKG_AR): $(LIBIPKG_OBJS) ++ $(do_ar) ++ ++$(LIBIPKG_OBJS): $(LIBIPKG_DIR)%.o : $(srcdir)/%.c ++ $(compile.c) ++ +diff -ruN busybox-1.2.0-orig/archival/libipkg/md5.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/md5.c +--- busybox-1.2.0-orig/archival/libipkg/md5.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/md5.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,48 @@ +/* md5.c - wrappers to busybox md5 functions + * @@ -7439,9 +7420,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/md5.c busybox-1.1.2+ipkg-0.99.162/ + return md5_end(resblock, &md5_cx); +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/md5.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.h ---- busybox-1.1.2-orig/archival/libipkg/md5.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/md5.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/md5.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/md5.h +--- busybox-1.2.0-orig/archival/libipkg/md5.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/md5.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,35 @@ +/* md5.h - Compute MD5 checksum of files or strings according to the + * definition of MD5 in RFC 1321 from April 1992. @@ -7478,9 +7459,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/md5.h busybox-1.1.2+ipkg-0.99.162/ + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair.c ---- busybox-1.1.2-orig/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair.c +--- busybox-1.2.0-orig/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,40 @@ +/* nv_pair.c - the itsy package management system + @@ -7522,9 +7503,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair.c busybox-1.1.2+ipkg-0.99. +} + + -diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair.h ---- busybox-1.1.2-orig/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair.h +--- busybox-1.2.0-orig/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,32 @@ +/* nv_pair.h - the itsy package management system + @@ -7558,9 +7539,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair.h busybox-1.1.2+ipkg-0.99. + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair_list.c ---- busybox-1.1.2-orig/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair_list.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair_list.c +--- busybox-1.2.0-orig/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair_list.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,98 @@ +/* nv_pair_list.c - the itsy package management system + @@ -7660,9 +7641,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair_list.c busybox-1.1.2+ipkg- + } + return NULL; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair_list.h ---- busybox-1.1.2-orig/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/nv_pair_list.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/nv_pair_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair_list.h +--- busybox-1.2.0-orig/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/nv_pair_list.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,60 @@ +/* nv_pair_list.h - the itsy package management system + @@ -7724,9 +7705,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/nv_pair_list.h busybox-1.1.2+ipkg- + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.c ---- busybox-1.1.2-orig/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.c 2006-05-09 02:12:05.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg.c +--- busybox-1.2.0-orig/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,1754 @@ +/* pkg.c - the itsy package management system + @@ -9482,15 +9463,15 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg.c busybox-1.1.2+ipkg-0.99.162/ + } + return 0; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.h ---- busybox-1.1.2-orig/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg.h 2006-05-09 02:12:05.000000000 +0200 -@@ -0,0 +1,232 @@ -+/* pkg.h - the itsy package management system -+ -+ Carl D. Worth +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_depends.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_depends.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_depends.c 2006-07-22 16:31:25.000000000 +0200 +@@ -0,0 +1,1033 @@ ++/* pkg_depends.c - the itsy package management system + -+ Copyright (C) 2001 University of Southern California ++ Steven M. Ayer ++ ++ Copyright (C) 2002 Compaq Computer Corporation + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as @@ -9503,270 +9484,34 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg.h busybox-1.1.2+ipkg-0.99.162/ + General Public License for more details. +*/ + -+#ifndef PKG_H -+#define PKG_H -+ -+#include -+#include -+#include -+ -+#include "pkg_vec.h" -+#include "str_list.h" -+#include "pkg_src.h" -+#include "pkg_dest.h" -+#include "ipkg_conf.h" -+#include "conffile_list.h" -+ -+struct ipkg_conf; -+ -+ -+#define ARRAY_SIZE(array) sizeof(array) / sizeof((array)[0]) ++#include "ipkg.h" ++#include ++#include ++ ++#include "pkg.h" ++#include "ipkg_utils.h" ++#include "pkg_hash.h" ++#include "ipkg_message.h" ++#include "pkg_parse.h" ++#include "hash_table.h" + -+/* I think "Size" is currently the shortest field name */ -+#define PKG_MINIMUM_FIELD_NAME_LEN 4 ++static int parseDepends(compound_depend_t *compound_depend, hash_table_t * hash, char * depend_str); ++static depend_t * depend_init(void); ++static void depend_deinit(depend_t *d); ++static char ** add_unresolved_dep(pkg_t * pkg, char ** the_lost, int ref_ndx); ++static char ** merge_unresolved(char ** oldstuff, char ** newstuff); ++static int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg); + -+enum pkg_state_want ++static int pkg_installed_and_constraint_satisfied(pkg_t *pkg, void *cdata) +{ -+ SW_UNKNOWN = 1, -+ SW_INSTALL, -+ SW_DEINSTALL, -+ SW_PURGE, -+ SW_LAST_STATE_WANT -+}; -+typedef enum pkg_state_want pkg_state_want_t; ++ depend_t *depend = (depend_t *)cdata; ++ if ((pkg->state_status == SS_INSTALLED || pkg->state_status == SS_UNPACKED) && version_constraints_satisfied(depend, pkg)) ++ return 1; ++ else ++ return 0; ++} + -+enum pkg_state_flag -+{ -+ SF_OK = 0, -+ SF_REINSTREQ = 1, -+ SF_HOLD = 2, /* do not upgrade version */ -+ SF_REPLACE = 4, /* replace this package */ -+ SF_NOPRUNE = 8, /* do not remove obsolete files */ -+ SF_PREFER = 16, /* prefer this version */ -+ SF_OBSOLETE = 32, /* old package in upgrade pair */ -+ SF_MARKED = 64, /* temporary mark */ -+ SF_FILELIST_CHANGED = 128, /* needs filelist written */ -+ SF_USER = 256, -+ SF_LAST_STATE_FLAG -+}; -+typedef enum pkg_state_flag pkg_state_flag_t; -+#define SF_NONVOLATILE_FLAGS (SF_HOLD|SF_NOPRUNE|SF_PREFER|SF_OBSOLETE|SF_USER) -+ -+enum pkg_state_status -+{ -+ SS_NOT_INSTALLED = 1, -+ SS_UNPACKED, -+ SS_HALF_CONFIGURED, -+ SS_INSTALLED, -+ SS_HALF_INSTALLED, -+ SS_CONFIG_FILES, -+ SS_POST_INST_FAILED, -+ SS_REMOVAL_FAILED, -+ SS_LAST_STATE_STATUS -+}; -+typedef enum pkg_state_status pkg_state_status_t; -+ -+struct abstract_pkg{ -+ char * name; -+ int dependencies_checked; -+ pkg_vec_t * pkgs; -+ pkg_state_status_t state_status; -+ pkg_state_flag_t state_flag; -+ struct abstract_pkg ** depended_upon_by; /* @@@@ this should be abstract_pkg_vec_t -Jamey */ -+ abstract_pkg_vec_t * provided_by; -+ abstract_pkg_vec_t * replaced_by; -+}; -+ -+#include "pkg_depends.h" -+ -+/* XXX: CLEANUP: I'd like to clean up pkg_t in several ways: -+ -+ The 3 version fields should go into a single version struct. (This -+ is especially important since, currently, pkg->version can easily -+ be mistaken for pkg_verson_str_alloc(pkg) although they are very -+ distinct. This has been the source of multiple bugs. -+ -+ The 3 state fields could possibly also go into their own struct. -+ -+ All fields which deal with lists of packages, (Depends, -+ Pre-Depends, Provides, Suggests, Recommends, Enhances), should each -+ be handled by a single struct in pkg_t -+ -+ All string fields for which there is a small set of possible -+ values, (section, maintainer, architecture, maybe version?), that -+ are reused among different packages -- for all such packages we -+ should move from "char *"s to some atom datatype to share data -+ storage and use less memory. We might even do reference counting, -+ but probably not since most often we only create new pkg_t structs, -+ we don't often free them. */ -+struct pkg -+{ -+ char *name; -+ unsigned long epoch; -+ char *version; -+ char *revision; -+ char *familiar_revision; -+ pkg_src_t *src; -+ pkg_dest_t *dest; -+ char *architecture; -+ char *section; -+ char *maintainer; -+ char *description; -+ pkg_state_want_t state_want; -+ pkg_state_flag_t state_flag; -+ pkg_state_status_t state_status; -+ char **depends_str; -+ int depends_count; -+ char **pre_depends_str; -+ int pre_depends_count; -+ char **recommends_str; -+ int recommends_count; -+ char **suggests_str; -+ int suggests_count; -+ compound_depend_t * depends; -+ -+ /* Abhaya: new conflicts */ -+ char **conflicts_str; -+ compound_depend_t * conflicts; -+ int conflicts_count; -+ -+ char **replaces_str; -+ int replaces_count; -+ abstract_pkg_t ** replaces; -+ -+ char **provides_str; -+ int provides_count; -+ abstract_pkg_t ** provides; -+ -+ abstract_pkg_t *parent; -+ -+ pkg_t *old_pkg; /* during upgrade, points from installee to previously installed */ -+ -+ char *filename; -+ char *local_filename; -+ char *url; -+ char *tmp_unpack_dir; -+ char *md5sum; -+ char *size; -+ char *installed_size; -+ char *priority; -+ char *source; -+ conffile_list_t conffiles; -+ time_t installed_time; -+ /* As pointer for lazy evaluation */ -+ str_list_t *installed_files; -+ /* XXX: CLEANUP: I'd like to perhaps come up with a better -+ mechanism to avoid the problem here, (which is that the -+ installed_files list was being freed from an inner loop while -+ still being used within an outer loop. */ -+ int installed_files_ref_cnt; -+ int essential; -+ int arch_priority; -+/* Adding this flag, to "force" ipkg to choose a "provided_by_hand" package, if there are multiple choice */ -+ int provided_by_hand; -+}; -+ -+pkg_t *pkg_new(void); -+int pkg_init(pkg_t *pkg); -+void pkg_deinit(pkg_t *pkg); -+int pkg_init_from_file(pkg_t *pkg, const char *filename); -+abstract_pkg_t *abstract_pkg_new(void); -+int abstract_pkg_init(abstract_pkg_t *ab_pkg); -+ -+/* -+ * merges fields from newpkg into oldpkg. -+ * Forcibly sets oldpkg state_status, state_want and state_flags if set_status is nonzero -+ */ -+int pkg_merge(pkg_t *oldpkg, pkg_t *newpkg, int set_status); -+ -+char *pkg_version_str_alloc(pkg_t *pkg); -+ -+int pkg_compare_versions(const pkg_t *pkg, const pkg_t *ref_pkg); -+int pkg_name_version_and_architecture_compare(void *a, void *b); -+int abstract_pkg_name_compare(void *a, void *b); -+ -+char * pkg_formatted_info(pkg_t *pkg ); -+char * pkg_formatted_field(pkg_t *pkg, const char *field ); -+ -+void set_flags_from_control(ipkg_conf_t *conf, pkg_t *pkg); -+ -+void pkg_print_info(pkg_t *pkg, FILE *file); -+void pkg_print_status(pkg_t * pkg, FILE * file); -+void pkg_print_field(pkg_t *pkg, FILE *file, const char *field); -+str_list_t *pkg_get_installed_files(pkg_t *pkg); -+int pkg_free_installed_files(pkg_t *pkg); -+int pkg_remove_installed_files_list(ipkg_conf_t *conf, pkg_t *pkg); -+conffile_t *pkg_get_conffile(pkg_t *pkg, const char *file_name); -+int pkg_run_script(struct ipkg_conf *conf, pkg_t *pkg, -+ const char *script, const char *args); -+ -+/* enum mappings */ -+char *pkg_state_want_to_str(pkg_state_want_t sw); -+pkg_state_want_t pkg_state_want_from_str(char *str); -+char *pkg_state_flag_to_str(pkg_state_flag_t sf); -+pkg_state_flag_t pkg_state_flag_from_str(char *str); -+char *pkg_state_status_to_str(pkg_state_status_t ss); -+pkg_state_status_t pkg_state_status_from_str(char *str); -+ -+int pkg_version_satisfied(pkg_t *it, pkg_t *ref, const char *op); -+ -+int pkg_arch_supported(ipkg_conf_t *conf, pkg_t *pkg); -+int pkg_info_preinstall_check(ipkg_conf_t *conf); -+int pkg_free_installed_files(pkg_t *pkg); -+ -+int pkg_write_filelist(ipkg_conf_t *conf, pkg_t *pkg); -+int pkg_write_changed_filelists(ipkg_conf_t *conf); -+ -+#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_depends.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.c 2006-05-09 02:12:05.000000000 +0200 -@@ -0,0 +1,1033 @@ -+/* pkg_depends.c - the itsy package management system -+ -+ Steven M. Ayer -+ -+ Copyright (C) 2002 Compaq Computer Corporation -+ -+ 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. -+*/ -+ -+#include "ipkg.h" -+#include -+#include -+ -+#include "pkg.h" -+#include "ipkg_utils.h" -+#include "pkg_hash.h" -+#include "ipkg_message.h" -+#include "pkg_parse.h" -+#include "hash_table.h" -+ -+static int parseDepends(compound_depend_t *compound_depend, hash_table_t * hash, char * depend_str); -+static depend_t * depend_init(void); -+static void depend_deinit(depend_t *d); -+static char ** add_unresolved_dep(pkg_t * pkg, char ** the_lost, int ref_ndx); -+static char ** merge_unresolved(char ** oldstuff, char ** newstuff); -+static int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg); -+ -+static int pkg_installed_and_constraint_satisfied(pkg_t *pkg, void *cdata) -+{ -+ depend_t *depend = (depend_t *)cdata; -+ if ((pkg->state_status == SS_INSTALLED || pkg->state_status == SS_UNPACKED) && version_constraints_satisfied(depend, pkg)) -+ return 1; -+ else -+ return 0; -+} -+ -+static int pkg_constraint_satisfied(pkg_t *pkg, void *cdata) ++static int pkg_constraint_satisfied(pkg_t *pkg, void *cdata) +{ + depend_t *depend = (depend_t *)cdata; +#if 0 @@ -10755,9 +10500,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_depends.c busybox-1.1.2+ipkg-0 + + return 0; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_depends.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_depends.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_depends.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_depends.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_depends.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,105 @@ +/* pkg_depends.h - the itsy package management system + @@ -10864,9 +10609,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_depends.h busybox-1.1.2+ipkg-0 +int pkg_dependence_satisfied(ipkg_conf_t *conf, depend_t *depend); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,92 @@ +/* pkg_dest.c - the itsy package management system + @@ -10960,9 +10705,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest.c busybox-1.1.2+ipkg-0.99 + + dest->root_dir = NULL; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,38 @@ +/* pkg_dest.h - the itsy package management system + @@ -11002,9 +10747,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest.h busybox-1.1.2+ipkg-0.99 + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest_list.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest_list.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest_list.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest_list.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,85 @@ +/* pkg_dest_list.c - the itsy package management system + @@ -11091,9 +10836,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.c busybox-1.1.2+ipkg +{ + return (pkg_dest_list_elt_t *) void_list_pop((void_list_t *) list); +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest_list.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_dest_list.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest_list.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_dest_list.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,50 @@ +/* pkg_dest_list.h - the itsy package management system + @@ -11145,9 +10890,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_dest_list.h busybox-1.1.2+ipkg + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_extract.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_extract.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_extract.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_extract.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_extract.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,224 @@ +/* pkg_extract.c - the itsy package management system + @@ -11191,7 +10936,7 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.c busybox-1.1.2+ipkg-0 + archive = init_handle(); + archive->src_fd = bb_xopen(pkg->local_filename, O_RDONLY); + archive->filter = filter_accept_list; -+ archive->accept = llist_add_to(NULL, (char *)filename); ++ llist_add_to(&(archive->accept), (char *)filename); + archive->buffer = path; + archive->action_data = data_extract_all_prefix; + archive->flags |= ARCHIVE_EXTRACT_UNCONDITIONAL; @@ -11228,7 +10973,7 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.c busybox-1.1.2+ipkg-0 + archive = init_handle(); + archive->src_fd = bb_xopen(name, O_RDONLY); + archive->filter = filter_accept_list; -+ archive->accept = llist_add_to(NULL, "./" IPKG_CONTROL_FILE); ++ llist_add_to(&(archive->accept), "./" IPKG_CONTROL_FILE); + archive->action_data = data_extract_to_buffer; + while( get_header_tar_gz(archive) == EXIT_SUCCESS ); + close(archive->src_fd); @@ -11373,9 +11118,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.c busybox-1.1.2+ipkg-0 + + return 0; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_extract.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_extract.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_extract.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_extract.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_extract.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,32 @@ +/* pkg_extract.c - the itsy package management system + @@ -11409,9 +11154,245 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_extract.h busybox-1.1.2+ipkg-0 +int pkg_extract_data_file_names_to_stream(pkg_t *pkg, FILE *file); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_hash.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.c 2006-05-09 02:12:05.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg.h +--- busybox-1.2.0-orig/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg.h 2006-07-22 16:31:25.000000000 +0200 +@@ -0,0 +1,232 @@ ++/* pkg.h - the itsy package management system ++ ++ Carl D. Worth ++ ++ Copyright (C) 2001 University of Southern California ++ ++ 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. ++*/ ++ ++#ifndef PKG_H ++#define PKG_H ++ ++#include ++#include ++#include ++ ++#include "pkg_vec.h" ++#include "str_list.h" ++#include "pkg_src.h" ++#include "pkg_dest.h" ++#include "ipkg_conf.h" ++#include "conffile_list.h" ++ ++struct ipkg_conf; ++ ++ ++#define ARRAY_SIZE(array) sizeof(array) / sizeof((array)[0]) ++ ++/* I think "Size" is currently the shortest field name */ ++#define PKG_MINIMUM_FIELD_NAME_LEN 4 ++ ++enum pkg_state_want ++{ ++ SW_UNKNOWN = 1, ++ SW_INSTALL, ++ SW_DEINSTALL, ++ SW_PURGE, ++ SW_LAST_STATE_WANT ++}; ++typedef enum pkg_state_want pkg_state_want_t; ++ ++enum pkg_state_flag ++{ ++ SF_OK = 0, ++ SF_REINSTREQ = 1, ++ SF_HOLD = 2, /* do not upgrade version */ ++ SF_REPLACE = 4, /* replace this package */ ++ SF_NOPRUNE = 8, /* do not remove obsolete files */ ++ SF_PREFER = 16, /* prefer this version */ ++ SF_OBSOLETE = 32, /* old package in upgrade pair */ ++ SF_MARKED = 64, /* temporary mark */ ++ SF_FILELIST_CHANGED = 128, /* needs filelist written */ ++ SF_USER = 256, ++ SF_LAST_STATE_FLAG ++}; ++typedef enum pkg_state_flag pkg_state_flag_t; ++#define SF_NONVOLATILE_FLAGS (SF_HOLD|SF_NOPRUNE|SF_PREFER|SF_OBSOLETE|SF_USER) ++ ++enum pkg_state_status ++{ ++ SS_NOT_INSTALLED = 1, ++ SS_UNPACKED, ++ SS_HALF_CONFIGURED, ++ SS_INSTALLED, ++ SS_HALF_INSTALLED, ++ SS_CONFIG_FILES, ++ SS_POST_INST_FAILED, ++ SS_REMOVAL_FAILED, ++ SS_LAST_STATE_STATUS ++}; ++typedef enum pkg_state_status pkg_state_status_t; ++ ++struct abstract_pkg{ ++ char * name; ++ int dependencies_checked; ++ pkg_vec_t * pkgs; ++ pkg_state_status_t state_status; ++ pkg_state_flag_t state_flag; ++ struct abstract_pkg ** depended_upon_by; /* @@@@ this should be abstract_pkg_vec_t -Jamey */ ++ abstract_pkg_vec_t * provided_by; ++ abstract_pkg_vec_t * replaced_by; ++}; ++ ++#include "pkg_depends.h" ++ ++/* XXX: CLEANUP: I'd like to clean up pkg_t in several ways: ++ ++ The 3 version fields should go into a single version struct. (This ++ is especially important since, currently, pkg->version can easily ++ be mistaken for pkg_verson_str_alloc(pkg) although they are very ++ distinct. This has been the source of multiple bugs. ++ ++ The 3 state fields could possibly also go into their own struct. ++ ++ All fields which deal with lists of packages, (Depends, ++ Pre-Depends, Provides, Suggests, Recommends, Enhances), should each ++ be handled by a single struct in pkg_t ++ ++ All string fields for which there is a small set of possible ++ values, (section, maintainer, architecture, maybe version?), that ++ are reused among different packages -- for all such packages we ++ should move from "char *"s to some atom datatype to share data ++ storage and use less memory. We might even do reference counting, ++ but probably not since most often we only create new pkg_t structs, ++ we don't often free them. */ ++struct pkg ++{ ++ char *name; ++ unsigned long epoch; ++ char *version; ++ char *revision; ++ char *familiar_revision; ++ pkg_src_t *src; ++ pkg_dest_t *dest; ++ char *architecture; ++ char *section; ++ char *maintainer; ++ char *description; ++ pkg_state_want_t state_want; ++ pkg_state_flag_t state_flag; ++ pkg_state_status_t state_status; ++ char **depends_str; ++ int depends_count; ++ char **pre_depends_str; ++ int pre_depends_count; ++ char **recommends_str; ++ int recommends_count; ++ char **suggests_str; ++ int suggests_count; ++ compound_depend_t * depends; ++ ++ /* Abhaya: new conflicts */ ++ char **conflicts_str; ++ compound_depend_t * conflicts; ++ int conflicts_count; ++ ++ char **replaces_str; ++ int replaces_count; ++ abstract_pkg_t ** replaces; ++ ++ char **provides_str; ++ int provides_count; ++ abstract_pkg_t ** provides; ++ ++ abstract_pkg_t *parent; ++ ++ pkg_t *old_pkg; /* during upgrade, points from installee to previously installed */ ++ ++ char *filename; ++ char *local_filename; ++ char *url; ++ char *tmp_unpack_dir; ++ char *md5sum; ++ char *size; ++ char *installed_size; ++ char *priority; ++ char *source; ++ conffile_list_t conffiles; ++ time_t installed_time; ++ /* As pointer for lazy evaluation */ ++ str_list_t *installed_files; ++ /* XXX: CLEANUP: I'd like to perhaps come up with a better ++ mechanism to avoid the problem here, (which is that the ++ installed_files list was being freed from an inner loop while ++ still being used within an outer loop. */ ++ int installed_files_ref_cnt; ++ int essential; ++ int arch_priority; ++/* Adding this flag, to "force" ipkg to choose a "provided_by_hand" package, if there are multiple choice */ ++ int provided_by_hand; ++}; ++ ++pkg_t *pkg_new(void); ++int pkg_init(pkg_t *pkg); ++void pkg_deinit(pkg_t *pkg); ++int pkg_init_from_file(pkg_t *pkg, const char *filename); ++abstract_pkg_t *abstract_pkg_new(void); ++int abstract_pkg_init(abstract_pkg_t *ab_pkg); ++ ++/* ++ * merges fields from newpkg into oldpkg. ++ * Forcibly sets oldpkg state_status, state_want and state_flags if set_status is nonzero ++ */ ++int pkg_merge(pkg_t *oldpkg, pkg_t *newpkg, int set_status); ++ ++char *pkg_version_str_alloc(pkg_t *pkg); ++ ++int pkg_compare_versions(const pkg_t *pkg, const pkg_t *ref_pkg); ++int pkg_name_version_and_architecture_compare(void *a, void *b); ++int abstract_pkg_name_compare(void *a, void *b); ++ ++char * pkg_formatted_info(pkg_t *pkg ); ++char * pkg_formatted_field(pkg_t *pkg, const char *field ); ++ ++void set_flags_from_control(ipkg_conf_t *conf, pkg_t *pkg); ++ ++void pkg_print_info(pkg_t *pkg, FILE *file); ++void pkg_print_status(pkg_t * pkg, FILE * file); ++void pkg_print_field(pkg_t *pkg, FILE *file, const char *field); ++str_list_t *pkg_get_installed_files(pkg_t *pkg); ++int pkg_free_installed_files(pkg_t *pkg); ++int pkg_remove_installed_files_list(ipkg_conf_t *conf, pkg_t *pkg); ++conffile_t *pkg_get_conffile(pkg_t *pkg, const char *file_name); ++int pkg_run_script(struct ipkg_conf *conf, pkg_t *pkg, ++ const char *script, const char *args); ++ ++/* enum mappings */ ++char *pkg_state_want_to_str(pkg_state_want_t sw); ++pkg_state_want_t pkg_state_want_from_str(char *str); ++char *pkg_state_flag_to_str(pkg_state_flag_t sf); ++pkg_state_flag_t pkg_state_flag_from_str(char *str); ++char *pkg_state_status_to_str(pkg_state_status_t ss); ++pkg_state_status_t pkg_state_status_from_str(char *str); ++ ++int pkg_version_satisfied(pkg_t *it, pkg_t *ref, const char *op); ++ ++int pkg_arch_supported(ipkg_conf_t *conf, pkg_t *pkg); ++int pkg_info_preinstall_check(ipkg_conf_t *conf); ++int pkg_free_installed_files(pkg_t *pkg); ++ ++int pkg_write_filelist(ipkg_conf_t *conf, pkg_t *pkg); ++int pkg_write_changed_filelists(ipkg_conf_t *conf); ++ ++#endif +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_hash.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_hash.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_hash.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,617 @@ +/* ipkg_hash.c - the itsy package management system + @@ -12030,9 +12011,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_hash.c busybox-1.1.2+ipkg-0.99 +} + + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_hash.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_hash.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_hash.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_hash.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_hash.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,61 @@ +/* pkg_hash.h - the itsy package management system + @@ -12095,9 +12076,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_hash.h busybox-1.1.2+ipkg-0.99 + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_parse.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_parse.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_parse.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_parse.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_parse.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_parse.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,366 @@ +/* pkg_parse.c - the itsy package management system + @@ -12465,9 +12446,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_parse.c busybox-1.1.2+ipkg-0.9 + + return 0; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_parse.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_parse.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_parse.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_parse.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_parse.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_parse.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,31 @@ +/* pkg_parse.h - the itsy package management system + @@ -12500,9 +12481,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_parse.h busybox-1.1.2+ipkg-0.9 +int pkg_valorize_other_field(pkg_t *pkg, char ***raw); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,43 @@ +/* pkg_src.c - the itsy package management system + @@ -12547,9 +12528,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src.c busybox-1.1.2+ipkg-0.99. +} + + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,34 @@ +/* pkg_src.h - the itsy package management system + @@ -12585,9 +12566,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src.h busybox-1.1.2+ipkg-0.99. +void pkg_src_deinit(pkg_src_t *src); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src_list.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src_list.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src_list.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src_list.c 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,75 @@ +/* pkg_src_list.c - the itsy package management system + @@ -12664,9 +12645,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src_list.c busybox-1.1.2+ipkg- +{ + return (pkg_src_list_elt_t *) void_list_pop((void_list_t *) list); +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src_list.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_src_list.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_src_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src_list.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_src_list.h 2006-07-22 16:31:25.000000000 +0200 @@ -0,0 +1,57 @@ +/* pkg_src_list.h - the itsy package management system + @@ -12725,9 +12706,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_src_list.h busybox-1.1.2+ipkg- + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_vec.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.c ---- busybox-1.1.2-orig/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.c 2006-05-09 02:12:05.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_vec.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_vec.c +--- busybox-1.2.0-orig/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_vec.c 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,230 @@ +/* pkg_vec.c - the itsy package management system + @@ -12959,9 +12940,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_vec.c busybox-1.1.2+ipkg-0.99. + qsort(vec->pkgs, vec->len, sizeof(pkg_t *), (compare_fcn_t)compar); +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_vec.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.h ---- busybox-1.1.2-orig/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/pkg_vec.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/pkg_vec.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_vec.h +--- busybox-1.2.0-orig/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/pkg_vec.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,62 @@ +/* pkg_vec.h - the itsy package management system + @@ -13025,9 +13006,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/pkg_vec.h busybox-1.1.2+ipkg-0.99. +void abstract_pkg_vec_sort(pkg_vec_t *vec, int (*compar)(abstract_pkg_t *, abstract_pkg_t *)); +#endif + -diff -ruN busybox-1.1.2-orig/archival/libipkg/sprintf_alloc.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/sprintf_alloc.h ---- busybox-1.1.2-orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/sprintf_alloc.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/sprintf_alloc.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/sprintf_alloc.h +--- busybox-1.2.0-orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/sprintf_alloc.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,25 @@ +/* sprintf_alloca.c -- like sprintf with memory allocation + @@ -13054,9 +13035,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/sprintf_alloc.h busybox-1.1.2+ipkg +#define sprintf_alloc(str, fmt, args...) *str = bb_xasprintf(fmt, ## args) + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/str_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_list.c ---- busybox-1.1.2-orig/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_list.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/str_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_list.c +--- busybox-1.2.0-orig/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_list.c 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,76 @@ +/* str_list.c - the itsy package management system + @@ -13134,9 +13115,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/str_list.c busybox-1.1.2+ipkg-0.99 + (void *)target_str, + (void_list_cmp_t)strcmp); +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/str_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_list.h ---- busybox-1.1.2-orig/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_list.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/str_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_list.h +--- busybox-1.2.0-orig/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_list.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,51 @@ +/* str_list.h - the itsy package management system + @@ -13189,9 +13170,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/str_list.h busybox-1.1.2+ipkg-0.99 +char *str_list_remove_elt(str_list_t *list, const char *target_str); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/str_util.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_util.c ---- busybox-1.1.2-orig/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_util.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/str_util.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_util.c +--- busybox-1.2.0-orig/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_util.c 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,73 @@ +/* str_utils.c - the itsy package management system + @@ -13266,9 +13247,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/str_util.c busybox-1.1.2+ipkg-0.99 + return str ? strdup(str) : NULL; +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/str_util.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_util.h ---- busybox-1.1.2-orig/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/str_util.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/str_util.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_util.h +--- busybox-1.2.0-orig/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/str_util.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,28 @@ +/* str_utils.h - the itsy package management system + @@ -13298,9 +13279,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/str_util.h busybox-1.1.2+ipkg-0.99 +char *str_dup_safe(const char *str); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/user.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/user.c ---- busybox-1.1.2-orig/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/user.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/user.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/user.c +--- busybox-1.2.0-orig/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/user.c 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,58 @@ +/* user.c - the itsy package management system + @@ -13360,9 +13341,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/user.c busybox-1.1.2+ipkg-0.99.162 + + return response; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/user.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/user.h ---- busybox-1.1.2-orig/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/user.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/user.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/user.h +--- busybox-1.2.0-orig/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/user.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,23 @@ +/* user.c - the itsy package management system + @@ -13387,9 +13368,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/user.h busybox-1.1.2+ipkg-0.99.162 + +char *get_user_response(const char *format, ...); + -diff -ruN busybox-1.1.2-orig/archival/libipkg/void_list.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/void_list.c ---- busybox-1.1.2-orig/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/void_list.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/void_list.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/void_list.c +--- busybox-1.2.0-orig/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/void_list.c 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,194 @@ +/* void_list.c - the itsy package management system + @@ -13585,9 +13566,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/void_list.c busybox-1.1.2+ipkg-0.9 + else + return NULL; +} -diff -ruN busybox-1.1.2-orig/archival/libipkg/void_list.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/void_list.h ---- busybox-1.1.2-orig/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/void_list.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/void_list.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/void_list.h +--- busybox-1.2.0-orig/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/void_list.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,59 @@ +/* void_list.h - the itsy package management system + @@ -13648,9 +13629,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/void_list.h busybox-1.1.2+ipkg-0.9 +void *void_list_remove_elt(void_list_t *list, const void *target_data, void_list_cmp_t cmp); + +#endif -diff -ruN busybox-1.1.2-orig/archival/libipkg/xsystem.c busybox-1.1.2+ipkg-0.99.162/archival/libipkg/xsystem.c ---- busybox-1.1.2-orig/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/xsystem.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/xsystem.c busybox-1.2.0+ipkg-0.99.162/archival/libipkg/xsystem.c +--- busybox-1.2.0-orig/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/xsystem.c 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,64 @@ +/* xsystem.c - system(3) with error messages + @@ -13716,9 +13697,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/xsystem.c busybox-1.1.2+ipkg-0.99. + return -1; +} + -diff -ruN busybox-1.1.2-orig/archival/libipkg/xsystem.h busybox-1.1.2+ipkg-0.99.162/archival/libipkg/xsystem.h ---- busybox-1.1.2-orig/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libipkg/xsystem.h 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libipkg/xsystem.h busybox-1.2.0+ipkg-0.99.162/archival/libipkg/xsystem.h +--- busybox-1.2.0-orig/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libipkg/xsystem.h 2006-07-22 16:31:26.000000000 +0200 @@ -0,0 +1,34 @@ +/* xsystem.h - system(3) with error messages + @@ -13754,20 +13735,9 @@ diff -ruN busybox-1.1.2-orig/archival/libipkg/xsystem.h busybox-1.1.2+ipkg-0.99. + +#endif + -diff -ruN busybox-1.1.2-orig/archival/libunarchive/Makefile.in busybox-1.1.2+ipkg-0.99.162/archival/libunarchive/Makefile.in ---- busybox-1.1.2-orig/archival/libunarchive/Makefile.in 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libunarchive/Makefile.in 2006-05-09 02:06:48.000000000 +0200 -@@ -58,6 +58,7 @@ - LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o - LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES) - LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o -+LIBUNARCHIVE-$(CONFIG_IPKG) += $(GUNZIP_FILES) get_header_tar.o get_header_tar_gz.o - LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o - LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o - LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o -diff -ruN busybox-1.1.2-orig/archival/libunarchive/data_extract_all.c busybox-1.1.2+ipkg-0.99.162/archival/libunarchive/data_extract_all.c ---- busybox-1.1.2-orig/archival/libunarchive/data_extract_all.c 2006-03-22 22:16:20.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/archival/libunarchive/data_extract_all.c 2006-05-09 02:06:48.000000000 +0200 +diff -ruN busybox-1.2.0-orig/archival/libunarchive/data_extract_all.c busybox-1.2.0+ipkg-0.99.162/archival/libunarchive/data_extract_all.c +--- busybox-1.2.0-orig/archival/libunarchive/data_extract_all.c 2006-07-01 00:42:04.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libunarchive/data_extract_all.c 2006-07-22 16:31:26.000000000 +0200 @@ -126,3 +126,17 @@ utime(file_header->name, &t); } @@ -13786,21 +13756,43 @@ diff -ruN busybox-1.1.2-orig/archival/libunarchive/data_extract_all.c busybox-1. + } +} + -diff -ruN busybox-1.1.2-orig/include/applets.h busybox-1.1.2+ipkg-0.99.162/include/applets.h ---- busybox-1.1.2-orig/include/applets.h 2006-03-22 22:16:24.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/include/applets.h 2006-05-09 02:06:48.000000000 +0200 -@@ -149,6 +149,7 @@ - USE_IPCALC(APPLET(ipcalc, ipcalc_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_IPCRM(APPLET(ipcrm, ipcrm_main, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) - USE_IPCS(APPLET(ipcs, ipcs_main, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) -+USE_IPKG(APPLET(ipkg, ipkg_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) - USE_IPLINK(APPLET(iplink, iplink_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_IPROUTE(APPLET(iproute, iproute_main, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_IPTUNNEL(APPLET(iptunnel, iptunnel_main, _BB_DIR_BIN, _BB_SUID_NEVER)) -diff -ruN busybox-1.1.2-orig/include/unarchive.h busybox-1.1.2+ipkg-0.99.162/include/unarchive.h ---- busybox-1.1.2-orig/include/unarchive.h 2006-03-22 22:16:24.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/include/unarchive.h 2006-05-09 02:06:48.000000000 +0200 -@@ -74,6 +74,7 @@ +diff -ruN busybox-1.2.0-orig/archival/libunarchive/Makefile.in busybox-1.2.0+ipkg-0.99.162/archival/libunarchive/Makefile.in +--- busybox-1.2.0-orig/archival/libunarchive/Makefile.in 2006-07-01 00:42:03.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/archival/libunarchive/Makefile.in 2006-07-22 16:31:26.000000000 +0200 +@@ -58,6 +58,7 @@ + LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o + LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES) + LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o ++LIBUNARCHIVE-$(CONFIG_IPKG) += $(GUNZIP_FILES) get_header_tar.o get_header_tar_gz.o + LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o + LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o + LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o +diff -ruN busybox-1.2.0-orig/archival/Makefile.in busybox-1.2.0+ipkg-0.99.162/archival/Makefile.in +--- busybox-1.2.0-orig/archival/Makefile.in 2006-07-01 00:42:04.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/archival/Makefile.in 2006-07-22 16:31:25.000000000 +0200 +@@ -20,6 +20,7 @@ + ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o + ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o + ARCHIVAL-$(CONFIG_GZIP) += gzip.o ++ARCHIVAL-$(CONFIG_IPKG) += ipkg.o + ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o + ARCHIVAL-$(CONFIG_RPM) += rpm.o + ARCHIVAL-$(CONFIG_TAR) += tar.o +diff -ruN busybox-1.2.0-orig/include/applets.h busybox-1.2.0+ipkg-0.99.162/include/applets.h +--- busybox-1.2.0-orig/include/applets.h 2006-07-01 00:42:10.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/include/applets.h 2006-07-22 16:35:35.000000000 +0200 +@@ -152,6 +152,7 @@ + USE_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) + USE_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) ++USE_IPKG(APPLET(ipkg, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_IPTUNNEL(APPLET(iptunnel, _BB_DIR_BIN, _BB_SUID_NEVER)) +diff -ruN busybox-1.2.0-orig/include/unarchive.h busybox-1.2.0+ipkg-0.99.162/include/unarchive.h +--- busybox-1.2.0-orig/include/unarchive.h 2006-07-01 00:42:10.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/include/unarchive.h 2006-07-22 16:31:26.000000000 +0200 +@@ -77,6 +77,7 @@ extern void data_skip(archive_handle_t *archive_handle); extern void data_extract_all(archive_handle_t *archive_handle); @@ -13808,10 +13800,10 @@ diff -ruN busybox-1.1.2-orig/include/unarchive.h busybox-1.1.2+ipkg-0.99.162/inc extern void data_extract_to_stdout(archive_handle_t *archive_handle); extern void data_extract_to_buffer(archive_handle_t *archive_handle); -diff -ruN busybox-1.1.2-orig/include/usage.h busybox-1.1.2+ipkg-0.99.162/include/usage.h ---- busybox-1.1.2-orig/include/usage.h 2006-03-22 22:16:24.000000000 +0100 -+++ busybox-1.1.2+ipkg-0.99.162/include/usage.h 2006-05-09 02:06:48.000000000 +0200 -@@ -1013,6 +1013,82 @@ +diff -ruN busybox-1.2.0-orig/include/usage.h busybox-1.2.0+ipkg-0.99.162/include/usage.h +--- busybox-1.2.0-orig/include/usage.h 2006-07-01 00:42:10.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/include/usage.h 2006-07-22 16:31:26.000000000 +0200 +@@ -982,6 +982,82 @@ "$ ls -la /tmp/busybox*\n" \ "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n" @@ -13894,3 +13886,15 @@ diff -ruN busybox-1.1.2-orig/include/usage.h busybox-1.1.2+ipkg-0.99.162/include #define halt_trivial_usage \ "[-d] [-n] [-f]" #define halt_full_usage \ +diff -ruN busybox-1.2.0-orig/Makefile busybox-1.2.0+ipkg-0.99.162/Makefile +--- busybox-1.2.0-orig/Makefile 2006-07-01 00:42:13.000000000 +0200 ++++ busybox-1.2.0+ipkg-0.99.162/Makefile 2006-07-22 16:31:25.000000000 +0200 +@@ -31,7 +31,7 @@ + export srctree=$(top_srcdir) + vpath %/Config.in $(srctree) + +-DIRS:=applets archival archival/libunarchive coreutils console-tools \ ++DIRS:=applets archival archival/libipkg archival/libunarchive coreutils console-tools \ + debianutils editors findutils init miscutils modutils networking \ + networking/libiproute networking/udhcp procps loginutils shell \ + sysklogd util-linux e2fsprogs libpwdgrp coreutils/libcoreutils libbb diff --git a/package/busybox/patches/912-ipkg-no_warnings.patch b/package/busybox/patches/912-ipkg-no_warnings.patch index 74133b0769..b5ba7705fb 100644 --- a/package/busybox/patches/912-ipkg-no_warnings.patch +++ b/package/busybox/patches/912-ipkg-no_warnings.patch @@ -1,3 +1,7 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. # # remove (numerous) compile warnings # diff --git a/package/busybox/patches/913-libbb_hash.patch b/package/busybox/patches/913-libbb_hash.patch index 3a6a2ba1d1..a7c2291caa 100644 --- a/package/busybox/patches/913-libbb_hash.patch +++ b/package/busybox/patches/913-libbb_hash.patch @@ -1,10 +1,14 @@ +# Copyright (C) 2006 OpenWrt.org # -# expose (again) an hash_fd function (used 911-ipkg.patch) +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. # -diff -ruN busybox-1.1.1-old/coreutils/md5_sha1_sum.c busybox-1.1.1-new/coreutils/md5_sha1_sum.c ---- busybox-1.1.1-old/coreutils/md5_sha1_sum.c 2006-03-30 00:14:50.000000000 +0200 -+++ busybox-1.1.1-new/coreutils/md5_sha1_sum.c 2006-03-29 23:46:51.000000000 +0200 -@@ -15,80 +15,10 @@ +# expose (again) an hash_fd function (used in 911-ipkg.patch) +# +diff -ruN busybox-1.2.0-orig/coreutils/md5_sha1_sum.c busybox-1.2.0-libbb_hash/coreutils/md5_sha1_sum.c +--- busybox-1.2.0-orig/coreutils/md5_sha1_sum.c 2006-07-01 00:42:07.000000000 +0200 ++++ busybox-1.2.0-libbb_hash/coreutils/md5_sha1_sum.c 2006-07-22 17:08:02.000000000 +0200 +@@ -16,79 +16,10 @@ #include "busybox.h" @@ -40,81 +44,76 @@ diff -ruN busybox-1.1.1-old/coreutils/md5_sha1_sum.c busybox-1.1.1-new/coreutils - RESERVE_CONFIG_UBUFFER(in_buf, 4096); - void (*update)(const void*, size_t, void*); - void (*final)(void*, void*); -- -- if(strcmp(filename, "-") == 0) { +- +- if (strcmp(filename, "-") == 0) { - src_fd = STDIN_FILENO; - } else if(0 > (src_fd = open(filename, O_RDONLY))) { - bb_perror_msg("%s", filename); - return NULL; - } - -- // figure specific hash algorithims -- if(ENABLE_MD5SUM && hash_algo==HASH_MD5) { +- /* figure specific hash algorithims */ +- if (ENABLE_MD5SUM && hash_algo==HASH_MD5) { - md5_begin(&context.md5); - update = (void (*)(const void*, size_t, void*))md5_hash; - final = (void (*)(void*, void*))md5_end; - hash_len = 16; -- } else if(ENABLE_SHA1SUM && hash_algo==HASH_SHA1) { +- } else if (ENABLE_SHA1SUM && hash_algo==HASH_SHA1) { - sha1_begin(&context.sha1); - update = (void (*)(const void*, size_t, void*))sha1_hash; - final = (void (*)(void*, void*))sha1_end; - hash_len = 20; - } else { -- bb_error_msg_and_die("algotithm not supported"); +- bb_error_msg_and_die("algorithm not supported"); - } -- - -- while(0 < (count = read(src_fd, in_buf, sizeof in_buf))) { +- while (0 < (count = read(src_fd, in_buf, 4096))) { - update(in_buf, count, &context); - } - -- if(count == 0) { +- if (count == 0) { - final(in_buf, &context); - hash_value = hash_bin_to_hex(in_buf, hash_len); - } -- +- - RELEASE_CONFIG_BUFFER(in_buf); -- -- if(src_fd != STDIN_FILENO) { +- +- if (src_fd != STDIN_FILENO) { - close(src_fd); - } -- +- - return hash_value; -} - /* This could become a common function for md5 as well, by using md5_stream */ static int hash_files(int argc, char **argv, hash_algo_t hash_algo) { -diff -ruN busybox-1.1.1-old/include/libbb.h busybox-1.1.1-new/include/libbb.h ---- busybox-1.1.1-old/include/libbb.h 2006-03-30 00:14:50.000000000 +0200 -+++ busybox-1.1.1-new/include/libbb.h 2006-03-30 00:31:48.000000000 +0200 -@@ -490,6 +490,12 @@ - void md5_hash(const void *data, size_t length, md5_ctx_t *ctx); - void *md5_end(void *resbuf, md5_ctx_t *ctx); +diff -ruN busybox-1.2.0-orig/include/libbb.h busybox-1.2.0-libbb_hash/include/libbb.h +--- busybox-1.2.0-orig/include/libbb.h 2006-07-01 00:42:10.000000000 +0200 ++++ busybox-1.2.0-libbb_hash/include/libbb.h 2006-07-22 17:01:06.000000000 +0200 +@@ -518,6 +518,8 @@ + extern int get_terminal_width_height(int fd, int *width, int *height); + extern unsigned long get_ug_id(const char *s, long (*__bb_getxxnam)(const char *)); +typedef enum { HASH_SHA1, HASH_MD5 } hash_algo_t; + + typedef struct _sha1_ctx_t_ { + uint32_t count[2]; + uint32_t hash[5]; +@@ -542,6 +544,10 @@ + void md5_hash(const void *data, size_t length, md5_ctx_t *ctx); + void *md5_end(void *resbuf, md5_ctx_t *ctx); + +unsigned char *hash_bin_to_hex(unsigned char *hash_value, unsigned char hash_length); +int hash_fd(int fd, hash_algo_t hash_algo, uint8_t *hash_value); +uint8_t *hash_file(const char *filename, hash_algo_t hash_algo); + - /* busybox.h will include dmalloc later for us, else include it here. */ - #if !defined _BB_INTERNAL_H_ && defined DMALLOC - #include -diff -ruN busybox-1.1.1-old/libbb/Makefile.in busybox-1.1.1-new/libbb/Makefile.in ---- busybox-1.1.1-old/libbb/Makefile.in 2006-03-30 00:14:50.000000000 +0200 -+++ busybox-1.1.1-new/libbb/Makefile.in 2006-03-29 23:46:51.000000000 +0200 -@@ -11,6 +11,7 @@ + extern uint32_t *bb_crc32_filltable (int endian); - LIBBB-n:= - LIBBB-y:= \ -+ hash.c \ - bb_asprintf.c ask_confirmation.c change_identity.c chomp.c \ - compare_string_array.c concat_path_file.c copy_file.c copyfd.c \ - create_icmp_socket.c create_icmp6_socket.c \ -diff -ruN busybox-1.1.1-old/libbb/hash.c busybox-1.1.1-new/libbb/hash.c ---- busybox-1.1.1-old/libbb/hash.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox-1.1.1-new/libbb/hash.c 2006-03-30 00:35:54.000000000 +0200 + #ifndef RB_POWER_OFF +diff -ruN busybox-1.2.0-orig/libbb/hash.c busybox-1.2.0-libbb_hash/libbb/hash.c +--- busybox-1.2.0-orig/libbb/hash.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.2.0-libbb_hash/libbb/hash.c 2006-07-22 17:07:34.000000000 +0200 @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2003 Glenn L. McGrath @@ -158,23 +157,23 @@ diff -ruN busybox-1.1.1-old/libbb/hash.c busybox-1.1.1-new/libbb/hash.c + void (*final)(void*, void*) = NULL; + + // figure specific hash algorithims -+ if(hash_algo==HASH_MD5) { ++ if (hash_algo==HASH_MD5) { + md5_begin(&context.md5); + update = (void (*)(const void*, size_t, void*))md5_hash; + final = (void (*)(void*, void*))md5_end; -+ } else if(hash_algo==HASH_SHA1) { ++ } else if (hash_algo==HASH_SHA1) { + sha1_begin(&context.sha1); + update = (void (*)(const void*, size_t, void*))sha1_hash; + final = (void (*)(void*, void*))sha1_end; + } + + -+ while(0 < (count = read(fd, in_buf, sizeof in_buf))) { ++ while (0 < (count = read(fd, in_buf, sizeof in_buf))) { + update(in_buf, count, &context); + result += count; + } + -+ if(count == 0) { ++ if (count == 0) { + final(hash_value, &context); + } + @@ -189,26 +188,26 @@ diff -ruN busybox-1.1.1-old/libbb/hash.c busybox-1.1.1-new/libbb/hash.c + RESERVE_CONFIG_UBUFFER(hash_buf, 20); + uint8_t *hash_value = NULL; + -+ if(ENABLE_MD5SUM && hash_algo==HASH_MD5) { ++ if (ENABLE_MD5SUM && hash_algo==HASH_MD5) { + hash_len = 16; -+ } else if(ENABLE_SHA1SUM && hash_algo==HASH_SHA1) { ++ } else if (ENABLE_SHA1SUM && hash_algo==HASH_SHA1) { + hash_len = 20; + } else { + bb_error_msg_and_die("algotithm not supported"); + } + -+ if(strcmp(filename, "-") == 0) { ++ if (strcmp(filename, "-") == 0) { + src_fd = STDIN_FILENO; -+ } else if(0 > (src_fd = open(filename, O_RDONLY))) { ++ } else if (0 > (src_fd = open(filename, O_RDONLY))) { + bb_perror_msg("%s", filename); + return NULL; + } + -+ if(hash_fd(src_fd, hash_algo, hash_buf) > 0) { ++ if (hash_fd(src_fd, hash_algo, hash_buf) > 0) { + hash_value = hash_bin_to_hex(hash_buf, hash_len); + } + -+ if(src_fd != STDIN_FILENO) { ++ if (src_fd != STDIN_FILENO) { + close(src_fd); + } + @@ -216,3 +215,14 @@ diff -ruN busybox-1.1.1-old/libbb/hash.c busybox-1.1.1-new/libbb/hash.c + + return hash_value; +} +diff -ruN busybox-1.2.0-orig/libbb/Makefile.in busybox-1.2.0-libbb_hash/libbb/Makefile.in +--- busybox-1.2.0-orig/libbb/Makefile.in 2006-07-01 00:42:08.000000000 +0200 ++++ busybox-1.2.0-libbb_hash/libbb/Makefile.in 2006-07-22 16:51:47.000000000 +0200 +@@ -11,6 +11,7 @@ + + LIBBB-n:= + LIBBB-y:= \ ++ hash.c \ + bb_asprintf.c ask_confirmation.c change_identity.c chomp.c \ + compare_string_array.c concat_path_file.c copy_file.c copyfd.c \ + crc32.c create_icmp_socket.c create_icmp6_socket.c \ diff --git a/package/busybox/patches/914-ipkg-fixes.patch b/package/busybox/patches/914-ipkg-fixes.patch index 55cd9040c6..72375bc5b7 100644 --- a/package/busybox/patches/914-ipkg-fixes.patch +++ b/package/busybox/patches/914-ipkg-fixes.patch @@ -1,3 +1,7 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. # # fix ipkg bugs # -- cgit v1.2.3