+++ /dev/null
---blank-lines-after-declarations
---blank-lines-after-procedures
---break-before-boolean-operator
---no-blank-lines-after-commas
---braces-on-if-line
---braces-on-struct-decl-line
---comment-indentation25
---declaration-comment-column25
---no-comment-delimiters-on-blank-lines
---cuddle-else
---continuation-indentation4
---case-indentation0
---else-endif-column33
---space-after-cast
---line-comments-indentation0
---declaration-indentation1
---dont-format-first-column-comments
---dont-format-comments
---honour-newlines
---indent-level4
-/* changed from 0 to 4 */
---parameter-indentation4
---line-length78 /* changed from 75 */
---continue-at-parentheses
---no-space-after-function-call-names
---dont-break-procedure-type
---dont-star-comments
---leave-optional-blank-lines
---dont-space-special-semicolon
---tab-size4
-/* additions by Mark */
---case-brace-indentation0
---leave-preprocessor-space
+++ /dev/null
-#
-# Automatically generated make config: don't edit
-# Busybox version: 1.10.0.svn
-# Thu Mar 20 14:54:21 2008
-#
-CONFIG_HAVE_DOT_CONFIG=y
-
-#
-# Busybox Settings
-#
-
-#
-# General Configuration
-#
-CONFIG_NITPICK=y
-CONFIG_DESKTOP=y
-CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
-# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
-# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
-CONFIG_SHOW_USAGE=y
-CONFIG_FEATURE_VERBOSE_USAGE=y
-CONFIG_FEATURE_COMPRESS_USAGE=y
-CONFIG_FEATURE_INSTALLER=y
-# CONFIG_LOCALE_SUPPORT is not set
-CONFIG_GETOPT_LONG=y
-CONFIG_FEATURE_DEVPTS=y
-# CONFIG_FEATURE_CLEAN_UP is not set
-CONFIG_FEATURE_PIDFILE=y
-CONFIG_FEATURE_SUID=y
-CONFIG_FEATURE_SUID_CONFIG=y
-CONFIG_FEATURE_SUID_CONFIG_QUIET=y
-CONFIG_SELINUX=y
-CONFIG_FEATURE_PREFER_APPLETS=y
-CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
-CONFIG_FEATURE_SYSLOG=y
-CONFIG_FEATURE_HAVE_RPC=y
-
-#
-# Build Options
-#
-# CONFIG_STATIC is not set
-CONFIG_NOMMU=y
-# CONFIG_BUILD_LIBBUSYBOX is not set
-# CONFIG_FEATURE_INDIVIDUAL is not set
-# CONFIG_FEATURE_SHARED_BUSYBOX is not set
-CONFIG_LFS=y
-
-#
-# Debugging Options
-#
-# CONFIG_DEBUG is not set
-# CONFIG_WERROR is not set
-CONFIG_NO_DEBUG_LIB=y
-# CONFIG_DMALLOC is not set
-# CONFIG_EFENCE is not set
-CONFIG_INCLUDE_SUSv2=y
-
-#
-# Installation Options
-#
-# CONFIG_INSTALL_NO_USR is not set
-CONFIG_INSTALL_APPLET_SYMLINKS=y
-# CONFIG_INSTALL_APPLET_HARDLINKS is not set
-# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
-# CONFIG_INSTALL_APPLET_DONT is not set
-# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
-# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
-# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
-CONFIG_PREFIX="./_install"
-
-#
-# Busybox Library Tuning
-#
-CONFIG_PASSWORD_MINLEN=6
-CONFIG_MD5_SIZE_VS_SPEED=2
-CONFIG_FEATURE_FAST_TOP=y
-CONFIG_FEATURE_ETC_NETWORKS=y
-CONFIG_FEATURE_EDITING=y
-CONFIG_FEATURE_EDITING_MAX_LEN=1024
-CONFIG_FEATURE_EDITING_VI=y
-CONFIG_FEATURE_EDITING_HISTORY=15
-# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set
-CONFIG_FEATURE_TAB_COMPLETION=y
-CONFIG_FEATURE_USERNAME_COMPLETION=y
-CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
-CONFIG_FEATURE_VERBOSE_CP_MESSAGE=y
-CONFIG_FEATURE_COPYBUF_KB=4
-CONFIG_MONOTONIC_SYSCALL=y
-CONFIG_IOCTL_HEX2STR_ERROR=y
-
-#
-# Applets
-#
-
-#
-# Archival Utilities
-#
-CONFIG_AR=y
-CONFIG_FEATURE_AR_LONG_FILENAMES=y
-CONFIG_BUNZIP2=y
-CONFIG_BZIP2=y
-CONFIG_CPIO=y
-CONFIG_DPKG=y
-CONFIG_DPKG_DEB=y
-CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY=y
-CONFIG_GUNZIP=y
-CONFIG_FEATURE_GUNZIP_UNCOMPRESS=y
-CONFIG_GZIP=y
-CONFIG_RPM2CPIO=y
-CONFIG_RPM=y
-CONFIG_FEATURE_RPM_BZ2=y
-CONFIG_TAR=y
-CONFIG_FEATURE_TAR_CREATE=y
-CONFIG_FEATURE_TAR_GZIP=y
-CONFIG_FEATURE_TAR_BZIP2=y
-CONFIG_FEATURE_TAR_LZMA=y
-CONFIG_FEATURE_TAR_COMPRESS=y
-CONFIG_FEATURE_TAR_AUTODETECT=y
-CONFIG_FEATURE_TAR_FROM=y
-CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
-CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y
-CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
-CONFIG_FEATURE_TAR_LONG_OPTIONS=y
-CONFIG_FEATURE_TAR_UNAME_GNAME=y
-CONFIG_UNCOMPRESS=y
-CONFIG_UNLZMA=y
-CONFIG_FEATURE_LZMA_FAST=y
-CONFIG_UNZIP=y
-
-#
-# Common options for cpio and tar
-#
-CONFIG_FEATURE_UNARCHIVE_TAPE=y
-
-#
-# Common options for dpkg and dpkg_deb
-#
-CONFIG_FEATURE_DEB_TAR_GZ=y
-CONFIG_FEATURE_DEB_TAR_BZ2=y
-CONFIG_FEATURE_DEB_TAR_LZMA=y
-
-#
-# Coreutils
-#
-CONFIG_BASENAME=y
-CONFIG_CAL=y
-CONFIG_CAT=y
-CONFIG_CATV=y
-CONFIG_CHGRP=y
-CONFIG_CHMOD=y
-CONFIG_CHOWN=y
-CONFIG_CHROOT=y
-CONFIG_CKSUM=y
-CONFIG_COMM=y
-CONFIG_CP=y
-CONFIG_CUT=y
-CONFIG_DATE=y
-CONFIG_FEATURE_DATE_ISOFMT=y
-CONFIG_DD=y
-CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
-CONFIG_FEATURE_DD_IBS_OBS=y
-CONFIG_DF=y
-CONFIG_FEATURE_DF_INODE=y
-CONFIG_DIRNAME=y
-CONFIG_DOS2UNIX=y
-CONFIG_UNIX2DOS=y
-CONFIG_DU=y
-CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
-CONFIG_ECHO=y
-CONFIG_FEATURE_FANCY_ECHO=y
-CONFIG_ENV=y
-CONFIG_FEATURE_ENV_LONG_OPTIONS=y
-CONFIG_EXPAND=y
-CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y
-CONFIG_EXPR=y
-CONFIG_EXPR_MATH_SUPPORT_64=y
-CONFIG_FALSE=y
-CONFIG_FOLD=y
-CONFIG_HEAD=y
-CONFIG_FEATURE_FANCY_HEAD=y
-CONFIG_HOSTID=y
-CONFIG_ID=y
-CONFIG_INSTALL=y
-CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y
-CONFIG_LENGTH=y
-CONFIG_LN=y
-CONFIG_LOGNAME=y
-CONFIG_LS=y
-CONFIG_FEATURE_LS_FILETYPES=y
-CONFIG_FEATURE_LS_FOLLOWLINKS=y
-CONFIG_FEATURE_LS_RECURSIVE=y
-CONFIG_FEATURE_LS_SORTFILES=y
-CONFIG_FEATURE_LS_TIMESTAMPS=y
-CONFIG_FEATURE_LS_USERNAME=y
-CONFIG_FEATURE_LS_COLOR=y
-CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
-CONFIG_MD5SUM=y
-CONFIG_MKDIR=y
-CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
-CONFIG_MKFIFO=y
-CONFIG_MKNOD=y
-CONFIG_MV=y
-CONFIG_FEATURE_MV_LONG_OPTIONS=y
-CONFIG_NICE=y
-CONFIG_NOHUP=y
-CONFIG_OD=y
-CONFIG_PRINTENV=y
-CONFIG_PRINTF=y
-CONFIG_PWD=y
-CONFIG_READLINK=y
-CONFIG_FEATURE_READLINK_FOLLOW=y
-CONFIG_REALPATH=y
-CONFIG_RM=y
-CONFIG_RMDIR=y
-CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y
-CONFIG_SEQ=y
-CONFIG_SHA1SUM=y
-CONFIG_SLEEP=y
-CONFIG_FEATURE_FANCY_SLEEP=y
-CONFIG_SORT=y
-CONFIG_FEATURE_SORT_BIG=y
-CONFIG_SPLIT=y
-CONFIG_FEATURE_SPLIT_FANCY=y
-CONFIG_STAT=y
-CONFIG_FEATURE_STAT_FORMAT=y
-CONFIG_STTY=y
-CONFIG_SUM=y
-CONFIG_SYNC=y
-CONFIG_TAC=y
-CONFIG_TAIL=y
-CONFIG_FEATURE_FANCY_TAIL=y
-CONFIG_TEE=y
-CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
-CONFIG_TEST=y
-CONFIG_FEATURE_TEST_64=y
-CONFIG_TOUCH=y
-CONFIG_TR=y
-CONFIG_FEATURE_TR_CLASSES=y
-CONFIG_FEATURE_TR_EQUIV=y
-CONFIG_TRUE=y
-CONFIG_TTY=y
-CONFIG_UNAME=y
-CONFIG_UNEXPAND=y
-CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y
-CONFIG_UNIQ=y
-CONFIG_USLEEP=y
-CONFIG_UUDECODE=y
-CONFIG_UUENCODE=y
-CONFIG_WC=y
-CONFIG_FEATURE_WC_LARGE=y
-CONFIG_WHO=y
-CONFIG_WHOAMI=y
-CONFIG_YES=y
-
-#
-# Common options for cp and mv
-#
-CONFIG_FEATURE_PRESERVE_HARDLINKS=y
-
-#
-# Common options for ls, more and telnet
-#
-CONFIG_FEATURE_AUTOWIDTH=y
-
-#
-# Common options for df, du, ls
-#
-CONFIG_FEATURE_HUMAN_READABLE=y
-
-#
-# Common options for md5sum, sha1sum
-#
-CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
-
-#
-# Console Utilities
-#
-CONFIG_CHVT=y
-CONFIG_CLEAR=y
-CONFIG_DEALLOCVT=y
-CONFIG_DUMPKMAP=y
-CONFIG_KBD_MODE=y
-CONFIG_LOADFONT=y
-CONFIG_LOADKMAP=y
-CONFIG_OPENVT=y
-CONFIG_RESET=y
-CONFIG_RESIZE=y
-CONFIG_FEATURE_RESIZE_PRINT=y
-CONFIG_SETCONSOLE=y
-CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y
-CONFIG_SETKEYCODES=y
-CONFIG_SETLOGCONS=y
-
-#
-# Debian Utilities
-#
-CONFIG_MKTEMP=y
-CONFIG_PIPE_PROGRESS=y
-CONFIG_RUN_PARTS=y
-CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
-CONFIG_FEATURE_RUN_PARTS_FANCY=y
-CONFIG_START_STOP_DAEMON=y
-CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
-CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
-CONFIG_WHICH=y
-
-#
-# Editors
-#
-CONFIG_AWK=y
-CONFIG_FEATURE_AWK_MATH=y
-CONFIG_CMP=y
-CONFIG_DIFF=y
-CONFIG_FEATURE_DIFF_BINARY=y
-CONFIG_FEATURE_DIFF_DIR=y
-CONFIG_FEATURE_DIFF_MINIMAL=y
-CONFIG_ED=y
-CONFIG_PATCH=y
-CONFIG_SED=y
-CONFIG_VI=y
-CONFIG_FEATURE_VI_MAX_LEN=4096
-CONFIG_FEATURE_VI_8BIT=y
-CONFIG_FEATURE_VI_COLON=y
-CONFIG_FEATURE_VI_YANKMARK=y
-CONFIG_FEATURE_VI_SEARCH=y
-CONFIG_FEATURE_VI_USE_SIGNALS=y
-CONFIG_FEATURE_VI_DOT_CMD=y
-CONFIG_FEATURE_VI_READONLY=y
-CONFIG_FEATURE_VI_SETOPTS=y
-CONFIG_FEATURE_VI_SET=y
-CONFIG_FEATURE_VI_WIN_RESIZE=y
-CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
-CONFIG_FEATURE_ALLOW_EXEC=y
-
-#
-# Finding Utilities
-#
-CONFIG_FIND=y
-CONFIG_FEATURE_FIND_PRINT0=y
-CONFIG_FEATURE_FIND_MTIME=y
-CONFIG_FEATURE_FIND_MMIN=y
-CONFIG_FEATURE_FIND_PERM=y
-CONFIG_FEATURE_FIND_TYPE=y
-CONFIG_FEATURE_FIND_XDEV=y
-CONFIG_FEATURE_FIND_MAXDEPTH=y
-CONFIG_FEATURE_FIND_NEWER=y
-CONFIG_FEATURE_FIND_INUM=y
-CONFIG_FEATURE_FIND_EXEC=y
-CONFIG_FEATURE_FIND_USER=y
-CONFIG_FEATURE_FIND_GROUP=y
-CONFIG_FEATURE_FIND_NOT=y
-CONFIG_FEATURE_FIND_DEPTH=y
-CONFIG_FEATURE_FIND_PAREN=y
-CONFIG_FEATURE_FIND_SIZE=y
-CONFIG_FEATURE_FIND_PRUNE=y
-CONFIG_FEATURE_FIND_DELETE=y
-CONFIG_FEATURE_FIND_PATH=y
-CONFIG_FEATURE_FIND_REGEX=y
-CONFIG_FEATURE_FIND_CONTEXT=y
-CONFIG_GREP=y
-CONFIG_FEATURE_GREP_EGREP_ALIAS=y
-CONFIG_FEATURE_GREP_FGREP_ALIAS=y
-CONFIG_FEATURE_GREP_CONTEXT=y
-CONFIG_XARGS=y
-CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
-CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
-CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
-CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
-
-#
-# Init Utilities
-#
-CONFIG_INIT=y
-# CONFIG_DEBUG_INIT is not set
-CONFIG_FEATURE_USE_INITTAB=y
-CONFIG_FEATURE_KILL_REMOVED=y
-CONFIG_FEATURE_KILL_DELAY=1
-CONFIG_FEATURE_INIT_SCTTY=y
-CONFIG_FEATURE_INIT_SYSLOG=y
-CONFIG_FEATURE_EXTRA_QUIET=y
-CONFIG_FEATURE_INIT_COREDUMPS=y
-CONFIG_FEATURE_INITRD=y
-CONFIG_HALT=y
-CONFIG_MESG=y
-
-#
-# Login/Password Management Utilities
-#
-CONFIG_FEATURE_SHADOWPASSWDS=y
-CONFIG_USE_BB_SHADOW=y
-CONFIG_USE_BB_PWD_GRP=y
-CONFIG_ADDGROUP=y
-CONFIG_FEATURE_ADDUSER_TO_GROUP=y
-CONFIG_DELGROUP=y
-CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
-CONFIG_FEATURE_CHECK_NAMES=y
-CONFIG_ADDUSER=y
-CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y
-CONFIG_DELUSER=y
-CONFIG_GETTY=y
-CONFIG_FEATURE_UTMP=y
-CONFIG_FEATURE_WTMP=y
-CONFIG_LOGIN=y
-# CONFIG_PAM is not set
-CONFIG_LOGIN_SCRIPTS=y
-CONFIG_FEATURE_NOLOGIN=y
-CONFIG_FEATURE_SECURETTY=y
-CONFIG_PASSWD=y
-CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
-CONFIG_CRYPTPW=y
-CONFIG_CHPASSWD=y
-CONFIG_SU=y
-CONFIG_FEATURE_SU_SYSLOG=y
-CONFIG_FEATURE_SU_CHECKS_SHELLS=y
-CONFIG_SULOGIN=y
-CONFIG_VLOCK=y
-
-#
-# Linux Ext2 FS Progs
-#
-CONFIG_CHATTR=y
-CONFIG_FSCK=y
-CONFIG_LSATTR=y
-
-#
-# Linux Module Utilities
-#
-CONFIG_INSMOD=y
-CONFIG_FEATURE_INSMOD_VERSION_CHECKING=y
-CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS=y
-CONFIG_FEATURE_INSMOD_LOADINKMEM=y
-CONFIG_FEATURE_INSMOD_LOAD_MAP=y
-CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL=y
-CONFIG_RMMOD=y
-CONFIG_LSMOD=y
-CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
-CONFIG_MODPROBE=y
-CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
-CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
-
-#
-# Options common to multiple modutils
-#
-CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
-CONFIG_FEATURE_2_4_MODULES=y
-CONFIG_FEATURE_2_6_MODULES=y
-# CONFIG_FEATURE_QUERY_MODULE_INTERFACE is not set
-
-#
-# Linux System Utilities
-#
-CONFIG_DMESG=y
-CONFIG_FEATURE_DMESG_PRETTY=y
-CONFIG_FBSET=y
-CONFIG_FEATURE_FBSET_FANCY=y
-CONFIG_FEATURE_FBSET_READMODE=y
-CONFIG_FDFLUSH=y
-CONFIG_FDFORMAT=y
-CONFIG_FDISK=y
-CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
-CONFIG_FEATURE_FDISK_WRITABLE=y
-CONFIG_FEATURE_AIX_LABEL=y
-CONFIG_FEATURE_SGI_LABEL=y
-CONFIG_FEATURE_SUN_LABEL=y
-CONFIG_FEATURE_OSF_LABEL=y
-CONFIG_FEATURE_FDISK_ADVANCED=y
-CONFIG_FINDFS=y
-CONFIG_FREERAMDISK=y
-CONFIG_FSCK_MINIX=y
-CONFIG_MKFS_MINIX=y
-
-#
-# Minix filesystem support
-#
-CONFIG_FEATURE_MINIX2=y
-CONFIG_GETOPT=y
-CONFIG_HEXDUMP=y
-CONFIG_FEATURE_HEXDUMP_REVERSE=y
-CONFIG_HD=y
-CONFIG_HWCLOCK=y
-CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
-CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
-CONFIG_IPCRM=y
-CONFIG_IPCS=y
-CONFIG_LOSETUP=y
-CONFIG_MDEV=y
-CONFIG_FEATURE_MDEV_CONF=y
-CONFIG_FEATURE_MDEV_RENAME=y
-CONFIG_FEATURE_MDEV_EXEC=y
-CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
-CONFIG_MKSWAP=y
-CONFIG_FEATURE_MKSWAP_V0=y
-CONFIG_MORE=y
-CONFIG_FEATURE_USE_TERMIOS=y
-CONFIG_VOLUMEID=y
-CONFIG_FEATURE_VOLUMEID_EXT=y
-CONFIG_FEATURE_VOLUMEID_REISERFS=y
-CONFIG_FEATURE_VOLUMEID_FAT=y
-CONFIG_FEATURE_VOLUMEID_HFS=y
-CONFIG_FEATURE_VOLUMEID_JFS=y
-CONFIG_FEATURE_VOLUMEID_XFS=y
-CONFIG_FEATURE_VOLUMEID_NTFS=y
-CONFIG_FEATURE_VOLUMEID_ISO9660=y
-CONFIG_FEATURE_VOLUMEID_UDF=y
-CONFIG_FEATURE_VOLUMEID_LUKS=y
-CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y
-CONFIG_FEATURE_VOLUMEID_CRAMFS=y
-CONFIG_FEATURE_VOLUMEID_ROMFS=y
-CONFIG_FEATURE_VOLUMEID_SYSV=y
-CONFIG_FEATURE_VOLUMEID_OCFS2=y
-CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
-CONFIG_MOUNT=y
-CONFIG_FEATURE_MOUNT_FAKE=y
-CONFIG_FEATURE_MOUNT_VERBOSE=y
-CONFIG_FEATURE_MOUNT_HELPERS=y
-CONFIG_FEATURE_MOUNT_LABEL=y
-CONFIG_FEATURE_MOUNT_NFS=y
-CONFIG_FEATURE_MOUNT_CIFS=y
-CONFIG_FEATURE_MOUNT_FLAGS=y
-CONFIG_FEATURE_MOUNT_FSTAB=y
-CONFIG_PIVOT_ROOT=y
-CONFIG_RDATE=y
-CONFIG_READPROFILE=y
-CONFIG_RTCWAKE=y
-CONFIG_SETARCH=y
-CONFIG_SWAPONOFF=y
-CONFIG_SWITCH_ROOT=y
-CONFIG_UMOUNT=y
-CONFIG_FEATURE_UMOUNT_ALL=y
-
-#
-# Common options for mount/umount
-#
-CONFIG_FEATURE_MOUNT_LOOP=y
-# CONFIG_FEATURE_MTAB_SUPPORT is not set
-
-#
-# Miscellaneous Utilities
-#
-CONFIG_ADJTIMEX=y
-CONFIG_BBCONFIG=y
-CONFIG_CHAT=y
-CONFIG_FEATURE_CHAT_NOFAIL=y
-CONFIG_FEATURE_CHAT_TTY_HIFI=y
-CONFIG_FEATURE_CHAT_IMPLICIT_CR=y
-CONFIG_FEATURE_CHAT_SWALLOW_OPTS=y
-CONFIG_FEATURE_CHAT_SEND_ESCAPES=y
-CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y
-CONFIG_FEATURE_CHAT_CLR_ABORT=y
-CONFIG_CHRT=y
-CONFIG_CROND=y
-CONFIG_DEBUG_CROND_OPTION=y
-CONFIG_FEATURE_CROND_CALL_SENDMAIL=y
-CONFIG_CRONTAB=y
-CONFIG_DC=y
-# CONFIG_DEVFSD is not set
-# CONFIG_DEVFSD_MODLOAD is not set
-# CONFIG_DEVFSD_FG_NP is not set
-# CONFIG_DEVFSD_VERBOSE is not set
-# CONFIG_FEATURE_DEVFS is not set
-CONFIG_EJECT=y
-CONFIG_FEATURE_EJECT_SCSI=y
-CONFIG_LAST=y
-CONFIG_LESS=y
-CONFIG_FEATURE_LESS_MAXLINES=9999999
-CONFIG_FEATURE_LESS_BRACKETS=y
-CONFIG_FEATURE_LESS_FLAGS=y
-CONFIG_FEATURE_LESS_FLAGCS=y
-CONFIG_FEATURE_LESS_MARKS=y
-CONFIG_FEATURE_LESS_REGEXP=y
-CONFIG_HDPARM=y
-CONFIG_FEATURE_HDPARM_GET_IDENTITY=y
-CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y
-CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y
-CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y
-CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y
-CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y
-CONFIG_MAKEDEVS=y
-# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
-CONFIG_FEATURE_MAKEDEVS_TABLE=y
-CONFIG_MICROCOM=y
-CONFIG_MOUNTPOINT=y
-CONFIG_MT=y
-CONFIG_RAIDAUTORUN=y
-CONFIG_READAHEAD=y
-CONFIG_RUNLEVEL=y
-CONFIG_RX=y
-CONFIG_SCRIPT=y
-CONFIG_STRINGS=y
-CONFIG_SETSID=y
-CONFIG_TASKSET=y
-CONFIG_FEATURE_TASKSET_FANCY=y
-CONFIG_TIME=y
-CONFIG_TTYSIZE=y
-CONFIG_WATCHDOG=y
-
-#
-# Networking Utilities
-#
-CONFIG_FEATURE_IPV6=y
-CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
-CONFIG_VERBOSE_RESOLUTION_ERRORS=y
-CONFIG_ARP=y
-CONFIG_ARPING=y
-CONFIG_BRCTL=y
-CONFIG_FEATURE_BRCTL_FANCY=y
-CONFIG_DNSD=y
-CONFIG_ETHER_WAKE=y
-CONFIG_FAKEIDENTD=y
-CONFIG_FTPGET=y
-CONFIG_FTPPUT=y
-CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y
-CONFIG_HOSTNAME=y
-CONFIG_HTTPD=y
-CONFIG_FEATURE_HTTPD_RANGES=y
-CONFIG_FEATURE_HTTPD_USE_SENDFILE=y
-CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP=y
-CONFIG_FEATURE_HTTPD_SETUID=y
-CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
-CONFIG_FEATURE_HTTPD_AUTH_MD5=y
-CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES=y
-CONFIG_FEATURE_HTTPD_CGI=y
-CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
-CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
-CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
-CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
-CONFIG_FEATURE_HTTPD_PROXY=y
-CONFIG_IFCONFIG=y
-CONFIG_FEATURE_IFCONFIG_STATUS=y
-CONFIG_FEATURE_IFCONFIG_SLIP=y
-CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y
-CONFIG_FEATURE_IFCONFIG_HW=y
-CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
-CONFIG_IFENSLAVE=y
-CONFIG_IFUPDOWN=y
-CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
-CONFIG_FEATURE_IFUPDOWN_IP=y
-CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
-# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
-CONFIG_FEATURE_IFUPDOWN_IPV4=y
-CONFIG_FEATURE_IFUPDOWN_IPV6=y
-CONFIG_FEATURE_IFUPDOWN_MAPPING=y
-CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP=y
-CONFIG_INETD=y
-CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
-CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
-CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
-CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
-CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
-CONFIG_FEATURE_INETD_RPC=y
-CONFIG_IP=y
-CONFIG_FEATURE_IP_ADDRESS=y
-CONFIG_FEATURE_IP_LINK=y
-CONFIG_FEATURE_IP_ROUTE=y
-CONFIG_FEATURE_IP_TUNNEL=y
-CONFIG_FEATURE_IP_RULE=y
-CONFIG_FEATURE_IP_SHORT_FORMS=y
-CONFIG_FEATURE_IP_RARE_PROTOCOLS=y
-CONFIG_IPADDR=y
-CONFIG_IPLINK=y
-CONFIG_IPROUTE=y
-CONFIG_IPTUNNEL=y
-CONFIG_IPRULE=y
-CONFIG_IPCALC=y
-CONFIG_FEATURE_IPCALC_FANCY=y
-CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y
-CONFIG_NAMEIF=y
-CONFIG_FEATURE_NAMEIF_EXTENDED=y
-CONFIG_NC=y
-CONFIG_NC_SERVER=y
-CONFIG_NC_EXTRA=y
-CONFIG_NETSTAT=y
-CONFIG_FEATURE_NETSTAT_WIDE=y
-CONFIG_NSLOOKUP=y
-CONFIG_PING=y
-CONFIG_PING6=y
-CONFIG_FEATURE_FANCY_PING=y
-CONFIG_PSCAN=y
-CONFIG_ROUTE=y
-CONFIG_SENDMAIL=y
-CONFIG_FETCHMAIL=y
-CONFIG_SLATTACH=y
-CONFIG_TELNET=y
-CONFIG_FEATURE_TELNET_TTYPE=y
-CONFIG_FEATURE_TELNET_AUTOLOGIN=y
-CONFIG_TELNETD=y
-CONFIG_FEATURE_TELNETD_STANDALONE=y
-CONFIG_TFTP=y
-CONFIG_TFTPD=y
-CONFIG_FEATURE_TFTP_GET=y
-CONFIG_FEATURE_TFTP_PUT=y
-CONFIG_FEATURE_TFTP_BLOCKSIZE=y
-CONFIG_DEBUG_TFTP=y
-CONFIG_TRACEROUTE=y
-CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
-CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE=y
-CONFIG_FEATURE_TRACEROUTE_USE_ICMP=y
-CONFIG_APP_UDHCPD=y
-CONFIG_APP_DHCPRELAY=y
-CONFIG_APP_DUMPLEASES=y
-CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y
-CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases"
-CONFIG_APP_UDHCPC=y
-CONFIG_FEATURE_UDHCPC_ARPING=y
-CONFIG_FEATURE_UDHCP_PORT=y
-CONFIG_FEATURE_UDHCP_DEBUG=y
-CONFIG_FEATURE_RFC3397=y
-CONFIG_DHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
-CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
-CONFIG_VCONFIG=y
-CONFIG_WGET=y
-CONFIG_FEATURE_WGET_STATUSBAR=y
-CONFIG_FEATURE_WGET_AUTHENTICATION=y
-CONFIG_FEATURE_WGET_LONG_OPTIONS=y
-CONFIG_ZCIP=y
-CONFIG_TCPSVD=y
-CONFIG_UDPSVD=y
-
-#
-# Process Utilities
-#
-CONFIG_FREE=y
-CONFIG_FUSER=y
-CONFIG_KILL=y
-CONFIG_KILLALL=y
-CONFIG_KILLALL5=y
-CONFIG_NMETER=y
-CONFIG_PGREP=y
-CONFIG_PIDOF=y
-CONFIG_FEATURE_PIDOF_SINGLE=y
-CONFIG_FEATURE_PIDOF_OMIT=y
-CONFIG_PKILL=y
-CONFIG_PS=y
-CONFIG_FEATURE_PS_WIDE=y
-CONFIG_FEATURE_PS_TIME=y
-CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS=y
-CONFIG_RENICE=y
-CONFIG_BB_SYSCTL=y
-CONFIG_TOP=y
-CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
-CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
-CONFIG_FEATURE_TOP_DECIMALS=y
-CONFIG_FEATURE_TOPMEM=y
-CONFIG_UPTIME=y
-CONFIG_WATCH=y
-
-#
-# Shells
-#
-# CONFIG_FEATURE_SH_IS_ASH is not set
-# CONFIG_FEATURE_SH_IS_HUSH is not set
-# CONFIG_FEATURE_SH_IS_MSH is not set
-CONFIG_FEATURE_SH_IS_NONE=y
-# CONFIG_ASH is not set
-# CONFIG_ASH_JOB_CONTROL is not set
-# CONFIG_ASH_READ_NCHARS is not set
-# CONFIG_ASH_READ_TIMEOUT is not set
-# CONFIG_ASH_ALIAS is not set
-# CONFIG_ASH_MATH_SUPPORT is not set
-# CONFIG_ASH_MATH_SUPPORT_64 is not set
-# CONFIG_ASH_GETOPTS is not set
-# CONFIG_ASH_BUILTIN_ECHO is not set
-# CONFIG_ASH_BUILTIN_TEST is not set
-# CONFIG_ASH_CMDCMD is not set
-# CONFIG_ASH_MAIL is not set
-# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_ASH_RANDOM_SUPPORT is not set
-# CONFIG_ASH_EXPAND_PRMT is not set
-CONFIG_HUSH=y
-CONFIG_HUSH_HELP=y
-CONFIG_HUSH_INTERACTIVE=y
-CONFIG_HUSH_JOB=y
-CONFIG_HUSH_TICK=y
-CONFIG_HUSH_IF=y
-CONFIG_HUSH_LOOPS=y
-CONFIG_LASH=y
-CONFIG_MSH=y
-
-#
-# Bourne Shell Options
-#
-CONFIG_FEATURE_SH_EXTRA_QUIET=y
-CONFIG_FEATURE_SH_STANDALONE=y
-CONFIG_CTTYHACK=y
-
-#
-# System Logging Utilities
-#
-CONFIG_SYSLOGD=y
-CONFIG_FEATURE_ROTATE_LOGFILE=y
-CONFIG_FEATURE_REMOTE_LOG=y
-CONFIG_FEATURE_SYSLOGD_DUP=y
-CONFIG_FEATURE_IPC_SYSLOG=y
-CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
-CONFIG_LOGREAD=y
-CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
-CONFIG_KLOGD=y
-CONFIG_LOGGER=y
-
-#
-# Runit Utilities
-#
-CONFIG_RUNSV=y
-CONFIG_RUNSVDIR=y
-CONFIG_SV=y
-CONFIG_SVLOGD=y
-CONFIG_CHPST=y
-CONFIG_SETUIDGID=y
-CONFIG_ENVUIDGID=y
-CONFIG_ENVDIR=y
-CONFIG_SOFTLIMIT=y
-
-#
-# Selinux Utilities
-#
-CONFIG_CHCON=y
-CONFIG_FEATURE_CHCON_LONG_OPTIONS=y
-CONFIG_GETENFORCE=y
-CONFIG_GETSEBOOL=y
-CONFIG_LOAD_POLICY=y
-CONFIG_MATCHPATHCON=y
-CONFIG_RESTORECON=y
-CONFIG_RUNCON=y
-CONFIG_FEATURE_RUNCON_LONG_OPTIONS=y
-CONFIG_SELINUXENABLED=y
-CONFIG_SETENFORCE=y
-CONFIG_SETFILES=y
-CONFIG_FEATURE_SETFILES_CHECK_OPTION=y
-CONFIG_SETSEBOOL=y
-CONFIG_SESTATUS=y
-
-#
-# Print Utilities
-#
-CONFIG_LPD=y
-CONFIG_LPR=y
-CONFIG_LPQ=y
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-obj-y :=
-obj-y += applets.o
-
-hostprogs-y:=
-hostprogs-y += usage applet_tables
-
-always:= $(hostprogs-y)
-
-# Generated files need additional love
-
-HOSTCFLAGS_usage.o = -I$(srctree)/include
-
-applets/applets.o: include/usage_compressed.h include/applet_tables.h
-
-applets/usage: .config $(srctree)/applets/usage_compressed
-applets/applet_tables: .config
-
-quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
- cmd_gen_usage_compressed = $(srctree)/applets/usage_compressed include/usage_compressed.h applets
-
-include/usage_compressed.h: applets/usage $(srctree)/applets/usage_compressed
- $(call cmd,gen_usage_compressed)
-
-quiet_cmd_gen_applet_tables = GEN include/applet_tables.h
- cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h
-
-include/applet_tables.h: applets/applet_tables
- $(call cmd,gen_applet_tables)
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Archival Utilities"
-
-config AR
- bool "ar"
- default n
- help
- ar is an archival utility program used to create, modify, and
- extract contents from archives. An archive is a single file holding
- a collection of other files in a structure that makes it possible to
- retrieve the original individual files (called archive members).
- The original files' contents, mode (permissions), timestamp, owner,
- and group are preserved in the archive, and can be restored on
- extraction.
-
- The stored filename is limited to 15 characters. (for more information
- see long filename support).
- ar has 60 bytes of overheads for every stored file.
-
- This implementation of ar can extract archives, it cannot create or
- modify them.
- On an x86 system, the ar applet adds about 1K.
-
- Unless you have a specific application which requires ar, you should
- probably say N here.
-
-config FEATURE_AR_LONG_FILENAMES
- bool "Support for long filenames (not need for debs)"
- default n
- depends on AR
- help
- By default the ar format can only store the first 15 characters of the
- filename, this option removes that limitation.
- It supports the GNU ar long filename method which moves multiple long
- filenames into a the data section of a new ar entry.
-
-config BUNZIP2
- bool "bunzip2"
- default n
- help
- bunzip2 is a compression utility using the Burrows-Wheeler block
- sorting text compression algorithm, and Huffman coding. Compression
- 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.
-
- Unless you have a specific application which requires bunzip2, you
- should probably say N here.
-
-config BZIP2
- bool "bzip2"
- default n
- help
- bzip2 is a compression utility using the Burrows-Wheeler block
- sorting text compression algorithm, and Huffman coding. Compression
- 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.
-
- Unless you have a specific application which requires bzip2, you
- should probably say N here.
-
-config CPIO
- bool "cpio"
- default n
- help
- cpio is an archival utility program used to create, modify, and extract
- contents from archives.
- cpio has 110 bytes of overheads for every stored file.
-
- This implementation of cpio can extract cpio archives created in the
- "newc" or "crc" format, it cannot create or modify them.
-
- Unless you have a specific application which requires cpio, you should
- probably say N here.
-
-config DPKG
- bool "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.
-
-config DPKG_DEB
- bool "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.
-
-config FEATURE_DPKG_DEB_EXTRACT_ONLY
- bool "Extract only (-x)"
- default n
- depends on DPKG_DEB
- help
- This reduces dpkg-deb to the equivalent of "ar -p <deb> data.tar.gz | tar -zx".
- However it saves space as none of the extra dpkg-deb, ar or tar options are
- needed, they are linked to internally.
-
-config GUNZIP
- bool "gunzip"
- default n
- help
- gunzip is used to decompress archives created by gzip.
- You can use the `-t' option to test the integrity of
- an archive, without decompressing it.
-
-config FEATURE_GUNZIP_UNCOMPRESS
- bool "Uncompress support"
- default n
- depends on GUNZIP
- help
- Enable if you want gunzip to have the ability to decompress
- archives created by the program compress (not much
- used anymore).
-
-config GZIP
- bool "gzip"
- default n
- help
- gzip is used to compress files.
- It's probably the most widely used UNIX compression program.
-
-config RPM2CPIO
- bool "rpm2cpio"
- default n
- help
- Converts an RPM file into a CPIO archive.
-
-config RPM
- bool "rpm"
- default n
- help
- Mini RPM applet - queries and extracts RPM packages.
-
-config FEATURE_RPM_BZ2
- bool "Enable handling of rpms with bzip2-compressed data inside"
- default n
- depends on RPM
- help
- Enable handling of rpms with bzip2-compressed data inside.
-
-config TAR
- bool "tar"
- default n
- help
- tar is an archiving program. It's commonly used with gzip to
- create compressed archives. It's probably the most widely used
- UNIX archive program.
-
-config FEATURE_TAR_CREATE
- bool "Enable archive creation"
- default y
- depends on TAR
- help
- If you enable this option you'll be able to create
- tar archives using the `-c' option.
-
-config FEATURE_TAR_GZIP
- bool "Enable -z option"
- default y
- depends on TAR
- help
- If you enable this option tar will be able to call gzip,
- when creating or extracting tar gziped archives.
-
-config FEATURE_TAR_BZIP2
- bool "Enable -j option to handle .tar.bz2 files"
- default n
- depends on TAR
- help
- If you enable this option you'll be able to extract
- archives compressed with bzip2.
-
-config FEATURE_TAR_LZMA
- bool "Enable -a option to handle .tar.lzma files"
- default n
- depends on TAR
- help
- If you enable this option you'll be able to extract
- archives compressed with lzma.
-
-config FEATURE_TAR_COMPRESS
- bool "Enable -Z option"
- default n
- depends on TAR
- help
- If you enable this option tar will be able to call uncompress,
- when extracting .tar.Z archives.
-
-config FEATURE_TAR_AUTODETECT
- bool "Let tar autodetect gz/bz2 compresses tarballs"
- default n
- depends on FEATURE_TAR_GZIP || FEATURE_TAR_BZIP2
- help
- With this option tar can automatically detect gzip/bzip2 compressed
- tarballs. Currently it works only on seekable streams.
-
-config FEATURE_TAR_FROM
- bool "Enable -X (exclude from) and -T (include from) options)"
- default n
- depends on TAR
- help
- If you enable this option you'll be able to specify
- a list of files to include or exclude from an archive.
-
-config FEATURE_TAR_OLDGNU_COMPATIBILITY
- bool "Support for old tar header format"
- default N
- depends on TAR
- help
- This option is required to unpack archives created in
- the old GNU format; help to kill this old format by
- repacking your ancient archives with the new format.
-
-config FEATURE_TAR_OLDSUN_COMPATIBILITY
- bool "Enable untarring of tarballs with checksums produced by buggy Sun tar"
- default N
- depends on TAR
- help
- This option is required to unpack archives created by some old
- version of Sun's tar (it was calculating checksum using signed arithmetic).
- It is said to be fixed in newer Sun tar, but "old" tarballs still exist.
-
-config FEATURE_TAR_GNU_EXTENSIONS
- bool "Support for GNU tar extensions (long filenames)"
- default y
- depends on TAR
- help
- With this option busybox supports GNU long filenames and
- linknames.
-
-config FEATURE_TAR_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on TAR && GETOPT_LONG
- help
- Enable use of long options, increases size by about 400 Bytes
-
-config FEATURE_TAR_UNAME_GNAME
- bool "Enable use of user and group names"
- default n
- depends on TAR
- help
- Enables use of user and group names in tar. This affects contents
- listings (-t) and preserving permissions when unpacking (-p).
- +200 bytes.
-
-config UNCOMPRESS
- bool "uncompress"
- default n
- help
- uncompress is used to decompress archives created by compress.
- Not much used anymore, replaced by gzip/gunzip.
-
-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 FEATURE_LZMA_FAST
- bool "Optimze unlzma for speed"
- default n
- depends on UNLZMA
- help
- This option reduces decompression time by about 33% at the cost of
- a 2K bigger binary.
-
-config UNZIP
- bool "unzip"
- default n
- help
- unzip will list or extract files from a ZIP archive,
- commonly found on DOS/WIN systems. The default behavior
- (with no options) is to extract the archive into the
- current directory. Use the `-d' option to extract to a
- directory of your choice.
-
-comment "Common options for cpio and tar"
- depends on CPIO || TAR
-
-config FEATURE_UNARCHIVE_TAPE
- bool "Enable tape drive support"
- default n
- depends on CPIO || TAR
- help
- I don't think this is needed anymore.
-
-comment "Common options for dpkg and dpkg_deb"
- depends on DPKG || DPKG_DEB
-
-config FEATURE_DEB_TAR_GZ
- bool "gzip debian packages (normal)"
- default y if DPKG || DPKG_DEB
- depends on DPKG || 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 FEATURE_DEB_TAR_BZ2
- bool "bzip2 debian packages"
- default n
- depends on DPKG || DPKG_DEB
- 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 FEATURE_DEB_TAR_LZMA
- bool "lzma debian packages"
- default n
- depends on DPKG || 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
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-libs-y += libunarchive/
-
-lib-y:=
-lib-$(CONFIG_AR) += ar.o
-lib-$(CONFIG_BUNZIP2) += bbunzip.o
-lib-$(CONFIG_BZIP2) += bzip2.o bbunzip.o
-lib-$(CONFIG_UNLZMA) += bbunzip.o
-lib-$(CONFIG_CPIO) += cpio.o
-lib-$(CONFIG_DPKG) += dpkg.o
-lib-$(CONFIG_DPKG_DEB) += dpkg_deb.o
-lib-$(CONFIG_GUNZIP) += bbunzip.o
-lib-$(CONFIG_GZIP) += gzip.o bbunzip.o
-lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o
-lib-$(CONFIG_RPM) += rpm.o
-lib-$(CONFIG_TAR) += tar.o
-lib-$(CONFIG_UNCOMPRESS) += bbunzip.o
-lib-$(CONFIG_UNZIP) += unzip.o
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
-
-lib-y:= \
-\
- data_skip.o \
- data_extract_all.o \
- data_extract_to_stdout.o \
- data_extract_to_buffer.o \
-\
- filter_accept_all.o \
- filter_accept_list.o \
- filter_accept_reject_list.o \
-\
- header_skip.o \
- header_list.o \
- header_verbose_list.o \
-\
- archive_xread_all_eof.o \
-\
- seek_by_read.o \
- seek_by_jump.o \
-\
- data_align.o \
- find_list_entry.o \
- init_handle.o
-
-DPKG_FILES:= \
- get_header_ar.o \
- unpack_ar_archive.o \
- get_header_tar.o \
- filter_accept_list_reassign.o
-
-lib-$(CONFIG_RPM) += open_transformer.o
-lib-$(CONFIG_FEATURE_TAR_BZIP2) += open_transformer.o
-lib-$(CONFIG_FEATURE_TAR_LZMA) += open_transformer.o
-lib-$(CONFIG_FEATURE_TAR_GZIP) += open_transformer.o
-lib-$(CONFIG_FEATURE_TAR_COMPRESS) += open_transformer.o
-lib-$(CONFIG_FEATURE_DEB_TAR_GZ) += open_transformer.o
-lib-$(CONFIG_FEATURE_DEB_TAR_BZ2) += open_transformer.o
-lib-$(CONFIG_FEATURE_DEB_TAR_LZMA) += open_transformer.o
-
-lib-$(CONFIG_AR) += get_header_ar.o unpack_ar_archive.o
-lib-$(CONFIG_BUNZIP2) += decompress_bunzip2.o
-lib-$(CONFIG_UNLZMA) += decompress_unlzma.o
-lib-$(CONFIG_CPIO) += get_header_cpio.o
-lib-$(CONFIG_DPKG) += $(DPKG_FILES)
-lib-$(CONFIG_DPKG_DEB) += $(DPKG_FILES)
-lib-$(CONFIG_FEATURE_DEB_TAR_GZ) += decompress_unzip.o get_header_tar_gz.o
-lib-$(CONFIG_FEATURE_DEB_TAR_BZ2) += decompress_bunzip2.o get_header_tar_bz2.o
-lib-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o
-lib-$(CONFIG_GUNZIP) += decompress_unzip.o
-lib-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o
-lib-$(CONFIG_RPM2CPIO) += decompress_unzip.o get_header_cpio.o
-lib-$(CONFIG_RPM) += decompress_unzip.o get_header_cpio.o
-lib-$(CONFIG_FEATURE_RPM_BZ2) += decompress_bunzip2.o
-lib-$(CONFIG_TAR) += get_header_tar.o
-lib-$(CONFIG_FEATURE_TAR_BZIP2) += decompress_bunzip2.o get_header_tar_bz2.o
-lib-$(CONFIG_FEATURE_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o
-lib-$(CONFIG_FEATURE_TAR_GZIP) += decompress_unzip.o get_header_tar_gz.o
-lib-$(CONFIG_FEATURE_TAR_COMPRESS) += decompress_uncompress.o
-lib-$(CONFIG_UNCOMPRESS) += decompress_uncompress.o
-lib-$(CONFIG_UNZIP) += decompress_unzip.o
-lib-$(CONFIG_FEATURE_COMPRESS_USAGE) += decompress_bunzip2.o
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "libbb.h"
-#include "unarchive.h"
-
-ssize_t archive_xread_all_eof(archive_handle_t *archive_handle,
- unsigned char *buf, size_t count)
-{
- ssize_t size;
-
- size = full_read(archive_handle->src_fd, buf, count);
- if (size != 0 && size != count) {
- bb_error_msg_and_die("short read: %u of %u",
- (unsigned)size, (unsigned)count);
- }
- return size;
-}
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * Copyright 2002 Glenn McGrath
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "libbb.h"
-#include "unarchive.h"
-
-void data_extract_to_buffer(archive_handle_t *archive_handle)
-{
- unsigned int size = archive_handle->file_header->size;
-
- archive_handle->buffer = xzalloc(size + 1);
- xread(archive_handle->src_fd, archive_handle->buffer, size);
-}
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Console Utilities"
-
-config CHVT
- bool "chvt"
- default n
- help
- This program is used to change to another terminal.
- Example: chvt 4 (change to terminal /dev/tty4)
-
-config CLEAR
- bool "clear"
- default n
- help
- This program clears the terminal screen.
-
-config DEALLOCVT
- bool "deallocvt"
- default n
- help
- This program deallocates unused virtual consoles.
-
-config DUMPKMAP
- bool "dumpkmap"
- default n
- help
- This program dumps the kernel's keyboard translation table to
- stdout, in binary format. You can then use loadkmap to load it.
-
-config KBD_MODE
- bool "kbd_mode"
- default n
- help
- This program reports and sets keyboard mode.
-
-config LOADFONT
- bool "loadfont"
- default n
- help
- This program loads a console font from standard input.
-
-config LOADKMAP
- bool "loadkmap"
- default n
- help
- This program loads a keyboard translation table from
- standard input.
-
-config OPENVT
- bool "openvt"
- default n
- help
- This program is used to start a command on an unused
- virtual terminal.
-
-config RESET
- bool "reset"
- default n
- help
- This program is used to reset the terminal screen, if it
- gets messed up.
-
-config RESIZE
- bool "resize"
- default n
- help
- This program is used to (re)set the width and height of your current
- terminal.
-
-config FEATURE_RESIZE_PRINT
- bool "Print environment variables"
- default n
- depends on RESIZE
- help
- Prints the newly set size (number of columns and rows) of
- the terminal.
- E.g.:
- COLUMNS=80;LINES=44;export COLUMNS LINES;
-
-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 FEATURE_SETCONSOLE_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on SETCONSOLE && GETOPT_LONG
- help
- Support long options for the setconsole applet.
-
-config SETKEYCODES
- bool "setkeycodes"
- default n
- help
- This program loads entries into the kernel's scancode-to-keycode
- map, allowing unusual keyboards to generate usable keycodes.
-
-config SETLOGCONS
- bool "setlogcons"
- default n
- help
- This program redirects the output console of kernel messages.
-
-endmenu
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_CHVT) += chvt.o
-lib-$(CONFIG_CLEAR) += clear.o
-lib-$(CONFIG_DEALLOCVT) += deallocvt.o
-lib-$(CONFIG_DUMPKMAP) += dumpkmap.o
-lib-$(CONFIG_SETCONSOLE) += setconsole.o
-lib-$(CONFIG_KBD_MODE) += kbd_mode.o
-lib-$(CONFIG_LOADFONT) += loadfont.o
-lib-$(CONFIG_LOADKMAP) += loadkmap.o
-lib-$(CONFIG_OPENVT) += openvt.o
-lib-$(CONFIG_RESET) += reset.o
-lib-$(CONFIG_RESIZE) += resize.o
-lib-$(CONFIG_SETKEYCODES) += setkeycodes.o
-lib-$(CONFIG_SETLOGCONS) += setlogcons.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Coreutils"
-
-config BASENAME
- bool "basename"
- default n
- help
- basename is used to strip the directory and suffix from filenames,
- leaving just the filename itself. Enable this option if you wish
- to enable the 'basename' utility.
-
-config CAL
- bool "cal"
- default n
- help
- cal is used to display a monthly calender.
-
-config CAT
- bool "cat"
- default n
- help
- 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 CATV
- bool "catv"
- default n
- help
- Display nonprinting characters as escape sequences (like some
- implementations' cat -v option).
-
-config CHGRP
- bool "chgrp"
- default n
- help
- chgrp is used to change the group ownership of files.
-
-config CHMOD
- bool "chmod"
- default n
- help
- chmod is used to change the access permission of files.
-
-config CHOWN
- bool "chown"
- default n
- help
- chown is used to change the user and/or group ownership
- of files.
-
-config CHROOT
- bool "chroot"
- default n
- help
- chroot is used to change the root directory and run a command.
- The default command is `/bin/sh'.
-
-config CKSUM
- bool "cksum"
- default n
- help
- cksum is used to calculate the CRC32 checksum of a file.
-
-config COMM
- bool "comm"
- default n
- help
- comm is used to compare two files line by line and return
- a three-column output.
-
-config CP
- bool "cp"
- default n
- help
- cp is used to copy files and directories.
-
-config CUT
- bool "cut"
- default n
- help
- cut is used to print selected parts of lines from
- each file to stdout.
-
-config DATE
- bool "date"
- default n
- help
- date is used to set the system date or display the
- current time in the given format.
-
-config FEATURE_DATE_ISOFMT
- bool "Enable ISO date format output (-I)"
- default y
- depends on DATE
- help
- Enable option (-I) to output an ISO-8601 compliant
- date/time string.
-
-config DD
- bool "dd"
- default n
- help
- dd copies a file (from standard input to standard output,
- by default) using specific input and output blocksizes,
- while optionally performing conversions on it.
-
-config FEATURE_DD_SIGNAL_HANDLING
- bool "Enable DD signal handling for status reporting"
- default y
- depends on 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 FEATURE_DD_IBS_OBS
- bool "Enable ibs, obs and conv options"
- default n
- depends on 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 DF
- bool "df"
- default n
- help
- df reports the amount of disk space used and available
- on filesystems.
-
-config FEATURE_DF_INODE
- bool "Enable -i (inode information)"
- default n
- depends on DF
- help
- This option enables support for df -i.
-
-config DIRNAME
- bool "dirname"
- default n
- help
- dirname is used to strip a non-directory suffix from
- a file name.
-
-config DOS2UNIX
- bool "dos2unix/unix2dos"
- default n
- help
- dos2unix is used to convert a text file from DOS format to
- UNIX format, and vice versa.
-
-config UNIX2DOS
- bool
- default y
- depends on DOS2UNIX
- help
- unix2dos is used to convert a text file from UNIX format to
- DOS format, and vice versa.
-
-config DU
- bool "du (default blocksize of 512 bytes)"
- default n
- help
- du is used to report the amount of disk space used
- for specified files.
-
-config FEATURE_DU_DEFAULT_BLOCKSIZE_1K
- bool "Use a default blocksize of 1024 bytes (1K)"
- default y
- depends on DU
- help
- Use a blocksize of (1K) instead of the default 512b.
-
-config ECHO
- bool "echo (basic SuSv3 version taking no options)"
- default n
- 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 FEATURE_FANCY_ECHO
- bool "Enable echo options (-n and -e)"
- default y
- depends on ECHO
- help
- This adds options (-n and -e) to echo.
-
-config ENV
- bool "env"
- default n
- help
- env is used to set an environment variable and run
- a command; without options it displays the current
- environment.
-
-config FEATURE_ENV_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on ENV && GETOPT_LONG
- help
- Support long options for the env applet.
-
-config EXPAND
- bool "expand"
- default n
- help
- By default, convert all tabs to spaces.
-
-config FEATURE_EXPAND_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on EXPAND && GETOPT_LONG
- help
- Support long options for the expand applet.
-
-config EXPR
- bool "expr"
- default n
- help
- expr is used to calculate numbers and print the result
- to standard output.
-
-config EXPR_MATH_SUPPORT_64
- bool "Extend Posix numbers support to 64 bit"
- default n
- depends on 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.
-
-config FALSE
- bool "false"
- default n
- help
- false returns an exit code of FALSE (1).
-
-config FOLD
- bool "fold"
- default n
- help
- Wrap text to fit a specific width.
-
-config HEAD
- bool "head"
- default n
- help
- head is used to print the first specified number of lines
- from files.
-
-config FEATURE_FANCY_HEAD
- bool "Enable head options (-c, -q, and -v)"
- default n
- depends on HEAD
- help
- This enables the head options (-c, -q, and -v).
-
-config HOSTID
- bool "hostid"
- default n
- help
- hostid prints the numeric identifier (in hexadecimal) for
- the current host.
-
-config ID
- bool "id"
- default n
- help
- id displays the current user and group ID names.
-
-config INSTALL
- bool "install"
- default n
- help
- Copy files and set attributes.
-
-config FEATURE_INSTALL_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on INSTALL && GETOPT_LONG
- help
- Support long options for the install applet.
-
-config LENGTH
- bool "length"
- default n
- help
- length is used to print out the length of a specified string.
-
-config LN
- bool "ln"
- default n
- help
- ln is used to create hard or soft links between files.
-
-config LOGNAME
- bool "logname"
- default n
- help
- logname is used to print the current user's login name.
-
-config LS
- bool "ls"
- default n
- help
- ls is used to list the contents of directories.
-
-config FEATURE_LS_FILETYPES
- bool "Enable filetyping options (-p and -F)"
- default y
- depends on LS
- help
- Enable the ls options (-p and -F).
-
-config FEATURE_LS_FOLLOWLINKS
- bool "Enable symlinks dereferencing (-L)"
- default y
- depends on LS
- help
- Enable the ls option (-L).
-
-config FEATURE_LS_RECURSIVE
- bool "Enable recursion (-R)"
- default y
- depends on LS
- help
- Enable the ls option (-R).
-
-config FEATURE_LS_SORTFILES
- bool "Sort the file names"
- default y
- depends on LS
- help
- Allow ls to sort file names alphabetically.
-
-config FEATURE_LS_TIMESTAMPS
- bool "Show file timestamps"
- default y
- depends on LS
- help
- Allow ls to display timestamps for files.
-
-config FEATURE_LS_USERNAME
- bool "Show username/groupnames"
- default y
- depends on LS
- help
- Allow ls to display username/groupname for files.
-
-config FEATURE_LS_COLOR
- bool "Allow use of color to identify file types"
- default y
- depends on LS && GETOPT_LONG
- help
- This enables the --color option to ls.
-
-config FEATURE_LS_COLOR_IS_DEFAULT
- bool "Produce colored ls output by default"
- default n
- depends on 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 MD5SUM
- bool "md5sum"
- default n
- help
- md5sum is used to print or check MD5 checksums.
-
-config MKDIR
- bool "mkdir"
- default n
- help
- mkdir is used to create directories with the specified names.
-
-config FEATURE_MKDIR_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on MKDIR && GETOPT_LONG
- help
- Support long options for the mkdir applet.
-
-config MKFIFO
- bool "mkfifo"
- default n
- help
- mkfifo is used to create FIFOs (named pipes).
- The `mknod' program can also create FIFOs.
-
-config MKNOD
- bool "mknod"
- default n
- help
- mknod is used to create FIFOs or block/character special
- files with the specified names.
-
-config MV
- bool "mv"
- default n
- help
- mv is used to move or rename files or directories.
-
-config FEATURE_MV_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on MV && GETOPT_LONG
- help
- Support long options for the mv applet.
-
-config NICE
- bool "nice"
- default n
- help
- nice runs a program with modified scheduling priority.
-
-config NOHUP
- bool "nohup"
- default n
- help
- run a command immune to hangups, with output to a non-tty.
-
-config OD
- bool "od"
- default n
- help
- od is used to dump binary files in octal and other formats.
-
-config PRINTENV
- bool "printenv"
- default n
- help
- printenv is used to print all or part of environment.
-
-config PRINTF
- bool "printf"
- default n
- help
- printf is used to format and print specified strings.
- It's similar to `echo' except it has more options.
-
-config PWD
- bool "pwd"
- default n
- help
- pwd is used to print the current directory.
-
-config READLINK
- bool "readlink"
- default n
- help
- This program reads a symbolic link and returns the name
- of the file it points to
-
-config FEATURE_READLINK_FOLLOW
- bool "Enable canonicalization by following all symlinks (-f)"
- default n
- depends on READLINK
- help
- Enable the readlink option (-f).
-
-config REALPATH
- bool "realpath"
- default n
- help
- Return the canonicalized absolute pathname.
- This isn't provided by GNU shellutils, but where else does it belong.
-
-config RM
- bool "rm"
- default n
- help
- rm is used to remove files or directories.
-
-config RMDIR
- bool "rmdir"
- default n
- help
- rmdir is used to remove empty directories.
-
-config FEATURE_RMDIR_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on RMDIR && GETOPT_LONG
- help
- Support long options for the rmdir applet, including
- --ignore-fail-on-non-empty for compatibility with GNU rmdir.
-
-config SEQ
- bool "seq"
- default n
- help
- print a sequence of numbers
-
-config SHA1SUM
- bool "sha1sum"
- default n
- help
- Compute and check SHA1 message digest
-
-config SLEEP
- bool "sleep (single integer arg with no suffix)"
- default n
- help
- sleep is used to pause for a specified number of seconds,
-
-config FEATURE_FANCY_SLEEP
- bool "Enable multiple integer args and optional time suffixes"
- default n
- depends on SLEEP
- help
- Allow sleep to pause for specified minutes, hours, and days.
-
-config SORT
- bool "sort"
- default n
- help
- sort is used to sort lines of text in specified files.
-
-config FEATURE_SORT_BIG
- bool "Full SuSv3 compliant sort (support -ktcsbdfiozgM)"
- default y
- depends on 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 SPLIT
- bool "split"
- default n
- help
- split a file into pieces.
-
-config FEATURE_SPLIT_FANCY
- bool "Fancy extensions"
- default n
- depends on SPLIT
- help
- Add support for features not required by SUSv3.
- Supports additional suffixes 'b' for 512 bytes,
- 'g' for 1GiB for the -b option.
-
-config STAT
- bool "stat"
- default n
- help
- display file or filesystem status.
-
-config FEATURE_STAT_FORMAT
- bool "Enable custom formats (-c)"
- default n
- depends on 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 STTY
- bool "stty"
- default n
- help
- stty is used to change and print terminal line settings.
-
-config SUM
- bool "sum"
- default n
- help
- checksum and count the blocks in a file
-
-config SYNC
- bool "sync"
- default n
- help
- sync is used to flush filesystem buffers.
-
-config TAC
- bool "tac"
- default n
- help
- tac is used to concatenate and print files in reverse.
-
-config TAIL
- bool "tail"
- default n
- help
- tail is used to print the last specified number of lines
- from files.
-
-config FEATURE_FANCY_TAIL
- bool "Enable extra tail options (-q, -s, and -v)"
- default y
- depends on TAIL
- help
- The options (-q, -s, and -v) are provided by GNU tail, but
- are not specific in the SUSv3 standard.
-
-config TEE
- bool "tee"
- default n
- help
- tee is used to read from standard input and write
- to standard output and files.
-
-config FEATURE_TEE_USE_BLOCK_IO
- bool "Enable block I/O (larger/faster) instead of byte I/O"
- default n
- depends on TEE
- help
- Enable this option for a faster tee, at expense of size.
-
-config TEST
- bool "test"
- default n
- help
- test is used to check file types and compare values,
- returning an appropriate exit code. The bash shell
- has test built in, ash can build it in optionally.
-
-config FEATURE_TEST_64
- bool "Extend test to 64 bit"
- default n
- depends on TEST
- help
- Enable 64-bit support in test.
-
-config TOUCH
- bool "touch"
- default n
- help
- touch is used to create or change the access and/or
- modification timestamp of specified files.
-
-config TR
- bool "tr"
- default n
- help
- tr is used to squeeze, and/or delete characters from standard
- input, writing to standard output.
-
-config FEATURE_TR_CLASSES
- bool "Enable character classes (such as [:upper:])"
- default n
- depends on TR
- help
- Enable character classes, enabling commands such as:
- tr [:upper:] [:lower:] to convert input into lowercase.
-
-config FEATURE_TR_EQUIV
- bool "Enable equivalence classes"
- default n
- depends on 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.
-
-config TRUE
- bool "true"
- default n
- help
- true returns an exit code of TRUE (0).
-
-config TTY
- bool "tty"
- default n
- help
- tty is used to print the name of the current terminal to
- standard output.
-
-config UNAME
- bool "uname"
- default n
- help
- uname is used to print system information.
-
-config UNEXPAND
- bool "unexpand"
- default n
- help
- By default, convert only leading sequences of blanks to tabs.
-
-config FEATURE_UNEXPAND_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on UNEXPAND && GETOPT_LONG
- help
- Support long options for the unexpand applet.
-
-config UNIQ
- bool "uniq"
- default n
- help
- uniq is used to remove duplicate lines from a sorted file.
-
-config USLEEP
- bool "usleep"
- default n
- help
- usleep is used to pause for a specified number of microseconds.
-
-config UUDECODE
- bool "uudecode"
- default n
- help
- uudecode is used to decode a uuencoded file.
-
-config UUENCODE
- bool "uuencode"
- default n
- help
- uuencode is used to uuencode a file.
-
-config WC
- bool "wc"
- default n
- help
- wc is used to print the number of bytes, words, and lines,
- in specified files.
-
-config FEATURE_WC_LARGE
- bool "Support very large files in wc"
- default n
- depends on WC
- help
- Use "unsigned long long" in wc for count variables
-
-config WHO
- bool "who"
- default n
- select FEATURE_UTMP
- help
- who is used to show who is logged on.
-
-config WHOAMI
- bool "whoami"
- default n
- help
- whoami is used to print the username of the current
- user id (same as id -un).
-
-config YES
- bool "yes"
- default n
- help
- yes is used to repeatedly output a specific string, or
- the default string `y'.
-
-comment "Common options for cp and mv"
- depends on CP || MV
-
-config FEATURE_PRESERVE_HARDLINKS
- bool "Preserve hard links"
- default n
- depends on CP || MV
- help
- Allow cp and mv to preserve hard links.
-
-comment "Common options for ls, more and telnet"
- depends on LS || MORE || TELNET
-
-config FEATURE_AUTOWIDTH
- bool "Calculate terminal & column widths"
- default y
- depends on LS || MORE || TELNET
- help
- 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 DF || DU || LS
-
-config FEATURE_HUMAN_READABLE
- bool "Support for human readable output (example 13k, 23M, 235G)"
- default n
- depends on DF || DU || LS
- help
- Allow df, du, and ls to have human readable output.
-
-comment "Common options for md5sum, sha1sum"
- depends on MD5SUM || SHA1SUM
-
-config FEATURE_MD5_SHA1_SUM_CHECK
- bool "Enable -c, -s and -w options"
- default n
- depends on MD5SUM || SHA1SUM
- help
- Enabling the -c options allows files to be checked
- against pre-calculated hash values.
-
- -s and -w are useful options when verifying checksums.
-
-endmenu
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-libs-y += libcoreutils/
-
-lib-y:=
-lib-$(CONFIG_BASENAME) += basename.o
-lib-$(CONFIG_CAL) += cal.o
-lib-$(CONFIG_CAT) += cat.o
-lib-$(CONFIG_MORE) += cat.o # more uses it if stdout isn't a tty
-lib-$(CONFIG_LESS) += cat.o # less too
-lib-$(CONFIG_CRONTAB) += cat.o # crontab -l
-lib-$(CONFIG_CATV) += catv.o
-lib-$(CONFIG_CHGRP) += chgrp.o chown.o
-lib-$(CONFIG_CHMOD) += chmod.o
-lib-$(CONFIG_CHOWN) += chown.o
-lib-$(CONFIG_CHROOT) += chroot.o
-lib-$(CONFIG_CKSUM) += cksum.o
-lib-$(CONFIG_COMM) += comm.o
-lib-$(CONFIG_CP) += cp.o
-lib-$(CONFIG_CUT) += cut.o
-lib-$(CONFIG_DATE) += date.o
-lib-$(CONFIG_DD) += dd.o
-lib-$(CONFIG_DF) += df.o
-lib-$(CONFIG_DIRNAME) += dirname.o
-lib-$(CONFIG_DOS2UNIX) += dos2unix.o
-lib-$(CONFIG_DU) += du.o
-lib-$(CONFIG_ECHO) += echo.o
-lib-$(CONFIG_ASH) += echo.o # used by ash
-lib-$(CONFIG_ENV) += env.o
-lib-$(CONFIG_EXPR) += expr.o
-lib-$(CONFIG_EXPAND) += expand.o
-lib-$(CONFIG_FALSE) += false.o
-lib-$(CONFIG_FOLD) += fold.o
-lib-$(CONFIG_HEAD) += head.o
-lib-$(CONFIG_HOSTID) += hostid.o
-lib-$(CONFIG_ID) += id.o
-lib-$(CONFIG_INSTALL) += install.o
-lib-$(CONFIG_LENGTH) += length.o
-lib-$(CONFIG_LN) += ln.o
-lib-$(CONFIG_LOGNAME) += logname.o
-lib-$(CONFIG_LS) += ls.o
-lib-$(CONFIG_MD5SUM) += md5_sha1_sum.o
-lib-$(CONFIG_MKDIR) += mkdir.o
-lib-$(CONFIG_MKFIFO) += mkfifo.o
-lib-$(CONFIG_MKNOD) += mknod.o
-lib-$(CONFIG_MV) += mv.o
-lib-$(CONFIG_NICE) += nice.o
-lib-$(CONFIG_NOHUP) += nohup.o
-lib-$(CONFIG_OD) += od.o
-lib-$(CONFIG_PRINTENV) += printenv.o
-lib-$(CONFIG_PRINTF) += printf.o
-lib-$(CONFIG_PWD) += pwd.o
-lib-$(CONFIG_READLINK) += readlink.o
-lib-$(CONFIG_REALPATH) += realpath.o
-lib-$(CONFIG_RM) += rm.o
-lib-$(CONFIG_RMDIR) += rmdir.o
-lib-$(CONFIG_SEQ) += seq.o
-lib-$(CONFIG_SHA1SUM) += md5_sha1_sum.o
-lib-$(CONFIG_SLEEP) += sleep.o
-lib-$(CONFIG_SPLIT) += split.o
-lib-$(CONFIG_SORT) += sort.o
-lib-$(CONFIG_STAT) += stat.o
-lib-$(CONFIG_STTY) += stty.o
-lib-$(CONFIG_SUM) += sum.o
-lib-$(CONFIG_SYNC) += sync.o
-lib-$(CONFIG_TAC) += tac.o
-lib-$(CONFIG_TAIL) += tail.o
-lib-$(CONFIG_TEE) += tee.o
-lib-$(CONFIG_TEST) += test.o
-lib-$(CONFIG_ASH) += test.o # used by ash
-lib-$(CONFIG_TOUCH) += touch.o
-lib-$(CONFIG_TR) += tr.o
-lib-$(CONFIG_TRUE) += true.o
-lib-$(CONFIG_TTY) += tty.o
-lib-$(CONFIG_UNAME) += uname.o
-lib-$(CONFIG_UNEXPAND) += expand.o
-lib-$(CONFIG_UNIQ) += uniq.o
-lib-$(CONFIG_USLEEP) += usleep.o
-lib-$(CONFIG_UUDECODE) += uudecode.o
-lib-$(CONFIG_UUENCODE) += uuencode.o
-lib-$(CONFIG_WC) += wc.o
-lib-$(CONFIG_WHO) += who.o
-lib-$(CONFIG_WHOAMI) += whoami.o
-lib-$(CONFIG_YES) += yes.o
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_MKFIFO) += getopt_mk_fifo_nod.o
-lib-$(CONFIG_MKNOD) += getopt_mk_fifo_nod.o
-lib-$(CONFIG_INSTALL) += cp_mv_stat.o
-lib-$(CONFIG_CP) += cp_mv_stat.o
-lib-$(CONFIG_MV) += cp_mv_stat.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Debian Utilities"
-
-config MKTEMP
- bool "mktemp"
- default n
- help
- mktemp is used to create unique temporary files
-
-config PIPE_PROGRESS
- bool "pipe_progress"
- default n
- help
- Display a dot to indicate pipe activity.
-
-config RUN_PARTS
- bool "run-parts"
- default n
- help
- run-parts is a utility designed to run all the scripts in a directory.
-
- It is useful to set up a directory like cron.daily, where you need to
- execute all the scripts in that directory.
-
- In this implementation of run-parts some features (such as report mode)
- are not implemented.
-
- Unless you know that run-parts is used in some of your scripts
- you can safely say N here.
-
-config FEATURE_RUN_PARTS_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on RUN_PARTS && GETOPT_LONG
- help
- Support long options for the run-parts applet.
-
-config FEATURE_RUN_PARTS_FANCY
- bool "Support additional arguments"
- default n
- depends on RUN_PARTS
- help
- Support additional options:
- -l --list print the names of the all matching files (not
- limited to executables), but don't actually run them.
-
-config START_STOP_DAEMON
- bool "start-stop-daemon"
- default n
- help
- start-stop-daemon is used to control the creation and
- termination of system-level processes, usually the ones
- started during the startup of the system.
-
-config FEATURE_START_STOP_DAEMON_FANCY
- bool "Support additional arguments"
- default n
- depends on START_STOP_DAEMON
- help
- Support additional arguments.
- -o|--oknodo ignored since we exit with 0 anyway
- -v|--verbose
-
-config FEATURE_START_STOP_DAEMON_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on START_STOP_DAEMON && GETOPT_LONG
- help
- Support long options for the start-stop-daemon applet.
-
-config WHICH
- bool "which"
- default n
- help
- which is used to find programs in your PATH and
- print out their pathnames.
-
-endmenu
-
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_MKTEMP) += mktemp.o
-lib-$(CONFIG_PIPE_PROGRESS) += pipe_progress.o
-lib-$(CONFIG_RUN_PARTS) += run_parts.o
-lib-$(CONFIG_START_STOP_DAEMON) += start_stop_daemon.o
-lib-$(CONFIG_WHICH) += which.o
+++ /dev/null
-#!/usr/bin/perl -w
-
-use strict;
-use Getopt::Long;
-
-# collect lines continued with a '\' into an array
-sub continuation {
- my $fh = shift;
- my @line;
-
- while (<$fh>) {
- my $s = $_;
- $s =~ s/\\\s*$//;
- #$s =~ s/#.*$//;
- push @line, $s;
- last unless (/\\\s*$/);
- }
- return @line;
-}
-
-# regex && eval away unwanted strings from documentation
-sub beautify {
- my $text = shift;
- for (;;) {
- my $text2 = $text;
- $text =~ s/SKIP_\w+\(.*?"\s*\)//sxg;
- $text =~ s/USE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg;
- $text =~ s/USAGE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg;
- last if ( $text2 eq $text );
- }
- $text =~ s/"\s*"//sg;
- my @line = split("\n", $text);
- $text = join('',
- map {
- s/^\s*"//;
- s/"\s*$//;
- s/%/%%/g;
- s/\$/\\\$/g;
- eval qq[ sprintf(qq{$_}) ]
- } @line
- );
- return $text;
-}
-
-# generate POD for an applet
-sub pod_for_usage {
- my $name = shift;
- my $usage = shift;
-
- # Sigh. Fixup the known odd-name applets.
- $name =~ s/dpkg_deb/dpkg-deb/g;
- $name =~ s/fsck_minix/fsck.minix/g;
- $name =~ s/mkfs_minix/mkfs.minix/g;
- $name =~ s/run_parts/run-parts/g;
- $name =~ s/start_stop_daemon/start-stop-daemon/g;
-
- # make options bold
- my $trivial = $usage->{trivial};
- if (!defined $usage->{trivial}) {
- $trivial = "";
- } else {
- $trivial =~ s/(?<!\w)(-\w+)/B<$1>/sxg;
- }
- my @f0 =
- map { $_ !~ /^\s/ && s/(?<!\w)(-\w+)/B<$1>/g; $_ }
- split("\n", (defined $usage->{full} ? $usage->{full} : ""));
-
- # add "\n" prior to certain lines to make indented
- # lines look right
- my @f1;
- my $len = @f0;
- for (my $i = 0; $i < $len; $i++) {
- push @f1, $f0[$i];
- if (($i+1) != $len && $f0[$i] !~ /^\s/ && $f0[$i+1] =~ /^\s/) {
- next if ($f0[$i] =~ /^$/);
- push(@f1, "") unless ($f0[$i+1] =~ /^\s*$/s);
- }
- }
- my $full = join("\n", @f1);
-
- # prepare notes if they exist
- my $notes = (defined $usage->{notes})
- ? "$usage->{notes}\n\n"
- : "";
-
- # prepare examples if they exist
- my $example = (defined $usage->{example})
- ?
- "Example:\n\n" .
- join ("\n",
- map { "\t$_" }
- split("\n", $usage->{example})) . "\n\n"
- : "";
-
- # Pad the name so that the applet name gets a line
- # by itself in BusyBox.txt
- my $spaces = 10 - length($name);
- if ($spaces > 0) {
- $name .= " " x $spaces;
- }
-
- return
- "=item B<$name>".
- "\n\n$name $trivial\n\n".
- "$full\n\n" .
- "$notes" .
- "$example" .
- "\n\n"
- ;
-}
-
-# the keys are applet names, and
-# the values will contain hashrefs of the form:
-#
-# {
-# trivial => "...",
-# full => "...",
-# notes => "...",
-# example => "...",
-# }
-my %docs;
-
-
-# get command-line options
-
-my %opt;
-
-GetOptions(
- \%opt,
- "help|h",
- "pod|p",
- "verbose|v",
-);
-
-if (defined $opt{help}) {
- print
- "$0 [OPTION]... [FILE]...\n",
- "\t--help\n",
- "\t--pod\n",
- "\t--verbose\n",
- ;
- exit 1;
-}
-
-
-# collect documenation into %docs
-
-foreach (@ARGV) {
- open(USAGE, $_) || die("$0: $_: $!");
- my $fh = *USAGE;
- my ($applet, $type, @line);
- while (<$fh>) {
- if (/^#define (\w+)_(\w+)_usage/) {
- $applet = $1;
- $type = $2;
- @line = continuation($fh);
- my $doc = $docs{$applet} ||= { };
- my $text = join("\n", @line);
- $doc->{$type} = beautify($text);
- }
- }
-}
-
-
-# generate structured documentation
-
-my $generator = \&pod_for_usage;
-
-my @names = sort keys %docs;
-my $line = "\t[, [[, ";
-for (my $i = 0; $i < $#names; $i++) {
- if (length ($line.$names[$i]) >= 65) {
- print "$line\n\t";
- $line = "";
- }
- $line .= "$names[$i], ";
-}
-print $line . $names[-1];
-
-print "\n\n=head1 COMMAND DESCRIPTIONS\n";
-print "\n=over 4\n\n";
-
-foreach my $applet (@names) {
- print $generator->($applet, $docs{$applet});
-}
-
-exit 0;
-
-__END__
-
-=head1 NAME
-
-autodocifier.pl - generate docs for busybox based on usage.h
-
-=head1 SYNOPSIS
-
-autodocifier.pl [OPTION]... [FILE]...
-
-Example:
-
- ( cat docs/busybox_header.pod; \
- docs/autodocifier.pl usage.h; \
- cat docs/busybox_footer.pod ) > docs/busybox.pod
-
-=head1 DESCRIPTION
-
-The purpose of this script is to automagically generate
-documentation for busybox using its usage.h as the original source
-for content. It used to be that same content has to be duplicated
-in 3 places in slightly different formats -- F<usage.h>,
-F<docs/busybox.pod>. This was tedious and error-prone, so it was
-decided that F<usage.h> would contain all the text in a
-machine-readable form, and scripts could be used to transform this
-text into other forms if necessary.
-
-F<autodocifier.pl> is one such script. It is based on a script by
-Erik Andersen <andersen@codepoet.org> which was in turn based on a
-script by Mark Whitley <markw@codepoet.org>
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<--help>
-
-This displays the help message.
-
-=item B<--pod>
-
-Generate POD (this is the default)
-
-=item B<--verbose>
-
-Be verbose (not implemented)
-
-=back
-
-=head1 FORMAT
-
-The following is an example of some data this script might parse.
-
- #define length_trivial_usage \
- "STRING"
- #define length_full_usage \
- "Prints out the length of the specified STRING."
- #define length_example_usage \
- "$ length Hello\n" \
- "5\n"
-
-Each entry is a cpp macro that defines a string. The macros are
-named systematically in the form:
-
- $name_$type_usage
-
-$name is the name of the applet. $type can be "trivial", "full", "notes",
-or "example". Every documentation macro must end with "_usage".
-
-The definition of the types is as follows:
-
-=over 4
-
-=item B<trivial>
-
-This should be a brief, one-line description of parameters that
-the command expects. This will be displayed when B<-h> is issued to
-a command. I<REQUIRED>
-
-=item B<full>
-
-This should contain descriptions of each option. This will also
-be displayed along with the trivial help if CONFIG_FEATURE_TRIVIAL_HELP
-is disabled. I<REQUIRED>
-
-=item B<notes>
-
-This is documentation that is intended to go in the POD or SGML, but
-not be printed when a B<-h> is given to a command. To see an example
-of notes being used, see init_notes_usage in F<usage.h>. I<OPTIONAL>
-
-=item B<example>
-
-This should be an example of how the command is actually used.
-This will not be printed when a B<-h> is given to a command -- it
-will only be included in the POD or SGML documentation. I<OPTIONAL>
-
-=back
-
-=head1 FILES
-
-F<usage.h>
-
-=head1 COPYRIGHT
-
-Copyright (c) 2001 John BEPPU. All rights reserved. This program is
-free software; you can redistribute it and/or modify it under the same
-terms as Perl itself.
-
-=head1 AUTHOR
-
-John BEPPU <b@ax9.org>
-
-=cut
-
+++ /dev/null
-<!--#include file="header.html" -->
-
-<h3>Frequently Asked Questions</h3>
-
-This is a collection of some of the more frequently asked questions
-about BusyBox. Some of the questions even have answers. If you
-have additions to this FAQ document, we would love to add them,
-
-<h2>General questions</h2>
-<ol>
-<li><a href="#getting_started">How can I get started using BusyBox?</a></li>
-<li><a href="#configure">How do I configure busybox?</a></li>
-<li><a href="#build">How do I build BusyBox with a cross-compiler?</a></li>
-<li><a href="#build_system">How do I build a BusyBox-based system?</a></li>
-<li><a href="#kernel">Which Linux kernel versions are supported?</a></li>
-<li><a href="#arch">Which architectures does BusyBox run on?</a></li>
-<li><a href="#libc">Which C libraries are supported?</a></li>
-<li><a href="#commercial">Can I include BusyBox as part of the software on my device?</a></li>
-<li><a href="#external">Where can I find other small utilities since busybox does not include the features I want?</a></li></li>
-<li><a href="#demanding">I demand that you to add <favorite feature> right now! How come you don't answer all my questions on the mailing list instantly? I demand that you help me with all of my problems <em>Right Now</em>!</a></li>
-<li><a href="#helpme">I need help with BusyBox! What should I do?</a></li>
-<li><a href="#contracts">I need you to add <favorite feature>! Are the BusyBox developers willing to be paid in order to fix bugs or add in <favorite feature>? Are you willing to provide support contracts?</a></li>
-</ol>
-
-<h2>Troubleshooting</h2>
-<ol>
-<li><a href="#bugs">I think I found a bug in BusyBox! What should I do?!</a></li>
-<li><a href="#backporting">I'm using an ancient version from the dawn of time and something's broken. Can you backport fixes for free?</a></li>
-<li><a href="#init">Busybox init isn't working!</a></li>
-<li><a href="#sed">I can't configure busybox on my system.</a></li>
-<li><a href="#job_control">Why do I keep getting "sh: can't access tty; job control turned off" errors? Why doesn't Control-C work within my shell?</a></li>
-</ol>
-
-<h2>Misc. questions</h2>
-<ol>
- <li><a href="#tz">How do I change the time zone in busybox?</a></li>
-</ol>
-
-<h2>Programming questions</h2>
-<ol>
- <li><a href="#goals">What are the goals of busybox?</a></li>
- <li><a href="#design">What is the design of busybox?</a></li>
- <li><a href="#source">How is the source code organized?</a></li>
- <ul>
- <li><a href="#source_applets">The applet directories.</a></li>
- <li><a href="#source_libbb">The busybox shared library (libbb)</a></li>
- </ul>
- <li><a href="#optimize">I want to make busybox even smaller, how do I go about it?</a></li>
- <li><a href="#adding">Adding an applet to busybox</a></li>
- <li><a href="#standards">What standards does busybox adhere to?</a></li>
- <li><a href="#portability">Portability.</a></li>
- <li><a href="#tips">Tips and tricks.</a></li>
- <ul>
- <li><a href="#tips_encrypted_passwords">Encrypted Passwords</a></li>
- <li><a href="#tips_vfork">Fork and vfork</a></li>
- <li><a href="#tips_short_read">Short reads and writes</a></li>
- <li><a href="#tips_memory">Memory used by relocatable code, PIC, and static linking.</a></li>
- <li><a href="#tips_kernel_headers">Including Linux kernel headers.</a></li>
- </ul>
- <li><a href="#who">Who are the BusyBox developers?</a></li>
- </ul>
-</ol>
-
-
-<hr />
-<h1>General questions</h1>
-
-<hr />
-<h2><a name="getting_started">How can I get started using BusyBox?</a></h2>
-
-<p> If you just want to try out busybox without installing it, download the
- tarball, extract it, run "make defconfig", and then run "make".
-</p>
-<p>
- This will create a busybox binary with almost all features enabled. To try
- out a busybox applet, type "./busybox [appletname] [options]", for
- example "./busybox ls -l" or "./busybox cat LICENSE". Type "./busybox"
- to see a command list, and "busybox appletname --help" to see a brief
- usage message for a given applet.
-</p>
-<p>
- BusyBox uses the name it was invoked under to determine which applet is
- being invoked. (Try "mv busybox ls" and then "./ls -l".) Installing
- busybox consists of creating symlinks (or hardlinks) to the busybox
- binary for each applet in busybox, and making sure these links are in
- the shell's command $PATH. The special applet name "busybox" (or with
- any optional suffix, such as "busybox-static") uses the first argument
- to determine which applet to run, as shown above.
-</p>
-<p>
- BusyBox also has a feature called the
- <a name="standalone_shell">"standalone shell"</a>, where the busybox
- shell runs any built-in applets before checking the command path. This
- feature is also enabled by "make allyesconfig", and to try it out run
- the command line "PATH= ./busybox ash". This will blank your command path
- and run busybox as your command shell, so the only commands it can find
- (without an explicit path such as /bin/ls) are the built-in busybox ones.
- This is another good way to see what's built into busybox.
- Note that the standalone shell requires CONFIG_BUSYBOX_EXEC_PATH
- to be set appropriately, depending on whether or not /proc/self/exe is
- available or not. If you do not have /proc, then point that config option
- to the location of your busybox binary, usually /bin/busybox.
- (So if you set it to /proc/self/exe, and happen to be able to chroot into
- your rootfs, you must mount /proc beforehand.)
-</p>
-<p>
- A typical indication that you set CONFIG_BUSYBOX_EXEC_PATH to proc but
- forgot to mount proc is:
-<pre>
-$ /bin/echo $PATH
-/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
-$ echo $PATH
-/bin/sh: echo: not found
-</pre>
-
-<hr />
-<h2><a name="configure">How do I configure busybox?</a></h2>
-
-<p> Busybox is configured similarly to the linux kernel. Create a default
- configuration and then run "make menuconfig" to modify it. The end
- result is a .config file that tells the busybox build process what features
- to include. So instead of "./configure; make; make install" the equivalent
- busybox build would be "make defconfig; make; make install".
-</p>
-
-<p> Busybox configured with all features enabled is a little under a megabyte
- dynamically linked on x86. To create a smaller busybox, configure it with
- fewer features. Individual busybox applets cost anywhere from a few
- hundred bytes to tens of kilobytes. Disable unneeded applets to save,
- space, using menuconfig.
-</p>
-
-<p>The most important busybox configurators are:</p>
-
-<ul>
-<li><p>make <b>defconfig</b> - Create the maximum "sane" configuration. This
-enables almost all features, minus things like debugging options and features
-that require changes to the rest of the system to work (such as selinux or
-devfs device names). Use this if you want to start from a full-featured
-busybox and remove features until it's small enough.</p></li>
-<li><p>make <b>allnoconfig</b> - Disable everything. This creates a tiny version
-of busybox that doesn't do anything. Start here if you know exactly what
-you want and would like to select only those features.</p></li>
-<li><p>make <b>menuconfig</b> - Interactively modify a .config file through a
-multi-level menu interface. Use this after one of the previous two.</p></li>
-</ul>
-
-<p>Some other configuration options are:</p>
-<ul>
-<li><p>make <b>oldconfig</b> - Update an old .config file for a newer version
-of busybox.</p></li>
-<li><p>make <b>allyesconfig</b> - Select absolutely everything. This creates
-a statically linked version of busybox full of debug code, with dependencies on
-selinux, using devfs names... This makes sure everything compiles. Whether
-or not the result would do anything useful is an open question.</p></li>
-<li><p>make <b>allbareconfig</b> - Select all applets but disable all sub-features
-within each applet. More build coverage testing.</p></li>
-<li><p>make <b>randconfig</b> - Create a random configuration for test purposes.</p></li>
-</ul>
-
-<p> Menuconfig modifies your .config file through an interactive menu where you can enable or disable
- busybox features, and get help about each feature.
-
-<p>
- To build a smaller busybox binary, run "make menuconfig" and disable the
- features you don't need. (Or run "make allnoconfig" and then use
- menuconfig to add just the features you need. Don't forget to recompile
- with "make" once you've finished configuring.)
-</p>
-
-<hr />
-<h2><a name="build">How do I build BusyBox with a cross-compiler?</a></h2>
-
-<p>
- To build busybox with a cross-compiler, specify CROSS_COMPILE=<prefix>.
-</p>
-<p>
- CROSS_COMPILE specifies the prefix used for all executables used
- during compilation. Only gcc and related binutils executables
- are prefixed with $(CROSS_COMPILE) in the makefiles.
- CROSS_COMPILE can be set on the command line:
-<pre>
- make CROSS_COMPILE=arm-linux-uclibcgnueabi-
-</pre>
- Alternatively CROSS_COMPILE can be set in the environment.
- Default value for CROSS_COMPILE is not to prefix executables.
-</p>
-
-<hr />
-<h2><a name="build_system">How do I build a BusyBox-based system?</a></h2>
-
-<p>
- BusyBox is a package that replaces a dozen standard packages, but it is
- not by itself a complete bootable system. Building an entire Linux
- distribution from source is a bit beyond the scope of this FAQ, but it
- understandably keeps cropping up on the mailing list, so here are some
- pointers.
-</p>
-<p>
- Start by learning how to strip a working system down to the bare essentials
- needed to run one or two commands, so you know what it is you actually
- need. An excellent practical place to do
- this is the <a href="http://www.tldp.org/HOWTO/Bootdisk-HOWTO/">Linux
- BootDisk Howto</a>, or for a more theoretical approach try
- <a href="http://www.tldp.org/HOWTO/From-PowerUp-To-Bash-Prompt-HOWTO.html">From
- PowerUp to Bash Prompt</a>.
-</p>
-<p>
- To learn how to build a working Linux system entirely from source code,
- the place to go is the <a href="http://www.linuxfromscratch.org">Linux
- From Scratch</a> project. They have an entire book of step-by-step
- instructions you can
- <a href="http://www.linuxfromscratch.org/lfs/view/stable/">read online</a>
- or
- <a href="http://www.linuxfromscratch.org/lfs/downloads/stable/">download</a>.
- Be sure to check out the other sections of their main page, including
- Beyond Linux From Scratch, Hardened Linux From Scratch, their Hints
- directory, and their LiveCD project. (They also have mailing lists which
- are better sources of answers to Linux-system building questions than
- the busybox list.)
-</p>
-<p>
- If you want an automated yet customizable system builder which produces
- a BusyBox and uClibc based system, try
- <a href="http://buildroot.uclibc.org">buildroot</a>, which is
- another project by the maintainer of the uClibc (Erik Andersen).
- Download the tarball, extract it, unset CC, make.
- For more instructions, see the website.
-</p>
-
-<hr />
-<h2><a name="kernel">Which Linux kernel versions are supported?</a></h2>
-
-<p>
- Full functionality requires Linux 2.4.x or better. (Earlier versions may
- still work, but are no longer regularly tested.) A large fraction of the
- code should run on just about anything. While the current code is fairly
- Linux specific, it should be fairly easy to port the majority of the code
- to support, say, FreeBSD or Solaris, or Mac OS X, or even Windows (if you
- are into that sort of thing).
-</p>
-
-<hr />
-<h2><a name="arch">Which architectures does BusyBox run on?</a></h2>
-
-<p>
- BusyBox in general will build on any architecture supported by gcc.
- Kernel module loading for 2.4 Linux kernels is currently
- limited to ARM, CRIS, H8/300, x86, ia64, x86_64, m68k, MIPS, PowerPC,
- S390, SH3/4/5, Sparc, v850e, and x86_64 for 2.4.x kernels.
-</p>
-<p>
- With 2.6.x kernels, module loading support should work on all architectures.
-</p>
-
-<hr />
-<h2><a name="libc">Which C libraries are supported?</a></h2>
-
-<p>
- On Linux, BusyBox releases are tested against uClibc (0.9.27 or later) and
- glibc (2.2 or later). Both should provide full functionality with busybox,
- and if you find a bug we want to hear about it.
-</p>
-<p>
- Linux-libc5 is no longer maintained (and has no known advantages over
- uClibc), dietlibc is known to have numerous unfixed bugs, and klibc is
- missing too many features to build BusyBox. If you require a small C
- library for Linux, the busybox developers recommend uClibc.
-</p>
-<p>
- Some BusyBox applets have been built and run under a combination
- of newlib and libgloss (see
- <a href="http://www.busybox.net/lists/busybox/2005-March/013759.html">this thread</a>).
- This is still experimental, but may be supported in a future release.
-</p>
-
-<hr />
-<h2><a name="commercial">Can I include BusyBox as part of the software on my device?</a></h2>
-
-<p>
- Yes. As long as you <a href="http://busybox.net/license.html">fully comply
- with the generous terms of the GPL BusyBox license</a> you can ship BusyBox
- as part of the software on your device.
-</p>
-
-<hr />
-<h2><a name="external">Where can I find other small utilities since busybox
- does not include the features i want?</a></h2>
-
-<p>
- we maintain such a <a href="tinyutils.html">list</a> on this site!
-</p>
-
-<hr />
-<h2><a name="demanding">I demand that you to add <favorite feature> right now! How come you don't answer all my questions on the mailing list instantly? I demand that you help me with all of my problems <em>Right Now</em>!</a></h2>
-
-<p>
- You have not paid us a single cent and yet you still have the product of
- many years of our work. We are not your slaves! We work on BusyBox
- because we find it useful and interesting. If you go off flaming us, we
- will ignore you.
-
-<hr />
-<h2><a name="helpme">I need help with BusyBox! What should I do?</a></h2>
-
-<p>
- If you find that you need help with BusyBox, you can ask for help on the
- BusyBox mailing list at busybox@busybox.net.</p>
-
-<p> In addition to the mailing list, Erik Andersen (andersee), Manuel Nova
- (mjn3), Rob Landley (landley), Mike Frysinger (SpanKY), Bernhard Fischer
- (blindvt), and other long-time BusyBox developers are known to hang out
- on the uClibc IRC channel: #uclibc on irc.freenode.net. There is a
- <a href="http://ibot.Rikers.org/%23uclibc/">web archive of
- daily logs of the #uclibc IRC channel</a> going back to 2002.
-</p>
-
-<p>
- <b>Please do not send private email to Rob, Erik, Manuel, or the other
- BusyBox contributors asking for private help unless you are planning on
- paying for consulting services.</b>
-</p>
-
-<p>
- When we answer questions on the BusyBox mailing list, it helps everyone
- since people with similar problems in the future will be able to get help
- by searching the mailing list archives. Private help is reserved as a paid
- service. If you need to use private communication, or if you are serious
- about getting timely assistance with BusyBox, you should seriously consider
- paying for consulting services.
-</p>
-
-<hr />
-<h2><a name="contracts">I need you to add <favorite feature>! Are the BusyBox developers willing to be paid in order to fix bugs or add in <favorite feature>? Are you willing to provide support contracts?</a></h2>
-
-<p>
- Yes we are. The easy way to sponsor a new feature is to post an offer on
- the mailing list to see who's interested. You can also email the project's
- maintainer and ask them to recommend someone.
-</p>
-
-<p> If you prefer to deal with an organization rather than an individual, Rob
- Landley (the current BusyBox maintainer) works for
- <a http://www.timesys.com>TimeSys</a>, and Eric Andersen (the previous
- busybox maintainer and current uClibc maintainer) owns
- <a href="http://codepoet-consulting.com/">CodePoet Consulting</a>. Both
- companies offer support contracts and handle new development, and there
- are plenty of other companies that do the same.
-</p>
-
-
-<hr />
-<h1>Troubleshooting</h1>
-
-<hr />
-<h2><a name="bugs">I think I found a bug in BusyBox! What should I do?</a></h2>
-
-<p>
- If you simply need help with using or configuring BusyBox, please submit a
- detailed description of your problem to the BusyBox mailing list at <a
- href="mailto:busybox@busybox.net"> busybox@busybox.net</a>.
- Please do not send email to individual developers asking
- for private help unless you are planning on paying for consulting services.
- When we answer questions on the BusyBox mailing list, it helps everyone,
- while private answers help only you...
-</p>
-
-<p>
- Bug reports and new feature patches sometimes get lost when posted to the
- mailing list, because the developers of BusyBox are busy people and have
- only so much they can keep in their brains at a time. You can post a
- polite reminder after 2-3 days without offending anybody. If that doesn't
- result in a solution, please use the
- <a href="http://bugs.busybox.net/">BusyBox Bug
- and Patch Tracking System</a> to submit a detailed explanation and we'll
- get to it as soon as we can.
-</p>
-
-<p>
- Note that bugs entered into the bug system without being mentioned on the
- mailing list first may languish there for months before anyone even notices
- them. We generally go through the bug system when preparing for new
- development releases, to see what fell through the cracks while we were
- off writing new features. (It's a fast/unreliable vs slow/reliable thing.
- Saves retransits, but the latency sucks.)
-</p>
-
-<hr />
-<h2><a name="backporting">I'm using an ancient version from the dawn of time and something's broken. Can you backport fixes for free?</h2>
-
-<p>Variants of this one get asked a lot.</p>
-
-<p>The purpose of the BusyBox mailing list is to develop and improve BusyBox,
-and we're happy to respond to our users' needs. But if you're coming to the
-list for free tech support we're going to ask you to upgrade to a current
-version before we try to diagnose your problem.</p>
-
-<p>If you're building BusyBox 0.50 with uClibc 0.9.19 and gcc 0.9.26 there's a
-fairly large chance that whatever problem you're seeing has already been fixed.
-To get that fix, all you have to do is upgrade to a newer version. If you
-don't at least _try_ that, you're wasting our time.</p>
-
-<p>The volunteers are happy to fix any bugs you point out in the current
-versions because doing so helps everybody and makes the project better. We
-want to make the current version work for you. But diagnosing, debugging, and
-backporting fixes to old versions isn't something we do for free, because it
-doesn't help anybody but you. The cost of volunteer tech support is using a
-reasonably current version of the project.</p>
-
-<p>If you don't want to upgrade, you have the complete source code and thus
-the ability to fix it yourself, or hire a consultant to do it for you. If you
-got your version from a vendor who still supports the older version, they can
-help you. But there are limits as to what the volunteers will feel obliged to
-do for you.</p>
-
-<p>As a rule of thumb, volunteers will generally answer polite questions about
-a given version for about three years after its release before it's so old
-we don't remember the answer off the top of our head. And if you want us to
-put any _effort_ into tracking it down, we want you to put in a little effort
-of your own by confirming it's still a problem with the current version. It's
-also hard for us to fix a problem of yours if we can't reproduce it because
-we don't have any systems running an environment that old.</p>
-
-<p>A consultant will happily set up a special environment just to reproduce
-your problem, and you can always ask on the list if any of the developers
-have consulting rates.</p>
-
-<hr />
-<h2><a name="init">Busybox init isn't working!</a></h2>
-
-<p>
- Init is the first program that runs, so it might be that no programs are
- working on your new system because of a problem with your cross-compiler,
- kernel, console settings, shared libraries, root filesystem... To rule all
- that out, first build a statically linked version of the following "hello
- world" program with your cross compiler toolchain:
-</p>
-<pre>
-#include <stdio.h>
-
-int main(int argc, char *argv)
-{
- printf("Hello world!\n");
- sleep(999999999);
-}
-</pre>
-
-<p>
- Now try to boot your device with an "init=" argument pointing to your
- hello world program. Did you see the hello world message? Until you
- do, don't bother messing with busybox init.
-</p>
-
-<p>
- Once you've got it working statically linked, try getting it to work
- dynamically linked. Then read the FAQ entry <a href="#build_system">How
- do I build a BusyBox-based system?</a>, and the
- <a href="/downloads/BusyBox.html#item_init">documentation for BusyBox
- init</a>.
-</p>
-
-<hr />
-<h2><a name="sed">I can't configure busybox on my system.</a></h2>
-
-<p>
- Configuring Busybox depends on a recent version of sed. Older
- distributions (Red Hat 7.2, Debian 3.0) may not come with a
- usable version. Luckily BusyBox can use its own sed to configure itself,
- although this leads to a bit of a chicken and egg problem.
- You can work around this by hand-configuring busybox to build with just
- sed, then putting that sed in your path to configure the rest of busybox
- with, like so:
-</p>
-
-<pre>
- tar xvjf sources/busybox-x.x.x.tar.bz2
- cd busybox-x.x.x
- make allnoconfig
- make include/bb_config.h
- echo "CONFIG_SED=y" >> .config
- echo "#undef ENABLE_SED" >> include/bb_config.h
- echo "#define ENABLE_SED 1" >> include/bb_config.h
- make
- mv busybox sed
- export PATH=`pwd`:"$PATH"
-</pre>
-
-<p>Then you can run "make defconfig" or "make menuconfig" normally.</p>
-
-<hr />
-<h2><a name="job_control">Why do I keep getting "sh: can't access tty; job control turned off" errors? Why doesn't Control-C work within my shell?</a></h2>
-
-<p>
- Job control will be turned off since your shell can not obtain a controlling
- terminal. This typically happens when you run your shell on /dev/console.
- The kernel will not provide a controlling terminal on the /dev/console
- device. Your should run your shell on a normal tty such as tty1 or ttyS0
- and everything will work perfectly. If you <em>REALLY</em> want your shell
- to run on /dev/console, then you can hack your kernel (if you are into that
- sortof thing) by changing drivers/char/tty_io.c to change the lines where
- it sets "noctty = 1;" to instead set it to "0". I recommend you instead
- run your shell on a real console...
-</p>
-
-<hr />
-<h1>Misc. questions</h1>
-
-<hr />
-<h2><a name="tz">How do I change the time zone in busybox?</a></h2>
-
-<p>Busybox has nothing to do with the timezone. Please consult your libc
-documentation. (<a href='http://google.com/search?q=uclibc+glibc+timezone'>http://google.com/search?q=uclibc+glibc+timezone</a>).</p>
-
-<hr />
-<h1>Development</h1>
-
-<hr />
-<h2><a name="goals">What are the goals of busybox?</a></h2>
-
-<p>Busybox aims to be the smallest and simplest correct implementation of the
-standard Linux command line tools. First and foremost, this means the
-smallest executable size we can manage. We also want to have the simplest
-and cleanest implementation we can manage, be <a href="#standards">standards
-compliant</a>, minimize run-time memory usage (heap and stack), run fast, and
-take over the world.</p>
-
-<hr />
-<h2><a name="design">What is the design of busybox?</a></h2>
-
-<p>Busybox is like a swiss army knife: one thing with many functions.
-The busybox executable can act like many different programs depending on
-the name used to invoke it. Normal practice is to create a bunch of symlinks
-pointing to the busybox binary, each of which triggers a different busybox
-function. (See <a href="FAQ.html#getting_started">getting started</a> in the
-FAQ for more information on usage, and <a href="BusyBox.html">the
-busybox documentation</a> for a list of symlink names and what they do.)
-
-<p>The "one binary to rule them all" approach is primarily for size reasons: a
-single multi-purpose executable is smaller then many small files could be.
-This way busybox only has one set of ELF headers, it can easily share code
-between different apps even when statically linked, it has better packing
-efficiency by avoding gaps between files or compression dictionary resets,
-and so on.</p>
-
-<p>Work is underway on new options such as "make standalone" to build separate
-binaries for each applet, and a "libbb.so" to make the busybox common code
-available as a shared library. Neither is ready yet at the time of this
-writing.</p>
-
-<a name="source"></a>
-
-<hr />
-<h2><a name="source_applets">The applet directories</a></h2>
-
-<p>The directory "applets" contains the busybox startup code (applets.c and
-busybox.c), and several subdirectories containing the code for the individual
-applets.</p>
-
-<p>Busybox execution starts with the main() function in applets/busybox.c,
-which sets the global variable applet_name to argv[0] and calls
-run_applet_and_exit() in applets/applets.c. That uses the applets[] array
-(defined in include/busybox.h and filled out in include/applets.h) to
-transfer control to the appropriate APPLET_main() function (such as
-cat_main() or sed_main()). The individual applet takes it from there.</p>
-
-<p>This is why calling busybox under a different name triggers different
-functionality: main() looks up argv[0] in applets[] to get a function pointer
-to APPLET_main().</p>
-
-<p>Busybox applets may also be invoked through the multiplexor applet
-"busybox" (see busybox_main() in libbb/appletlib.c), and through the
-standalone shell (grep for STANDALONE_SHELL in applets/shell/*.c).
-See <a href="FAQ.html#getting_started">getting started</a> in the
-FAQ for more information on these alternate usage mechanisms, which are
-just different ways to reach the relevant APPLET_main() function.</p>
-
-<p>The applet subdirectories (archival, console-tools, coreutils,
-debianutils, e2fsprogs, editors, findutils, init, loginutils, miscutils,
-modutils, networking, procps, shell, sysklogd, and util-linux) correspond
-to the configuration sub-menus in menuconfig. Each subdirectory contains the
-code to implement the applets in that sub-menu, as well as a Config.in
-file defining that configuration sub-menu (with dependencies and help text
-for each applet), and the makefile segment (Makefile.in) for that
-subdirectory.</p>
-
-<p>The run-time --help is stored in usage_messages[], which is initialized at
-the start of applets/applets.c and gets its help text from usage.h. During the
-build this help text is also used to generate the BusyBox documentation (in
-html, txt, and man page formats) in the docs directory. See
-<a href="#adding">adding an applet to busybox</a> for more
-information.</p>
-
-<hr />
-<h2><a name="source_libbb"><b>libbb</b></a></h2>
-
-<p>Most non-setup code shared between busybox applets lives in the libbb
-directory. It's a mess that evolved over the years without much auditing
-or cleanup. For anybody looking for a great project to break into busybox
-development with, documenting libbb would be both incredibly useful and good
-experience.</p>
-
-<p>Common themes in libbb include allocation functions that test
-for failure and abort the program with an error message so the caller doesn't
-have to test the return value (xmalloc(), xstrdup(), etc), wrapped versions
-of open(), close(), read(), and write() that test for their own failures
-and/or retry automatically, linked list management functions (llist.c),
-command line argument parsing (getopt32.c), and a whole lot more.</p>
-
-<hr />
-<h2><a name="optimize">I want to make busybox even smaller, how do I go about it?</a></h2>
-
-<p>
- To conserve bytes it's good to know where they're being used, and the
- size of the final executable isn't always a reliable indicator of
- the size of the components (since various structures are rounded up,
- so a small change may not even be visible by itself, but many small
- savings add up).
-</p>
-
-<p> The busybox Makefile builds two versions of busybox, one of which
- (busybox_unstripped) has extra information that various analysis tools
- can use. (This has nothing to do with CONFIG_DEBUG, leave that off
- when trying to optimize for size.)
-</p>
-
-<p> The <b>"make bloatcheck"</b> option uses Matt Mackall's bloat-o-meter
- script to compare two versions of busybox (busybox_unstripped vs
- busybox_old), and report which symbols changed size and by how much.
- To use it, first build a base version with <b>"make baseline"</b>.
- (This creates busybox_old, which should have the original sizes for
- comparison purposes.) Then build the new version with your changes
- and run "make bloatcheck" to see the size differences from the old
- version.
-</p>
-<p>
- The first line of output has totals: how many symbols were added or
- removed, how many symbols grew or shrank, the number of bytes added
- and number of bytes removed by these changes, and finally the total
- number of bytes difference between the two files. The remaining
- lines show each individual symbol, the old and new sizes, and the
- increase or decrease in size (which results are sorted by).
-</p>
-<p>
- The <b>"make sizes"</b> option produces raw symbol size information for
- busybox_unstripped. This is the output from the "nm --size-sort"
- command (see "man nm" for more information), and is the information
- bloat-o-meter parses to produce the comparison report above. For
- defconfig, this is a good way to find the largest symbols in the tree
- (which is a good place to start when trying to shrink the code). To
- take a closer look at individual applets, configure busybox with just
- one applet (run "make allnoconfig" and then switch on a single applet
- with menuconfig), and then use "make sizes" to see the size of that
- applet's components.
-</p>
-<p>
- The "showasm" command (in the scripts directory) produces an assembly
- dump of a function, providing a closer look at what changed. Try
- "scripts/showasm busybox_unstripped" to list available symbols, and
- "scripts/showasm busybox_unstripped symbolname" to see the assembly
- for a sepecific symbol.
-</p>
-
-<hr />
-<h2><a name="adding">Adding an applet to busybox</a></h2>
-
-<p>To add a new applet to busybox, first pick a name for the applet and
-a corresponding CONFIG_NAME. Then do this:</p>
-
-<ul>
-<li>Figure out where in the busybox source tree your applet best fits,
-and put your source code there. Be sure to use APPLET_main() instead
-of main(), where APPLET is the name of your applet.</li>
-
-<li>Add your applet to the relevant Config.in file (which file you add
-it to determines where it shows up in "make menuconfig"). This uses
-the same general format as the linux kernel's configuration system.</li>
-
-<li>Add your applet to the relevant Makefile.in file (in the same
-directory as the Config.in you chose), using the existing entries as a
-template and the same CONFIG symbol as you used for Config.in. (Don't
-forget "needlibm" or "needcrypt" if your applet needs libm or
-libcrypt.)</li>
-
-<li>Add your applet to "include/applets.h", using one of the existing
-entries as a template. (Note: this is in alphabetical order. Applets
-are found via binary search, and if you add an applet out of order it
-won't work.)</li>
-
-<li>Add your applet's runtime help text to "include/usage.h". You need
-at least appname_trivial_usage (the minimal help text, always included
-in the busybox binary when this applet is enabled) and appname_full_usage
-(extra help text included in the busybox binary with
-CONFIG_FEATURE_VERBOSE_USAGE is enabled), or it won't compile.
-The other two help entry types (appname_example_usage and
-appname_notes_usage) are optional. They don't take up space in the binary,
-but instead show up in the generated documentation (BusyBox.html,
-BusyBox.txt, and the man page BusyBox.1).</li>
-
-<li>Run menuconfig, switch your applet on, compile, test, and fix the
-bugs. Be sure to try both "allyesconfig" and "allnoconfig" (and
-"allbareconfig" if relevant).</li>
-
-</ul>
-
-<hr />
-<h2><a name="standards">What standards does busybox adhere to?</a></h2>
-
-<p>The standard we're paying attention to is the "Shell and Utilities"
-portion of the <a href="http://www.opengroup.org/onlinepubs/009695399/">Open
-Group Base Standards</a> (also known as the Single Unix Specification version
-3 or SUSv3). Note that paying attention isn't necessarily the same thing as
-following it.</p>
-
-<p>SUSv3 doesn't even mention things like init, mount, tar, or losetup, nor
-commonly used options like echo's '-e' and '-n', or sed's '-i'. Busybox is
-driven by what real users actually need, not the fact the standard believes
-we should implement ed or sccs. For size reasons, we're unlikely to include
-much internationalization support beyond UTF-8, and on top of all that, our
-configuration menu lets developers chop out features to produce smaller but
-very non-standard utilities.</p>
-
-<p>Also, Busybox is aimed primarily at Linux. Unix standards are interesting
-because Linux tries to adhere to them, but portability to dozens of platforms
-is only interesting in terms of offering a restricted feature set that works
-everywhere, not growing dozens of platform-specific extensions. Busybox
-should be portable to all hardware platforms Linux supports, and any other
-similar operating systems that are easy to do and won't require much
-maintenance.</p>
-
-<p>In practice, standards compliance tends to be a clean-up step once an
-applet is otherwise finished. When polishing and testing a busybox applet,
-we ensure we have at least the option of full standards compliance, or else
-document where we (intentionally) fall short.</p>
-
-<hr />
-<h2><a name="portability">Portability.</a></h2>
-
-<p>Busybox is a Linux project, but that doesn't mean we don't have to worry
-about portability. First of all, there are different hardware platforms,
-different C library implementations, different versions of the kernel and
-build toolchain... The file "include/platform.h" exists to centralize and
-encapsulate various platform-specific things in one place, so most busybox
-code doesn't have to care where it's running.</p>
-
-<p>To start with, Linux runs on dozens of hardware platforms. We try to test
-each release on x86, x86-64, arm, power pc, and mips. (Since qemu can handle
-all of these, this isn't that hard.) This means we have to care about a number
-of portability issues like endianness, word size, and alignment, all of which
-belong in platform.h. That header handles conditional #includes and gives
-us macros we can use in the rest of our code. At some point in the future
-we might grow a platform.c, possibly even a platform subdirectory. As long
-as the applets themselves don't have to care.</p>
-
-<p>On a related note, we made the "default signedness of char varies" problem
-go away by feeding the compiler -funsigned-char. This gives us consistent
-behavior on all platforms, and defaults to 8-bit clean text processing (which
-gets us halfway to UTF-8 support). NOMMU support is less easily separated
-(see the tips section later in this document), but we're working on it.</p>
-
-<p>Another type of portability is build environments: we unapologetically use
-a number of gcc and glibc extensions (as does the Linux kernel), but these have
-been picked up by packages like uClibc, TCC, and Intel's C Compiler. As for
-gcc, we take advantage of newer compiler optimizations to get the smallest
-possible size, but we also regression test against an older build environment
-using the Red Hat 9 image at "http://busybox.net/downloads/qemu". This has a
-2.4 kernel, gcc 3.2, make 3.79.1, and glibc 2.3, and is the oldest
-build/deployment environment we still put any effort into maintaining. (If
-anyone takes an interest in older kernels you're welcome to submit patches,
-but the effort would probably be better spent
-<a href="http://www.selenic.com/linux-tiny/">trimming
-down the 2.6 kernel</a>.) Older gcc versions than that are uninteresting since
-we now use c99 features, although
-<a href="http://fabrice.bellard.free.fr/tcc/">tcc</a> might be worth a
-look.</p>
-
-<p>We also test busybox against the current release of uClibc. Older versions
-of uClibc aren't very interesting (they were buggy, and uClibc wasn't really
-usable as a general-purpose C library before version 0.9.26 anyway).</p>
-
-<p>Other unix implementations are mostly uninteresting, since Linux binaries
-have become the new standard for portable Unix programs. Specifically,
-the ubiquity of Linux was cited as the main reason the Intel Binary
-Compatability Standard 2 died, by the standards group organized to name a
-successor to ibcs2: <a href="http://www.telly.org/86open/">the 86open
-project</a>. That project disbanded in 1999 with the endorsement of an
-existing standard: Linux ELF binaries. Since then, the major players at the
-time (such as <a
-href=http://www-03.ibm.com/servers/aix/products/aixos/linux/index.html>AIX</a>, <a
-href=http://www.sun.com/software/solaris/ds/linux_interop.jsp#3>Solaris</a>, and
-<a href=http://www.onlamp.com/pub/a/bsd/2000/03/17/linuxapps.html>FreeBSD</a>)
-have all either grown Linux support or folded.</p>
-
-<p>The major exceptions are newcomer MacOS X, some embedded environments
-(such as newlib+libgloss) which provide a posix environment but not a full
-Linux environment, and environments like Cygwin that provide only partial Linux
-emulation. Also, some embedded Linux systems run a Linux kernel but amputate
-things like the /proc directory to save space.</p>
-
-<p>Supporting these systems is largely a question of providing a clean subset
-of BusyBox's functionality -- whichever applets can easily be made to
-work in that environment. Annotating the configuration system to
-indicate which applets require which prerequisites (such as procfs) is
-also welcome. Other efforts to support these systems (swapping #include
-files to build in different environments, adding adapter code to platform.h,
-adding more extensive special-case supporting infrastructure such as mount's
-legacy mtab support) are handled on a case-by-case basis. Support that can be
-cleanly hidden in platform.h is reasonably attractive, and failing that
-support that can be cleanly separated into a separate conditionally compiled
-file is at least worth a look. Special-case code in the body of an applet is
-something we're trying to avoid.</p>
-
-<hr />
-<h2><a name="tips" />Programming tips and tricks.</a></h2>
-
-<p>Various things busybox uses that aren't particularly well documented
-elsewhere.</p>
-
-<hr />
-<h2><a name="tips_encrypted_passwords">Encrypted Passwords</a></h2>
-
-<p>Password fields in /etc/passwd and /etc/shadow are in a special format.
-If the first character isn't '$', then it's an old DES style password. If
-the first character is '$' then the password is actually three fields
-separated by '$' characters:</p>
-<pre>
- <b>$type$salt$encrypted_password</b>
-</pre>
-
-<p>The "type" indicates which encryption algorithm to use: 1 for MD5 and 2 for SHA1.</p>
-
-<p>The "salt" is a bunch of ramdom characters (generally 8) the encryption
-algorithm uses to perturb the password in a known and reproducible way (such
-as by appending the random data to the unencrypted password, or combining
-them with exclusive or). Salt is randomly generated when setting a password,
-and then the same salt value is re-used when checking the password. (Salt is
-thus stored unencrypted.)</p>
-
-<p>The advantage of using salt is that the same cleartext password encrypted
-with a different salt value produces a different encrypted value.
-If each encrypted password uses a different salt value, an attacker is forced
-to do the cryptographic math all over again for each password they want to
-check. Without salt, they could simply produce a big dictionary of commonly
-used passwords ahead of time, and look up each password in a stolen password
-file to see if it's a known value. (Even if there are billions of possible
-passwords in the dictionary, checking each one is just a binary search against
-a file only a few gigabytes long.) With salt they can't even tell if two
-different users share the same password without guessing what that password
-is and decrypting it. They also can't precompute the attack dictionary for
-a specific password until they know what the salt value is.</p>
-
-<p>The third field is the encrypted password (plus the salt). For md5 this
-is 22 bytes.</p>
-
-<p>The busybox function to handle all this is pw_encrypt(clear, salt) in
-"libbb/pw_encrypt.c". The first argument is the clear text password to be
-encrypted, and the second is a string in "$type$salt$password" format, from
-which the "type" and "salt" fields will be extracted to produce an encrypted
-value. (Only the first two fields are needed, the third $ is equivalent to
-the end of the string.) The return value is an encrypted password in
-/etc/passwd format, with all three $ separated fields. It's stored in
-a static buffer, 128 bytes long.</p>
-
-<p>So when checking an existing password, if pw_encrypt(text,
-old_encrypted_password) returns a string that compares identical to
-old_encrypted_password, you've got the right password. When setting a new
-password, generate a random 8 character salt string, put it in the right
-format with sprintf(buffer, "$%c$%s", type, salt), and feed buffer as the
-second argument to pw_encrypt(text,buffer).</p>
-
-<hr />
-<h2><a name="tips_vfork">Fork and vfork</a></h2>
-
-<p>On systems that haven't got a Memory Management Unit, fork() is unreasonably
-expensive to implement (and sometimes even impossible), so a less capable
-function called vfork() is used instead. (Using vfork() on a system with an
-MMU is like pounding a nail with a wrench. Not the best tool for the job, but
-it works.)</p>
-
-<p>Busybox hides the difference between fork() and vfork() in
-libbb/bb_fork_exec.c. If you ever want to fork and exec, use bb_fork_exec()
-(which returns a pid and takes the same arguments as execve(), although in
-this case envp can be NULL) and don't worry about it. This description is
-here in case you want to know why that does what it does.</p>
-
-<p>Implementing fork() depends on having a Memory Management Unit. With an
-MMU then you can simply set up a second set of page tables and share the
-physical memory via copy-on-write. So a fork() followed quickly by exec()
-only copies a few pages of the parent's memory, just the ones it changes
-before freeing them.</p>
-
-<p>With a very primitive MMU (using a base pointer plus length instead of page
-tables, which can provide virtual addresses and protect processes from each
-other, but no copy on write) you can still implement fork. But it's
-unreasonably expensive, because you have to copy all the parent process'
-memory into the new process (which could easily be several megabytes per fork).
-And you have to do this even though that memory gets freed again as soon as the
-exec happens. (This is not just slow and a waste of space but causes memory
-usage spikes that can easily cause the system to run out of memory.)</p>
-
-<p>Without even a primitive MMU, you have no virtual addresses. Every process
-can reach out and touch any other process' memory, because all pointers are to
-physical addresses with no protection. Even if you copy a process' memory to
-new physical addresses, all of its pointers point to the old objects in the
-old process. (Searching through the new copy's memory for pointers and
-redirect them to the new locations is not an easy problem.)</p>
-
-<p>So with a primitive or missing MMU, fork() is just not a good idea.</p>
-
-<p>In theory, vfork() is just a fork() that writeably shares the heap and stack
-rather than copying it (so what one process writes the other one sees). In
-practice, vfork() has to suspend the parent process until the child does exec,
-at which point the parent wakes up and resumes by returning from the call to
-vfork(). All modern kernel/libc combinations implement vfork() to put the
-parent to sleep until the child does its exec. There's just no other way to
-make it work: the parent has to know the child has done its exec() or exit()
-before it's safe to return from the function it's in, so it has to block
-until that happens. In fact without suspending the parent there's no way to
-even store separate copies of the return value (the pid) from the vfork() call
-itself: both assignments write into the same memory location.</p>
-
-<p>One way to understand (and in fact implement) vfork() is this: imagine
-the parent does a setjmp and then continues on (pretending to be the child)
-until the exec() comes around, then the _exec_ does the actual fork, and the
-parent does a longjmp back to the original vfork call and continues on from
-there. (It thus becomes obvious why the child can't return, or modify
-local variables it doesn't want the parent to see changed when it resumes.)
-
-<p>Note a common mistake: the need for vfork doesn't mean you can't have two
-processes running at the same time. It means you can't have two processes
-sharing the same memory without stomping all over each other. As soon as
-the child calls exec(), the parent resumes.</p>
-
-<p>If the child's attempt to call exec() fails, the child should call _exit()
-rather than a normal exit(). This avoids any atexit() code that might confuse
-the parent. (The parent should never call _exit(), only a vforked child that
-failed to exec.)</p>
-
-<p>(Now in theory, a nommu system could just copy the _stack_ when it forks
-(which presumably is much shorter than the heap), and leave the heap shared.
-Even with no MMU at all
-In practice, you've just wound up in a multi-threaded situation and you can't
-do a malloc() or free() on your heap without freeing the other process' memory
-(and if you don't have the proper locking for being threaded, corrupting the
-heap if both of you try to do it at the same time and wind up stomping on
-each other while traversing the free memory lists). The thing about vfork is
-that it's a big red flag warning "there be dragons here" rather than
-something subtle and thus even more dangerous.)</p>
-
-<hr />
-<h2><a name="tips_sort_read">Short reads and writes</a></h2>
-
-<p>Busybox has special functions, bb_full_read() and bb_full_write(), to
-check that all the data we asked for got read or written. Is this a real
-world consideration? Try the following:</p>
-
-<pre>while true; do echo hello; sleep 1; done | tee out.txt</pre>
-
-<p>If tee is implemented with bb_full_read(), tee doesn't display output
-in real time but blocks until its entire input buffer (generally a couple
-kilobytes) is read, then displays it all at once. In that case, we _want_
-the short read, for user interface reasons. (Note that read() should never
-return 0 unless it has hit the end of input, and an attempt to write 0
-bytes should be ignored by the OS.)</p>
-
-<p>As for short writes, play around with two processes piping data to each
-other on the command line (cat bigfile | gzip > out.gz) and suspend and
-resume a few times (ctrl-z to suspend, "fg" to resume). The writer can
-experience short writes, which are especially dangerous because if you don't
-notice them you'll discard data. They can also happen when a system is under
-load and a fast process is piping to a slower one. (Such as an xterm waiting
-on x11 when the scheduler decides X is being a CPU hog with all that
-text console scrolling...)</p>
-
-<p>So will data always be read from the far end of a pipe at the
-same chunk sizes it was written in? Nope. Don't rely on that. For one
-counterexample, see <a href="http://www.faqs.org/rfcs/rfc896.html">rfc 896
-for Nagle's algorithm</a>, which waits a fraction of a second or so before
-sending out small amounts of data through a TCP/IP connection in case more
-data comes in that can be merged into the same packet. (In case you were
-wondering why action games that use TCP/IP set TCP_NODELAY to lower the latency
-on their their sockets, now you know.)</p>
-
-<hr />
-<h2><a name="tips_memory">Memory used by relocatable code, PIC, and static linking.</a></h2>
-
-<p>The downside of standard dynamic linking is that it results in self-modifying
-code. Although each executable's pages are mmaped() into a process' address
-space from the executable file and are thus naturally shared between processes
-out of the page cache, the library loader (ld-linux.so.2 or ld-uClibc.so.0)
-writes to these pages to supply addresses for relocatable symbols. This
-dirties the pages, triggering copy-on-write allocation of new memory for each
-processes' dirtied pages.</p>
-
-<p>One solution to this is Position Independent Code (PIC), a way of linking
-a file so all the relocations are grouped together. This dirties fewer
-pages (often just a single page) for each process' relocations. The down
-side is this results in larger executables, which take up more space on disk
-(and a correspondingly larger space in memory). But when many copies of the
-same program are running, PIC dynamic linking trades a larger disk footprint
-for a smaller memory footprint, by sharing more pages.</p>
-
-<p>A third solution is static linking. A statically linked program has no
-relocations, and thus the entire executable is shared between all running
-instances. This tends to have a significantly larger disk footprint, but
-on a system with only one or two executables, shared libraries aren't much
-of a win anyway.</p>
-
-<p>You can tell the glibc linker to display debugging information about its
-relocations with the environment variable "LD_DEBUG". Try
-"LD_DEBUG=help /bin/true" for a list of commands. Learning to interpret
-"LD_DEBUG=statistics cat /proc/self/statm" could be interesting.</p>
-
-<p>For more on this topic, here's Rich Felker:</p>
-<blockquote>
-<p>Dynamic linking (without fixed load addresses) fundamentally requires
-at least one dirty page per dso that uses symbols. Making calls (but
-never taking the address explicitly) to functions within the same dso
-does not require a dirty page by itself, but will with ELF unless you
-use -Bsymbolic or hidden symbols when linking.</p>
-
-<p>ELF uses significant additional stack space for the kernel to pass all
-the ELF data structures to the newly created process image. These are
-located above the argument list and environment. This normally adds 1
-dirty page to the process size.</p>
-
-<p>The ELF dynamic linker has its own data segment, adding one or more
-dirty pages. I believe it also performs relocations on itself.</p>
-
-<p>The ELF dynamic linker makes significant dynamic allocations to manage
-the global symbol table and the loaded dso's. This data is never
-freed. It will be needed again if libdl is used, so unconditionally
-freeing it is not possible, but normal programs do not use libdl. Of
-course with glibc all programs use libdl (due to nsswitch) so the
-issue was never addressed.</p>
-
-<p>ELF also has the issue that segments are not page-aligned on disk.
-This saves up to 4k on disk, but at the expense of using an additional
-dirty page in most cases, due to a large portion of the first data
-page being filled with a duplicate copy of the last text page.</p>
-
-<p>The above is just a partial list of the tiny memory penalties of ELF
-dynamic linking, which eventually add up to quite a bit. The smallest
-I've been able to get a process down to is 8 dirty pages, and the
-above factors seem to mostly account for it (but some were difficult
-to measure).</p>
-</blockquote>
-
-<hr />
-<h2><a name="tips_kernel_headers"></a>Including kernel headers</h2>
-
-<p>The "linux" or "asm" directories of /usr/include contain Linux kernel
-headers, so that the C library can talk directly to the Linux kernel. In
-a perfect world, applications shouldn't include these headers directly, but
-we don't live in a perfect world.</p>
-
-<p>For example, Busybox's losetup code wants linux/loop.c because nothing else
-#defines the structures to call the kernel's loopback device setup ioctls.
-Attempts to cut and paste the information into a local busybox header file
-proved incredibly painful, because portions of the loop_info structure vary by
-architecture, namely the type __kernel_dev_t has different sizes on alpha,
-arm, x86, and so on. Meaning we either #include <linux/posix_types.h> or
-we hardwire #ifdefs to check what platform we're building on and define this
-type appropriately for every single hardware architecture supported by
-Linux, which is simply unworkable.</p>
-
-<p>This is aside from the fact that the relevant type defined in
-posix_types.h was renamed to __kernel_old_dev_t during the 2.5 series, so
-to cut and paste the structure into our header we have to #include
-<linux/version.h> to figure out which name to use. (What we actually do is
-check if we're building on 2.6, and if so just use the new 64 bit structure
-instead to avoid the rename entirely.) But we still need the version
-check, since 2.4 didn't have the 64 bit structure.</p>
-
-<p>The BusyBox developers spent <u>two years</u> trying to figure
-out a clean way to do all this. There isn't one. The losetup in the
-util-linux package from kernel.org isn't doing it cleanly either, they just
-hide the ugliness by nesting #include files. Their mount/loop.h
-#includes "my_dev_t.h", which #includes <linux/posix_types.h> and
-<linux/version.h> just like we do. There simply is no alternative.</p>
-
-<p>Just because directly #including kernel headers is sometimes
-unavoidable doesn't me we should include them when there's a better
-way to do it. However, block copying information out of the kernel headers
-is not a better way.</p>
-
-<hr />
-<h2><a name="who">Who are the BusyBox developers?</a></h2>
-
-<p>The following login accounts currently exist on busybox.net. (I.E. these
-people can commit <a href="http://busybox.net/downloads/patches">patches</a>
-into subversion for the BusyBox, uClibc, and buildroot projects.)</p>
-
-<pre>
-aldot :Bernhard Fischer
-andersen :Erik Andersen - uClibc and BuildRoot maintainer.
-bug1 :Glenn McGrath
-davidm :David McCullough
-gkajmowi :Garrett Kajmowicz - uClibc++ maintainer
-jbglaw :Jan-Benedict Glaw
-jocke :Joakim Tjernlund
-landley :Rob Landley - BusyBox maintainer
-lethal :Paul Mundt
-mjn3 :Manuel Novoa III
-osuadmin :osuadmin
-pgf :Paul Fox
-pkj :Peter Kjellerstedt
-prpplague :David Anders
-psm :Peter S. Mazinger
-russ :Russ Dill
-sandman :Robert Griebl
-sjhill :Steven J. Hill
-solar :Ned Ludd
-timr :Tim Riker
-tobiasa :Tobias Anderberg
-vapier :Mike Frysinger
-</pre>
-
-<p>The following accounts used to exist on busybox.net, but don't anymore so
-I can't ask /etc/passwd for their names. Rob Wentworth <robwen@gmail.com>
-asked Google and recovered the names:</p>
-
-<pre>
-aaronl :Aaron Lehmann
-beppu :John Beppu
-dwhedon :David Whedon
-erik :Erik Andersen
-gfeldman :Gennady Feldman
-jimg :Jim Gleason
-kraai :Matt Kraai
-markw :Mark Whitley
-miles :Miles Bader
-proski :Pavel Roskin
-rjune :Richard June
-tausq :Randolph Chung
-vodz :Vladimir N. Oleynik
-</pre>
-
-
-<br>
-<br>
-<br>
-
-<!--#include file="footer.html" -->
+++ /dev/null
-<!--#include file="header.html" -->
-
-<h3>BusyBox: The Swiss Army Knife of Embedded Linux</h3>
-
-<p>BusyBox combines tiny versions of many common UNIX utilities into a single
-small executable. It provides replacements for most of the utilities you
-usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox
-generally have fewer options than their full-featured GNU cousins; however,
-the options that are included provide the expected functionality and behave
-very much like their GNU counterparts. BusyBox provides a fairly complete
-environment for any small or embedded system.</p>
-
-<p>BusyBox has been written with size-optimization and limited resources in
-mind. It is also extremely modular so you can easily include or exclude
-commands (or features) at compile time. This makes it easy to customize
-your embedded systems. To create a working system, just add some device
-nodes in /dev, a few configuration files in /etc, and a Linux kernel.</p>
-
-<p>BusyBox is maintained by
-<a href="mailto:vda.linux@googlemail.com">Denis Vlasenko</a>,
-and licensed under the <a href="/license.html">GNU GENERAL PUBLIC LICENSE</a>
-version 2.</p>
-
-<!--#include file="footer.html" -->
+++ /dev/null
-%!PS-Adobe-2.0
-%%Title: busybox-growth.ps
-%%Creator: gnuplot 3.5 (pre 3.6) patchlevel beta 347
-%%CreationDate: Tue Apr 10 14:03:36 2001
-%%DocumentFonts: (atend)
-%%BoundingBox: 50 40 554 770
-%%Orientation: Landscape
-%%Pages: (atend)
-%%EndComments
-/gnudict 120 dict def
-gnudict begin
-/Color true def
-/Solid true def
-/gnulinewidth 5.000 def
-/userlinewidth gnulinewidth def
-/vshift -46 def
-/dl {10 mul} def
-/hpt_ 31.5 def
-/vpt_ 31.5 def
-/hpt hpt_ def
-/vpt vpt_ def
-/M {moveto} bind def
-/L {lineto} bind def
-/R {rmoveto} bind def
-/V {rlineto} bind def
-/vpt2 vpt 2 mul def
-/hpt2 hpt 2 mul def
-/Lshow { currentpoint stroke M
- 0 vshift R show } def
-/Rshow { currentpoint stroke M
- dup stringwidth pop neg vshift R show } def
-/Cshow { currentpoint stroke M
- dup stringwidth pop -2 div vshift R show } def
-/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def
- /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def
-/DL { Color {setrgbcolor Solid {pop []} if 0 setdash }
- {pop pop pop Solid {pop []} if 0 setdash} ifelse } def
-/BL { stroke gnulinewidth 2 mul setlinewidth } def
-/AL { stroke gnulinewidth 2 div setlinewidth } def
-/UL { gnulinewidth mul /userlinewidth exch def } def
-/PL { stroke userlinewidth setlinewidth } def
-/LTb { BL [] 0 0 0 DL } def
-/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def
-/LT0 { PL [] 1 0 0 DL } def
-/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def
-/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def
-/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def
-/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def
-/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def
-/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def
-/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def
-/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def
-/Pnt { stroke [] 0 setdash
- gsave 1 setlinecap M 0 0 V stroke grestore } def
-/Dia { stroke [] 0 setdash 2 copy vpt add M
- hpt neg vpt neg V hpt vpt neg V
- hpt vpt V hpt neg vpt V closepath stroke
- Pnt } def
-/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V
- currentpoint stroke M
- hpt neg vpt neg R hpt2 0 V stroke
- } def
-/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M
- 0 vpt2 neg V hpt2 0 V 0 vpt2 V
- hpt2 neg 0 V closepath stroke
- Pnt } def
-/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M
- hpt2 vpt2 neg V currentpoint stroke M
- hpt2 neg 0 R hpt2 vpt2 V stroke } def
-/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M
- hpt neg vpt -1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt 1.62 mul V closepath stroke
- Pnt } def
-/Star { 2 copy Pls Crs } def
-/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M
- 0 vpt2 neg V hpt2 0 V 0 vpt2 V
- hpt2 neg 0 V closepath fill } def
-/TriUF { stroke [] 0 setdash vpt 1.12 mul add M
- hpt neg vpt -1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt 1.62 mul V closepath fill } def
-/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M
- hpt neg vpt 1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt -1.62 mul V closepath stroke
- Pnt } def
-/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M
- hpt neg vpt 1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt -1.62 mul V closepath fill} def
-/DiaF { stroke [] 0 setdash vpt add M
- hpt neg vpt neg V hpt vpt neg V
- hpt vpt V hpt neg vpt V closepath fill } def
-/Pent { stroke [] 0 setdash 2 copy gsave
- translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
- closepath stroke grestore Pnt } def
-/PentF { stroke [] 0 setdash gsave
- translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
- closepath fill grestore } def
-/Circle { stroke [] 0 setdash 2 copy
- hpt 0 360 arc stroke Pnt } def
-/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def
-/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def
-/C1 { BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 90 arc closepath fill
- vpt 0 360 arc closepath } bind def
-/C2 { BL [] 0 setdash 2 copy moveto
- 2 copy vpt 90 180 arc closepath fill
- vpt 0 360 arc closepath } bind def
-/C3 { BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 180 arc closepath fill
- vpt 0 360 arc closepath } bind def
-/C4 { BL [] 0 setdash 2 copy moveto
- 2 copy vpt 180 270 arc closepath fill
- vpt 0 360 arc closepath } bind def
-/C5 { BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 90 arc
- 2 copy moveto
- 2 copy vpt 180 270 arc closepath fill
- vpt 0 360 arc } bind def
-/C6 { BL [] 0 setdash 2 copy moveto
- 2 copy vpt 90 270 arc closepath fill
- vpt 0 360 arc closepath } bind def
-/C7 { BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 270 arc closepath fill
- vpt 0 360 arc closepath } bind def
-/C8 { BL [] 0 setdash 2 copy moveto
- 2 copy vpt 270 360 arc closepath fill
- vpt 0 360 arc closepath } bind def
-/C9 { BL [] 0 setdash 2 copy moveto
- 2 copy vpt 270 450 arc closepath fill
- vpt 0 360 arc closepath } bind def
-/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill
- 2 copy moveto
- 2 copy vpt 90 180 arc closepath fill
- vpt 0 360 arc closepath } bind def
-/C11 { BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 180 arc closepath fill
- 2 copy moveto
- 2 copy vpt 270 360 arc closepath fill
- vpt 0 360 arc closepath } bind def
-/C12 { BL [] 0 setdash 2 copy moveto
- 2 copy vpt 180 360 arc closepath fill
- vpt 0 360 arc closepath } bind def
-/C13 { BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 90 arc closepath fill
- 2 copy moveto
- 2 copy vpt 180 360 arc closepath fill
- vpt 0 360 arc closepath } bind def
-/C14 { BL [] 0 setdash 2 copy moveto
- 2 copy vpt 90 360 arc closepath fill
- vpt 0 360 arc } bind def
-/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill
- vpt 0 360 arc closepath } bind def
-/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
- neg 0 rlineto closepath } bind def
-/Square { dup Rec } bind def
-/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def
-/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def
-/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def
-/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def
-/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def
-/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def
-/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill
- exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def
-/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def
-/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill
- 2 copy vpt Square fill
- Bsquare } bind def
-/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def
-/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def
-/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill
- Bsquare } bind def
-/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill
- Bsquare } bind def
-/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def
-/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
- 2 copy vpt Square fill Bsquare } bind def
-/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
- 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def
-/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def
-/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def
-/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def
-/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def
-/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def
-/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def
-/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def
-/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def
-/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def
-/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def
-/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def
-/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def
-/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def
-/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def
-/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def
-/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def
-/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def
-/DiaE { stroke [] 0 setdash vpt add M
- hpt neg vpt neg V hpt vpt neg V
- hpt vpt V hpt neg vpt V closepath stroke } def
-/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M
- 0 vpt2 neg V hpt2 0 V 0 vpt2 V
- hpt2 neg 0 V closepath stroke } def
-/TriUE { stroke [] 0 setdash vpt 1.12 mul add M
- hpt neg vpt -1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt 1.62 mul V closepath stroke } def
-/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M
- hpt neg vpt 1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt -1.62 mul V closepath stroke } def
-/PentE { stroke [] 0 setdash gsave
- translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
- closepath stroke grestore } def
-/CircE { stroke [] 0 setdash
- hpt 0 360 arc stroke } def
-/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def
-/DiaW { stroke [] 0 setdash vpt add M
- hpt neg vpt neg V hpt vpt neg V
- hpt vpt V hpt neg vpt V Opaque stroke } def
-/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M
- 0 vpt2 neg V hpt2 0 V 0 vpt2 V
- hpt2 neg 0 V Opaque stroke } def
-/TriUW { stroke [] 0 setdash vpt 1.12 mul add M
- hpt neg vpt -1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt 1.62 mul V Opaque stroke } def
-/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M
- hpt neg vpt 1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt -1.62 mul V Opaque stroke } def
-/PentW { stroke [] 0 setdash gsave
- translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
- Opaque stroke grestore } def
-/CircW { stroke [] 0 setdash
- hpt 0 360 arc Opaque stroke } def
-/BoxFill { gsave Rec 1 setgray fill grestore } def
-end
-%%EndProlog
-%%Page: 1 1
-gnudict begin
-gsave
-50 50 translate
-0.100 0.100 scale
-90 rotate
-0 -5040 translate
-0 setgray
-newpath
-(Helvetica) findfont 140 scalefont setfont
-1.000 UL
-LTb
-560 420 M
-63 0 V
-6409 0 R
--63 0 V
-476 420 M
-(0) Rshow
-560 1056 M
-63 0 V
-6409 0 R
--63 0 V
--6493 0 R
-(100) Rshow
-560 1692 M
-63 0 V
-6409 0 R
--63 0 V
--6493 0 R
-(200) Rshow
-560 2328 M
-63 0 V
-6409 0 R
--63 0 V
--6493 0 R
-(300) Rshow
-560 2964 M
-63 0 V
-6409 0 R
--63 0 V
--6493 0 R
-(400) Rshow
-560 3600 M
-63 0 V
-6409 0 R
--63 0 V
--6493 0 R
-(500) Rshow
-560 4236 M
-63 0 V
-6409 0 R
--63 0 V
--6493 0 R
-(600) Rshow
-560 4872 M
-63 0 V
-6409 0 R
--63 0 V
--6493 0 R
-(700) Rshow
-1531 420 M
-0 63 V
-0 4389 R
-0 -63 V
-0 -4529 R
-(400) Cshow
-2825 420 M
-0 63 V
-0 4389 R
-0 -63 V
-0 -4529 R
-(600) Cshow
-4120 420 M
-0 63 V
-0 4389 R
-0 -63 V
-0 -4529 R
-(800) Cshow
-5414 420 M
-0 63 V
-0 4389 R
-0 -63 V
-0 -4529 R
-(1000) Cshow
-6708 420 M
-0 63 V
-0 4389 R
-0 -63 V
-0 -4529 R
-(1200) Cshow
-1.000 UL
-LTb
-560 420 M
-6472 0 V
-0 4452 V
--6472 0 V
-560 420 L
-0 2646 M
-currentpoint gsave translate 90 rotate 0 0 M
-(tar.gz size \(Kb\)) Cshow
-grestore
-3796 140 M
-(time \(days since Jan 1, 1998\)) Cshow
-1.000 UL
-LT0
-696 420 M
-0 593 V
-1255 0 V
-0 15 V
-214 0 V
-0 6 V
-958 0 V
-0 1 V
--84 0 V
-0 37 V
-168 0 V
-0 262 V
-13 0 V
-0 56 V
-91 0 V
-0 33 V
-6 0 V
-0 1 V
-19 0 V
-0 11 V
-20 0 V
-0 13 V
-32 0 V
-0 104 V
-52 0 V
-0 27 V
-65 0 V
-0 15 V
-39 0 V
-0 126 V
-174 0 V
-0 103 V
-52 0 V
-0 49 V
-175 0 V
-0 56 V
-433 0 V
-0 661 V
-415 0 V
-0 857 V
-123 0 V
-0 -291 V
-498 0 V
-0 208 V
-505 0 V
-0 66 V
-291 0 V
-0 115 V
-311 0 V
-0 449 V
-162 0 V
-0 309 V
-stroke
-grestore
-end
-showpage
-%%Trailer
-%%DocumentFonts: Helvetica
-%%Pages: 1
+++ /dev/null
-
-The code and graphics on this website (and it's mirror sites, if any) are
-Copyright (c) 1999-2004 by Erik Andersen. All rights reserved.
-Copyright (c) 2005-2006 Rob Landley.
-
-Documents on this Web site including their graphical elements, design, and
-layout are protected by trade dress and other laws and MAY BE COPIED OR
-IMITATED IN WHOLE OR IN PART. THIS WEBSITE IS LICENSED FREE OF CHARGE, THERE
-IS NO WARRANTY FOR THE WEBSITE TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-SHOULD THIS WEBSITE PROVE DEFECTIVE, YOU MAY ASSUME THAT SOMEONE MIGHT GET
-AROUND TO SERVICING, REPAIRING OR CORRECTING IT SOMETIME WHEN THEY HAVE NOTHING
-BETTER TO DO. REGARDLESS, YOU GET TO KEEP BOTH PIECES.
-
-IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
-COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THIS
-WEBSITE AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
-INABILITY TO USE THIS WEBSITE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
-LOSS OF HAIR, LOSS OF LIFE, LOSS OF MEMORY, LOSS OF YOUR CARKEYS, MISPLACEMENT
-OF YOUR PAYCHECK, OR COMMANDER DATA BEING RENDERED UNABLE TO ASSIST THE
-STARFLEET OFFICERS ABORD THE STARSHIP ENTERPRISE TO RECALIBRATE THE MAIN
-DEFLECTOR ARRAY, LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
-WEBSITE TO OPERATE WITH YOUR WEBBROWSER), EVEN IF SUCH HOLDER OR OTHER PARTY
-HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-You have been warned.
-
-You can contact the webmaster at <rob@landley.net> if you have some sort
-of problem with this.
-
+++ /dev/null
-<!--#include file="header.html" -->
-
-<h3>Morris Dancing</h3>
-
-<p>Subversion commit access requires an account on Morris. The server
-behind busybox.net and uclibc.org. If you want to be able to commit things to
-Subversion, first contribute some stuff to show you are serious, can handle
-some responsibility, and that your patches don't generally need a lot of
-cleanup. Then, very nicely ask one of us (<a href="mailto:rob@landley.net">Rob
-Landley</a> for BusyBox, or <a href="mailto:andersen@codepoet.org">Erik
-Andersen</a> for uClibc) for an account.</p>
-
-<p>If you're approved for an account, you'll need to send an email from your
-preferred contact email address with the username you'd like to use when
-committing changes to SVN, and attach a public ssh key to access your account
-with.</p>
-
-<p>If you don't currently have an ssh version 2 DSA key at least 1024 bits
-long (the default), you can generate a key using the
-command <b>ssh-keygen -t dsa</b> and hitting enter at the prompts. This
-will create the files <b>~/.ssh/id_dsa</b> and <b>~/.ssh/id_dsa.pub</b>
-You must then send the content of 'id_dsa.pub' to me so I can set up your
-account. (The content of 'id_dsa' should of course be kept secret, anyone
-who has that can access any account that's installed your public key in
-its <b>.ssh/authorized_keys</b> file.)</p>
-
-<p>Note that if you would prefer to keep your communications with us
-private, you can encrypt your email using
-<a href="http://landley.net/pubkey.gpg">Rob's public key</a> or
-<a href="http://www.codepoet.org/andersen/erik/gpg.asc">Erik's public
-key</a>.</p>
-
-<p>Once you are setup with an account, you will need to use your account to
-checkout a copy of BusyBox from Subversion:</p>
-
-<p><b>svn checkout svn+ssh://username@busybox.net/svn/trunk/busybox</b></p>
-<p>or</p>
-<p><b>svn checkout svn+ssh://username@uclibc.org/svn/trunk/uclibc</b></p>
-
-<p>You must change <em>username</em> to your own username, or omit
-it if it's the same as your local username.</p>
-
-<p>You can then enter the newly checked out project directory, make changes,
-check your changes, diff your changes, revert your changes, and and commit your
-changes using commands such as:</p>
-
-<b><pre>
-svn diff
-svn status
-svn revert
-EDITOR=vi svn commit
-svn log -v -r PREV:HEAD
-svn help
-</pre></b>
-
-<p>For additional detail on how to use Subversion, please visit the
-<a href="http://subversion.tigris.org/">the Subversion website</a>.
-You might also want to read online or buy a copy of <a
-href="http://svnbook.red-bean.com/">the Subversion Book</a>...</p>
-
-<p>A morris account also gives you a personal web page
-(http://busybox.net/~username comes from ~/public_html on morris), and of
-course a shell prompt you can ssh into (as a regular user, root access is
-reserved for Erik and Rob). But keep in mind an account on Morris is a
-priviledge, not a requirement. Most contributors to busybox and uClibc
-haven't got one, and accounts are handed out to make the project maintainers'
-lives easier, not because "you deserve it".</p>
-
-<!--#include file="footer.html" -->
+++ /dev/null
-<!--#include file="header.html" -->
-
-
-
-<h3>Download</h3>
-
-<p>
-Source for the latest release can always be
-downloaded from <a href="downloads/">http://www.busybox.net/downloads/</a>.
-
-<p>
-Each 1.x branch has bug fix releases after initial 1.x.0 release.
-Also there are patches on top of latest bug fix release.
-<p>
-Latest releases and patch directories for each branch:
-<br>
-<a href=http://busybox.net/downloads/busybox-1.9.2.tar.bz2>1.9.2</a>,
-<a href=http://busybox.net/downloads/fixes-1.9.2/>patches</a>,
-<br>
-<a href=http://busybox.net/downloads/busybox-1.8.3.tar.bz2>1.8.3</a>,
-<a href=http://busybox.net/downloads/fixes-1.8.3/>patches</a>,
-<br>
-<a href=http://busybox.net/downloads/busybox-1.7.5.tar.bz2>1.7.5</a>,
-<a href=http://busybox.net/downloads/fixes-1.7.5/>patches</a>,
-<br>
-<a href=http://busybox.net/downloads/busybox-1.6.2.tar.bz2>1.6.2</a>,
-<a href=http://busybox.net/downloads/fixes-1.6.2/>patches</a>,
-<br>
-<a href=http://busybox.net/downloads/busybox-1.5.2.tar.bz2>1.5.2</a>,
-<a href=http://busybox.net/downloads/fixes-1.5.2/>patches</a>,
-<br>
-<a href=http://busybox.net/downloads/busybox-1.4.2.tar.bz2>1.4.2</a>,
-<a href=http://busybox.net/downloads/fixes-1.4.2/>patches</a>,
-<br>
-<a href=http://busybox.net/downloads/busybox-1.3.2.tar.bz2>1.3.2</a>,
-<a href=http://busybox.net/downloads/fixes-1.3.2/>patches</a>.
-
-<p>
-You can also obtain <a href="downloads/snapshots/">Daily Snapshots</a> of
-the latest development source tree for those wishing to follow BusyBox development,
-but cannot or do not wish to use Subversion (svn).
-
-<ul>
- <li> Click here to <a href="/cgi-bin/viewcvs.cgi/trunk/busybox/">browse the source tree</a>.
- </li>
-
- <li>Anonymous <a href="subversion.html">Subversion access</a> is available.
- </li>
-
- <li>For those that are actively contributing obtaining
- <a href="developer.html">Subversion read/write access</a> is also possible.
- </li>
-
-</ul>
-
-<!--#include file="footer.html" -->
-
+++ /dev/null
-<!--#include file="header.html" -->
-
-<h3>How to get your patch added to "hot fixes"</h3>
-
-<p> If you found a regression or severe bug in busybox, and you have a patch
- for it, and you want to see it added to "hot fixes", please rediff your
- patch against corresponding unmodified busybox source and send it to
- <a href=mailto:busybox@busybox.net>the mailing list</a>.
-</p>
-
-<br>
-<br>
-<br>
-
-<!--#include file="footer.html" -->
+++ /dev/null
-<!-- Footer -->
-
-
- </td>
- </tr>
- </table>
-
-<hr />
-
-
- <table width="100%">
- <tr>
- <td width="60%">
- <font face="arial, helvetica, sans-serif" size="-1">
- <a href="/copyright.txt">Copyright © 1999-2005 Erik Andersen</a>
- <br>
- Mail all comments, insults, suggestions and bribes to
- <br>
- Denis Vlasenko <a href="mailto:vda.linux@googlemail.com">vda.linux@googlemail.com</a><br>
- </font>
- </td>
-
- <td>
- <a href="http://www.vim.org/"><img border=0 width=88 height=31
- src="images/written.in.vi.png"
- alt="This site created with the vi editor"></a>
- </td>
-
- <td>
- <a href="http://osuosl.org/"><img border=0 width=114 height=63
- src="images/osuosl.png"
- alt="This site is kindly hosted by OSL"></a>
- </td>
-<!--
- <td>
- <a href="http://validator.w3.org/check?uri=referer"><img
- border="0" height="31" width="88"
- src="images/valid-html401.png"
- alt="Valid HTML"></a>
- </td>
--->
- </TR>
- </table>
-
- </body>
-</html>
-
+++ /dev/null
-<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
-
-<html>
- <head>
- <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
- <title>BusyBox</title>
- <style type="text/css">
- body {
- background-color: #DEE2DE;
- color: #000000;
- }
- :link { color: #660000 }
- :visited { color: #660000 }
- :active { color: #660000 }
- td.c2 {font-family: arial, helvetica, sans-serif; font-size: 80%}
- td.c1 {font-family: lucida, helvetica; font-size: 248%}
- </style>
- </head>
-
- <body>
- <basefont face="lucida, helvetica, arial" size="3">
-
-
-
-
-<table border="0" cellpadding="0" cellspacing="0">
-
-
-<tr>
-<td>
- <div class="c3">
- <table border="0" cellspacing="1" cellpadding="2">
- <tr>
- <td class="c1">BUSYBOX</td>
- </tr>
- </table>
- </div>
-
- <a href="/"><IMG SRC="images/busybox1.png" alt="BusyBox" border="0"></a><BR>
-</td>
-</tr>
-
-<tr>
-
-<td valign="TOP">
- <b>About</b>
- <ul>
- <li><a href="about.html">About BusyBox</a></li>
- <li><a href="screenshot.html">Screenshot</a></li>
- <li><a href="news.html">Announcements</a></li>
- </ul>
- <b>Documentation</b>
- <ul>
- <li><a href="FAQ.html">FAQ</a></li>
- <li><a href="downloads/BusyBox.html">Command Help</a></li>
- <li><a href="downloads/README">README</a></li>
- </ul>
- <b>Get BusyBox</b>
- <ul>
- <li><a href="download.html">Download Source</a></li>
- <li><a href="license.html">License</a></li>
- <li><a href="products.html">Products</a></li>
- </ul>
- <b>Development</b>
- <ul>
- <li><a href="/cgi-bin/viewcvs.cgi/trunk/busybox/">Browse Source</a></li>
- <li><a href="subversion.html">Source Control</a></li>
- <li><a href="/downloads/patches/recent.html">Recent Changes</a></li>
- <li><a href="lists.html">Mailing Lists</a></li>
- <li><a href="http://bugs.busybox.net/">Bug Tracking</a></li>
- </ul>
- <p><b>Links</b>
- <ul>
- <li><a href="links.html">Related Sites</a></li>
- <li><a href="tinyutils.html">Tiny Utilities</a></li>
- <li><a href="sponsors.html">Sponsors</a></li>
- </ul>
- <p><b>Developer Pages</b>
- <ul>
- <li><a href="http://busybox.net/~landley">Rob</a></li>
- <li><a href="http://busybox.net/~aldot">Bernhard</a></li>
- <li><a href="http://busybox.net/~vda">Denis</a>
- <br>-<a href=http://busybox.net/~vda/mboot/>mboot</a>
- <br>-<a href=http://busybox.net/~vda/linld/>linld</a>
- <br>-<a href=http://busybox.net/~vda/init_vs_runsv.html>init must die</a>
- <br>-<a href=http://busybox.net/~vda/no_ifup.txt>no ifup</a>
- <br>-<a href=http://busybox.net/~vda/unscd/>unscd</a>
- </li>
- </ul>
-
-<!--
- <a href="http://validator.w3.org/check/referer"><img
- src="/images/vh40.gif" height=31 width=88
- align=left border=0 alt="Valid HTML 4.0!"></a>
--->
-
-</td>
-
-
-<td Valign="TOP">
-
+++ /dev/null
-<!--#include file="news.html" -->
+++ /dev/null
-<!--#include file="header.html" -->
-
-<p>
-<h3>BusyBox is licensed under the GNU General Public License, version 2</h3>
-
-<p>BusyBox is licensed under <a href="http://www.gnu.org/licenses/gpl.html#SEC1">the
-GNU General Public License</a> version 2, which is often abbreviated as GPLv2.
-(This is the same license the Linux kernel is under, so you may be somewhat
-familiar with it by now.)</p>
-
-<p>A complete copy of the license text is included in the file LICENSE in
-the BusyBox source code.</p>
-
-<p><a href="/products.html">Anyone thinking of shipping BusyBox as part of a
-product</a> should be familiar with the licensing terms under which they are
-allowed to use and distribute BusyBox. Read the full test of the GPL (either
-through the above link, or in the file LICENSE in the busybox tarball), and
-also read the <a href="http://www.gnu.org/licenses/gpl-faq.html">Frequently
-Asked Questions about the GPL</a>.</p>
-
-<p>Basically, if you distribute GPL software the license requires that you also
-distribute the source code to that GPL-licensed software. So if you distribute
-BusyBox without making the source code to the version you distribute available,
-you violate the license terms, and thus infringe on the copyrights of BusyBox.
-(This requirement applies whether or not you modified BusyBox; either way the
-license terms still apply to you.) Read the license text for the details.</p>
-
-<h3>A note on GPL versions</h3>
-
-<p>Version 2 of the GPL is the only version of the GPL which current versions
-of BusyBox may be distributed under. New code added to the tree is licensed
-GPL version 2, and the project's license is GPL version 2.</p>
-
-<p>Older versions of BusyBox (versions 1.2.2 and earlier, up through about svn
-16112) included variants of the recommended "GPL version 2 or (at your option)
-later versions" boilerplate permission grant. Ancient versions of BusyBox
-(before svn 49) did not specify any version at all, and section 9 of GPLv2
-(the most recent version at the time) says those old versions may be
-redistributed under any version of GPL (including the obsolete V1). This was
-conceptually similar to a dual license, except that the different licenses were
-different versions of the GPL.</p>
-
-<p>However, BusyBox has apparently always contained chunks of code that were
-licensed under GPL version 2 only. Examples include applets written by Linus
-Torvalds (util-linux/mkfs_minix.c and util_linux/mkswap.c) which stated they
-"may be redistributed as per the Linux copyright" (which Linus clarified in the
-2.4.0-pre8 release announcement in 2000 was GPLv2 only), and Linux kernel code
-copied into libbb/loop.c (after Linus's announcement). There are probably
-more, because all we used to check was that the code was GPL, not which
-version. (Before the GPLv3 draft proceedings in 2006, it was a purely
-theoretical issue that didn't come up much.)</p>
-
-<p>To summarize: every version of BusyBox may be distributed under the terms of
-GPL version 2. New versions (after 1.2.2) may <b>only</b> be distributed under
-GPLv2, not under other versions of the GPL. Older versions of BusyBox might
-(or might not) be distributable under other versions of the GPL. If you
-want to use a GPL version other than 2, you should start with one of the old
-versions such as release 1.2.2 or SVN 16112, and do your own homework to
-identify and remove any code that can't be licensed under the GPL version you
-want to use. New development is all GPLv2.</p>
-
-<h3>License enforcement</h3>
-
-<p>BusyBox's copyrights are enforced by the <a
-href="http://www.softwarefreedom.org">Software Freedom Law Center</a>
-(you can contact them at gpl@busybox.net), which
-"accepts primary responsibility for enforcement of US copyrights on the
-software... and coordinates international copyright enforcement efforts for
-such works as necessary." If you distribute BusyBox in a way that doesn't
-comply with the terms of the license BusyBox is distributed under, expect to
-hear from these guys. Their entire reason for existing is to do pro-bono
-legal work for free/open source software projects. (We used to list people who
-violate the BusyBox license in <a href="/shame.html">The Hall of Shame</a>,
-but these days we find it much more effective to hand them over to the
-lawyers.)</p>
-
-<p>Our enforcement efforts are aimed at bringing people into compliance with
-the BusyBox license. Open source software is under a different license from
-proprietary software, but if you violate that license you're still a software
-pirate and the law gives the vendor (us) some big sticks to play with. We
-don't want monetary awards, injunctions, or to generate bad PR for a company,
-unless that's the only way to get somebody that repeatedly ignores us to comply
-with the license on our code.</p>
-
-<h3>A Good Example</h3>
-
-<p>These days, <a href="http://www.linksys.com/">Linksys</a> is
-doing a good job at complying with the GPL, they get to be an
-example of how to do things right. Please take a moment and
-check out what they do with
-<a href="http://www.linksys.com/servlet/Satellite?c=L_Content_C1&childpagename=US%2FLayout&cid=1115416836002&pagename=Linksys%2FCommon%2FVisitorWrapper">
-distributing the firmware for their WRT54G Router.</a>
-Following their example would be a fine way to ensure that you
-have also fulfilled your licensing obligations.</p>
-
-<!--#include file="footer.html" -->
-
+++ /dev/null
-<!--#include file="header.html" -->
-
-<h3>Related Sites</h3>
-
-<br><a href="http://uclibc.org/">uClibc.org</a>
-<br><a href="http://cxx.uclibc.org/">uClibc++</a>
-<br><a href="http://udhcp.busybox.net/">udhcp</a>
-<br><a href="http://buildroot.uclibc.org/">buildroot</a>
-<br><a href="http://www.scratchbox.org/">Scratchbox</a>
-<br><a href="http://openembedded.org/">OpenEmbedded</a>
-<br><a href="http://www.ucdot.org/">uCdot</a>
-<br><a href="http://www.linuxdevices.com">LinuxDevices</a>
-<br><a href="http://slashdot.org/">Slashdot</a>
-<br><a href="http://freshmeat.net/">Freshmeat</a>
-<br><a href="http://linuxtoday.com/">Linux Today</a>
-<br><a href="http://lwn.net/">Linux Weekly News</a>
-<br><a href="http://www.tldp.org/HOWTO">Linux HOWTOs</a>
-
-<!--#include file="footer.html" -->
+++ /dev/null
-<!--#include file="header.html" -->
-
-
-<!-- Begin Introduction section -->
-
-<h3>Mailing List Information</h3>
-BusyBox has a <a href="/lists/busybox/">mailing list</a> for discussion and
-development. You can subscribe by visiting
-<a href="http://busybox.net/mailman/listinfo/busybox">this page</a>.
-Only subscribers to the BusyBox mailing list are allowed to post
-to this list.
-
-<p>
-There is also a mailing list for <a href="/lists/busybox-cvs/">active developers</a>
-wishing to read the complete diff of each and every change to busybox -- not for the
-faint of heart. Active developers can subscribe by visiting
-<a href="http://busybox.net/mailman/listinfo/busybox-cvs">this page</a>.
-The Subversion server is the only one permtted to post to this list. And yes,
-this list name uses the word 'cvs' even though we don't use that anymore...
-
-<p>
-
-
-<h3>Search the List Archives</h3>
-Please search the mailing list archives before asking questions on the mailing
-list, since there is a good chance someone else has asked the same question
-before. Checking the archives is a great way to avoid annoying everyone on the
-list with frequently asked questions...
-<p>
-
-<center>
-<form method="GET" action="http://www.google.com/custom">
-<input type="hidden" name="domains" value="busybox.net">
-<input type="hidden" name="sitesearch" value="busybox.net">
-<input type="text" name="q" size="31" maxlength="255" value="">
-<br>
-<input type="submit" name="sa" value="search the mailing list archives">
-<br>
-<a href="http://www.google.com"><img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" height="32" width="75" align="middle"></a>
-<br>
-</form>
-</center>
-
-
-
-<!--#include file="footer.html" -->
+++ /dev/null
-<!--#include file="header.html" -->
-
-<ul>
- <li><b>21 March 2008 -- BusyBox 1.10.0 (unstable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.10.0.tar.bz2>BusyBox 1.10.0</a>.
- (<a href=http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_10_stable/>svn</a>,
- <a href=http://busybox.net/downloads/fixes-1.10.0/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>Sizes of busybox-1.9.2 and busybox-1.10.0 (with almost full config, static uclibc build):<pre>
- text data bss dec hex filename
- 781405 679 7500 789584 c0c50 busybox-1.9.2
- 773551 640 7372 781563 becfb busybox-1.10.0
-</pre>
- <p>Top 10 stack users:<pre>
-busybox-1.9.2: busybox-1.10.0:
-echo_dg 4116 bb_full_fd_action 4112
-bb_full_fd_action 4112 find_list_entry2 4096
-discard_dg 4108 readlink_main 4096
-discard_dg 4096 ipaddr_list_or_flush 3900
-echo_stream 4096 iproute_list_or_flush 3680
-discard_stream 4096 insmod_main 3152
-find_list_entry2 4096 fallbackSort 2952
-readlink_main 4096 do_iproute 2492
-ipaddr_list_or_flush 3900 cal_main 2464
-iproute_list_or_flush 3680 readhere 2308
-</pre>
-
- <p>New applets: brctl, chat (by Vladimir Dronnikov <dronnikov AT gmail.com>),
- findfs, ifenslave (closes bug 115), lpd (by Vladimir Dronnikov <dronnikov AT gmail.com>),
- lpr+lpq (by Walter Harms), script (by Pascal Bellard <pascal.bellard AT ads-lu.com>),
- sendmail (Vladimir Dronnikov <dronnikov AT gmail.com>), tac, tftpd.
-
- <p>Made NOMMU-compatible: crond, crontab, ifupdown, inetd, init, runsv, svlogd, tcpsvd, udpsvd.
-
- <p>Changes since previous release:
- <ul>
- <li>globally: add -Wunused-parameter
- <li>globally: add optimization barrier to all "G trick" locations
- <li>adduser/addgroup: check username for invalid chars (by Tito <farmatito AT tiscali.it>)
- <li>adduser: optional support for long options. Closes bug 2134
- <li>ash: handle "A=1 A=2 B=$A; echo $B". Closes bug 947
- <li>ash: make ash -c "if set -o barfoo 2>/dev/null; then echo foo; else echo bar; fi" work. Closes bug 1142
- <li>build system: don't use "gcc -o /dev/null", old gcc can delete /dev/null in this case
- <li>build system: fixes for cross-compiling on an OS X host
- <li>build system: make it do without "od -t"
- <li>build system: pass CFLAGS to link stage too. Closes bug 1376
- <li>build system: add CONFIG_NOMMU
- <li>cp: add ENABLE_FEATURE_VERBOSE_CP_MESSAGE. Closes bug 1470
- <li>crontab: almost complete rewrite
- <li>dnsd: properly set _src_ IP:port on outgoing UDP packets
- <li>dpkg: fix bug where existence check was reversed
- <li>eject: add -s for SCSI- and USB-devices (Nico Erfurth)
- <li>fdisk: fix a case where break was reached only for DOS labels
- <li>fsck: don't kill pid -1! (Roy Marples <roy at marples.name>)
- <li>fsck_minix: fix bug in map_block2: s/(blknr >= 256 * 256)/(blknr < 256 * 256)/
- <li>fuser: substantial rewrite
- <li>getopt: add support for "a+" specifier for nonnegative int parameters. By Vladimir Dronnikov <dronnikov at gmail.com>
- <li>getty: don't try to detect parity on local lines (Joakim Tjernlund <Joakim.Tjernlund at transmode.se>)
- <li>halt: write wtmp entry if wtmp support is enabled
- <li>httpd: "HEAD" support. Closes bug 1530
- <li>httpd: fix bug 2004: wrong argv when interpreter is invoked
- <li>httpd: fix bug where we did chdir("") if CGI path had only one "/"
- <li>httpd: fix for POST upload
- <li>httpd: support for "I:index.xml" syntax (Peter Korsgaard <jacmet AT uclibc.org>)
- <li>hush: fix a case where none of pipe members could be started because of fork failure
- <li>hush: more correct handling of piping
- <li>hush: reinstate `cmd` handling for NOMMU
- <li>hush: report [v]fork failures
- <li>hush: set CLOEXEC on script file being executed
- <li>hush: try to add a bit more of vfork-friendliness
- <li>inetd: make "udp nowait" work
- <li>inetd: make inetd IPv6-capable
- <li>init: add FEATURE_KILL_REMOVED (Eugene Bordenkircher <eugebo AT gmail.com>)
- <li>init: allow last line of config file to be not terminated by "\n"
- <li>init: do not die if "/dev/null" is missing
- <li>init: fix bug 1111: restart actions were not splitting words
- <li>init: wait for orphaned children too while waiting for sysinit-like processes (harald-tuxbox AT arcor.de)
- <li>ip route: "ip route" was misbehaving (extra argv+1 ate 1st env var)
- <li>last: do not go into endless loop on read error
- <li>less,klogd,syslogd,nc,tcpudp: exit on signal by killing itself, not exit(1)
- <li>less: "examine" command will not bomb out on bad file name now
- <li>less: fix bug where backspace wasn't actually deleting chars
- <li>less: make it a bit more resistant against status line corruption
- <li>less: improve search when data is not supplied fast enough by stdin - now will try reading for 1-2 seconds before declaring that there is no match. This fixes a very common annoyance with long manpages
- <li>less: update line input so that it doesn't interfere with screen update. Makes "man bash", [enter], [/], <enter search pattern>, [enter] more usable - manpage now draws even as you enter the pattern!
- <li>libbb: filename completion matches dangling symlinks too
- <li>libbb: fix getopt state corruption for NOFORK applets
- <li>libbb: full_read/write now will report partial data counts prior to error
- <li>libbb: intrduce and use safe_gethostname. By Tito <farmatito AT tiscali.it>
- <li>libbb: introduce and use nonblock_safe_read(). Yay! Our shells are immune from this nasty O_NONBLOCK now!
- <li>login,su: avoid clearing environment with some options, as was intended
- <li>microcom: read more than 1 byte from device, if possible
- <li>microcom: split -d (delay) option away from -t
- <li>mktemp: support -p DIR (Timo Teras <timo.teras at iki.fi>)
- <li>mount: #ifdef out MOUNT_LABEL code parts if it is not selected
- <li>mount: add another mount helper call method
- <li>mount: allow and ignore _netdev option
- <li>mount: make -f work even without mtab support (Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com>)
- <li>mount: optional support for -vv verbosity
- <li>mount: plug a hole where FEATURE_MOUNT_HELPERS could allow execution of arbitrary command
- <li>mount: recognize "dirsync" (closes bug 835)
- <li>mount: sanitize environment if called by non-root
- <li>mount: support for mount by label. Closes bug 1143
- <li>mount: with -vv -f, say what mount() calls we were going to make
- <li>msh: create testsuite (based on hush one)
- <li>msh: don't use floating point in "times" builtin
- <li>msh: fix Ctrl-C handling with line editing
- <li>msh: fix for bug 846 ("break" didn't work second time)
- <li>msh: glob0/glob1/glob2/glob3 were just a sorting routine, removed
- <li>msh: instead of fixing "ls | cd", "cd | ls" etc disallow builtins in pipes. They make no sense there anyway
- <li>msh: stop trying to parse variables in "msh SCRIPT VAR=val param". They are passed as ordinary parameters
- <li>netstat: print control chars as "^C" etc
- <li>nmeter: fix bug where %[mf] behaves as %[mt]
- <li>nohup: compat patch by Christoph Gysin <mailinglist.cache at gmail.com>
- <li>od: handle /proc files (which have filesize 0) correctly
- <li>patch: don't trash permissions of patched file
- <li>ps: add conditional support for -o [e]time
- <li>ps: fix COMMAND column adjustment; overflow in USER and VSZ columns
- <li>reset: call "stty sane". Closes bug 1414
- <li>rmdir: optional long options support for Debian users. By Roberto Gordo Saez <roberto.gordo AT gmail.com>
- <li>run-parts: add --reverse
- <li>script: correctly handle buffered "tail" of output
- <li>sed: "n" command must reset "we had successful subst" flag. Closes bug 1214
- <li>sort: -z outputs NUL terminated lines. Closes bug 1591
- <li>stty: fix mishandling of control keywords (Ralf Friedl <Ralf.Friedl AT online.de>)
- <li>switch_root: stop at first non-option. Closes bug 1425
- <li>syslogd: avoid excessive time() system calls
- <li>syslogd: don't die if remote host's IP cannot be resolved. Retry resolutions every two minutes instead
- <li>syslogd: fix shmat error check
- <li>syslogd: optional support for dropping dups. Closes bug 436
- <li>syslogd: send "\n"-terminated messages over the network. Fully closes bug 1574
- <li>syslogd: tighten up hostname handling
- <li>tail: fix "tail -c 20 /dev/huge_disk" (was taking ages)
- <li>tar: compat: handle tarballs with only one zero block at the end
- <li>tar: autodetection of gz/bz2 compressed tarballs. Closes bug 992
- <li>tar: real support for -p. By Natanael Copa <natanael.copa at gmail.com>
- <li>tcpudp: narrow down time window where we have no wildcard socket
- <li>telnetd: use login always, not "sometimes login, sometimes shell"
- <li>test: fix mishandling of "test ! arg1 op arg2 more args"
- <li>trylink: instead of build error, disable --gc-sections if GLIBC and STATIC are selected
- <li>udhcp: make file paths configurable
- <li>udhcp: optional support for non-standard DHCP ports
- <li>udhcp: set correct op byte in the packet for DHCPDECLINE
- <li>udhcpc: filter unwanted packets in kernel (Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn AT axis.com>)
- <li>udhcpc: fix wrong options in decline and release packets (Jonas Danielsson <jonas.danielsson AT axis.com>)
- <li>umount: do not complain several times about the same mountpoint
- <li>umount: do not try to free loop device or erase mtab if remounted ro
- <li>umount: instead of non-standard -D, use -d with opposite meaning. Closes bug 1604
- <li>unlzma: shrink by Pascal Bellard <pascal.bellard AT ads-lu.com>
- <li>unzip: do not try to read entire compressed stream at once (it can be huge)
- <li>unzip: handle short reads correctly
- <li>vi: many fixes
- <li>zcip: don't chdir to root
- <li>zcip: open ARP socket before openlog (else we can thrash syslog socket)
- </ul>
- </p>
-
- <li><b>21 March 2008 -- BusyBox stable releases</b>
- <p>
- Bugfix-only releases for four past branches. Links to locations
- for future hot patches are in parentheses.
- <p>
- <a href=http://busybox.net/downloads/busybox-1.9.2.tar.bz2>1.9.2</a>
- (<a href=http://busybox.net/downloads/fixes-1.9.2/>patches</a>),
- <a href=http://busybox.net/downloads/busybox-1.8.3.tar.bz2>1.8.3</a>
- (<a href=http://busybox.net/downloads/fixes-1.8.3/>patches</a>),
- <a href=http://busybox.net/downloads/busybox-1.7.5.tar.bz2>1.7.5</a>
- (<a href=http://busybox.net/downloads/fixes-1.7.5/>patches</a>),
- <a href=http://busybox.net/downloads/busybox-1.5.2.tar.bz2>1.5.2</a>
- (<a href=http://busybox.net/downloads/fixes-1.5.2/>patches</a>).
- <p>
- <a href=http://busybox.net/fix.html>How to add a patch.</a>
- <p>
- <a href=http://busybox.net/~vda/HOWTO_bbox_with_uclibc.txt>How to build static busybox against uclibc</a>
- <p>
- The email address gpl@busybox.net is the recommended way to contact
- the Software Freedom Law Center to report BusyBox license violations.
- </p>
-
- <li><b>12 February 2008 -- BusyBox 1.9.1 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.9.1.tar.bz2>BusyBox 1.9.1</a>.
- (<a href=http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_9_stable/>svn</a>,
- <a href=http://busybox.net/downloads/fixes-1.9.1/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>This is a bugfix-only release, with fixes to fsck,
- iproute, mdev, mkswap, msh, nameif, stty, test, zcip.</p>
- <p>hush has `command` expansion re-enabled for NOMMU, although it is
- inherently unsafe (by virtue of NOMMU's use of vfork instead of fork).
- The plan is to make this less likely to bite people in future versions.</p>
- </li>
-
- <li><b>24 December 2007 -- BusyBox 1.9.0 (unstable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.9.0.tar.bz2>BusyBox 1.9.0</a>.
- (<a href=http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_9_stable/>svn</a>,
- <a href=http://busybox.net/downloads/fixes-1.9.0/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>Sizes of busybox-1.8.2 and busybox-1.9.0 (with almost full config, static uclibc build):<pre>
- text data bss dec hex filename
- 792796 978 9724 803498 c42aa busybox-1.8.2
- 783803 683 7508 791994 c15ba busybox-1.9.0
-</pre>
- <p>Top 10 stack users:<pre>
-busybox-1.8.2: busybox-1.9.0:
-input_tab 10428 echo_dg 4116
-umount_main 8252 bb_full_fd_action 4112
-rtnl_talk 8240 discard_dg 4096
-xrtnl_dump_filter 8240 echo_stream 4096
-sendMTFValues 5316 discard_stream 4096
-mainSort 4700 find_list_entry2 4096
-mkfs_minix_main 4288 readlink_main 4096
-grave 4260 ipaddr_list_or_flush 3900
-unix_do_one 4156 iproute_list_or_flush 3680
-parse_prompt 4132 insmod_main 3152
-</pre>
-
- <p>lash is deleted from this release. hush can be configured down to almost
- the same size, but it is significantly less buggy. It even works
- on NOMMU machines (interactive mode and backticks are not working on NOMMU,
- though). "lash" applet is still available, but it runs hush.
-
- <p>init has some changes in this release, please report if it causes
- problems for you.
-
- <p>Changes since previous release:
- <ul>
- <li>Build system improvements
- <li>Testsuite additions
- <li>Stack size reductions, code size reductions, data/bss reductions
- <li>An option to prefer IPv4 address if host has both
- <li>New applets: hd, sestatus
- <li>Removed applets: lash
- <li>hush: fixed a few bugs, wired up echo and test to be builtins
- <li>init: simplify forking of children
- <li>getty: special handling of '#' and '@' is removed
- <li>[su]login: sanitize environment if called by non-root
- <li>udhcpc: support "bad" servers which send oversized packets
- (Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com>)
- <li>udhcpc: -O option allows to specify which options to ask for
- (Stefan Hellermann <stefan at the2masters.de>)
- <li>udhcpc: optionally check whether given IP is really free (by ARP ping)
- (Jonas Danielsson <jonas.danielsson at axis.com>)
- <li>vi: now handles files with unlimited line length
- <li>vi: speedup for huge line lengths
- <li>vi: Del key works
- <li>sed: support GNUism '\t'
- <li>cp/mv/install: optionally use bigger buffer for bulk copying
- <li>line editing: don't eat stack like crazy
- <li>passwd: follows symlinked /etc/passwd
- <li>renice: accepts priority with +N too
- <li>netstat: wide output mode
- <li>nameif: extended matching (Nico Erfurth <masta at perlgolf.de>)
- <li>test: become NOFORK applet
- <li>find: -iname (Alexander Griesser <alexander.griesser at lkh-vil.or.at>)
- <li>df: -i option (show inode info) (Pascal Bellard <pascal.bellard at ads-lu.com>)
- <li>hexdump: -R option (Pascal Bellard <pascal.bellard at ads-lu.com>)
- </ul>
- </p>
-
- <li><b>23 November 2007 -- BusyBox 1.8.2 (stable), BusyBox 1.7.4 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.8.2.tar.bz2>BusyBox 1.8.2</a>.
- (<a href=http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_8_stable/>svn</a>,
- <a href=http://busybox.net/downloads/fixes-1.8.2/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
- <p><a href=http://busybox.net/downloads/busybox-1.7.4.tar.bz2>BusyBox 1.7.4</a>.
- (<a href=http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_7_stable/>svn</a>,
- <a href=http://busybox.net/downloads/fixes-1.7.4/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>These are bugfix-only releases.
- 1.8.2 contains fixes for inetd, lash, tar, tr, and build system.
- 1.7.4 contains a fix for inetd.</p>
- </li>
-
- <li><b>9 November 2007 -- BusyBox 1.8.1 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.8.1.tar.bz2>BusyBox 1.8.1</a>.
- (<a href=http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_8_stable/>svn</a>,
- <a href=http://busybox.net/downloads/fixes-1.8.1/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>This is a bugfix-only release, with fixes to login (PAM), modprobe, syslogd, telnetd, unzip.</p>
- </li>
-
- <li><b>4 November 2007 -- BusyBox 1.8.0 (unstable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.8.0.tar.bz2>BusyBox 1.8.0</a>.
- (<a href=http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_8_stable/>svn</a>,
- <a href=http://busybox.net/downloads/fixes-1.8.0/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>Note: this is probably the very last release with lash. It will be dropped. Please migrate to hush.
-
- <p>Applets which had many changes since 1.7.x:
- <p>httpd:
- <ul>
- <li>does not clear environment, CGIs will see all environment variables which were set for httpd
- <li>fix bug where we were trying to read more POSTDATA than content-length
- <li>fix trivial bug (spotted by Alex Landau)
- <li>optional support for partial downloads
- <li>simplified CGI i/o loop (now it looks good to me)
- <li>small auth and IPv6 fixes (Kim B. Heino <Kim.Heino at bluegiga.com>)
- <li>support for proxying connection to other http server (by Alex Landau <landau_alex at yahoo.com>)
- </ul>
-
- <p>top:
- <ul>
- <li>TOPMEM feature - 's(how sizes)' command
- <li>don't wait before final bailout (try top -b -n1)
- <li>fix for command line wrapping
- </ul>
-
- <p>Build system improvements: libbusybox mode restored (it was lost in transition to new makefiles).
-
- <p>Code and data size in comparison with 1.7.3:<pre>
-Equivalent .config, i386 uclibc static builds:
- text data bss dec hex filename
- 768123 1055 10768 779946 be6aa busybox-1.7.3/busybox
- 759693 974 9420 770087 bc027 busybox-1.8.0/busybox</pre>
-
- <p>New applets:
- <ul>
- <li>microcom: new applet by Vladimir Dronnikov <dronnikov at gmail.ru>
- <li>kbd_mode: new applet by Loic Grenie <loic.grenie at gmail.com>
- <li>bzip2: port bzip2 1.0.4 to busybox, 9 kb of code
- <li>pgrep, pkill: new applets by Loic Grenie <loic.grenie at gmail.com>
- <li>setsebool: new applet (Yuichi Nakamura <ynakam at hitachisoft.jp>)
- </ul>
-
- <p>Other changes since previous release (abridged):
- <ul>
- <li>cp: -r and -R imply -d (coreutils compat)
- <li>cp: detect and prevent infinite recursion
- <li>cp: make it a bit closer to POSIX, but still refuse to open and overwrite symbolic link
- <li>hdparm: reduce possibility of numeric overflow in -T
- <li>hdparm: simplify timing measurement
- <li>wget: -O FILE is allowed to overwrite existing file (compat)
- <li>wget: allow dots in header field names
- <li>telnetd: add -K option to close sessions as soon as child exits
- <li>telnetd: don't SIGKILL child when closing the session, kernel will send SIGHUP for us
- <li>ed: large cleanup, add line editing
- <li>hush: feeble attempt at making it more NOMMU-friendly
- <li>hush: fix glob()
- <li>hush: stop doing manual accounting of open fd's, kernel can do it for us
- <li>adduser: implement -S and fix uid selection
- <li>ash: fix prompt expansion (Natanael Copa <natanael.copa at gmail.com>)
- <li>ash: revert "cat | jobs" fix, it causes more problems than good
- <li>find: fix -xdev behavior in the presence of two or more nested mount points
- <li>grep: fix grep -F -e str1 -e str2 (was matching str2 only)
- <li>grep: optimization: stop on first -e match
- <li>gunzip: support concatenated gz files
- <li>inetd: fix bug 1562 "inetd does not set argv[0] properly" (fix by Ilya Panfilov)
- <li>install: 'support' (by ignoring) -v and -b
- <li>install: fix bug in "install -c file dir" (tried to copy dir into dir too)
- <li>ip: tunnel parameter parsing fix by Jean Wolter <jw5 at os.inf.tu-dresden.de>
- <li>isrv: use monotonic_sec
- <li>less: make 'f' key page forward
- <li>libiproute: add missing break statements
- <li>load_policy: update (Yuichi Nakamura <ynakam at hitachisoft.jp>)
- <li>logger: fix a problem of losing all argv except first
- <li>login: do reject wrong passwords with PAM auth
- <li>losetup: support -f (Loic Grenie <loic.grenie at gmail.com>)
- <li>fdisk: make fdisk compile on libc without llseek64
- <li>libbb: by popular request allow PATH to be customized at build time
- <li>mkswap: selinux support by KaiGai Kohei <kaigai at ak.jp.nec.com>
- <li>mount: allow (and ignore) -i
- <li>mount: ignore NFS bg option on NOMMU machines
- <li>mount: mount helpers support (by Vladimir Dronnikov <dronnikov at gmail.ru>)
- <li>passwd: handle Ctrl-C, restore termios on Ctrl-C
- <li>passwd: SELinux support by KaiGai Kohei <kaigai at ak.jp.nec.com>
- <li>ping: make -I ethN work too (-I addr already worked)
- <li>ps: fix RSS parsing (rss field in /proc/PID/stat is in pages, not bytes)
- <li>read_line_input: fix it to not do any fancy editing if echoing is disabled
- <li>run_parts: make it sort executables by name (required by API)
- <li>runsv: do not use clock_gettime if !MONOTONIC_CLOCK
- <li>runsvdir: fix "linear wait time" bug
- <li>sulogin: remove alarm handling, it is redundant there
- <li>svlogd: compat: svlogd -tt should timestamp stderr too
- <li>syslogd: bail out if you see null read from Unix socket
- <li>syslogd: do not need to poll(), we can just block in read()
- <li>tail: work correctly on /proc files (Kazuo TAKADA <kztakada at sm.sony.co.jp>)
- <li>tar + gzip/bzip2/etc: support NOMMU machines (by Alex Landau <landau_alex at yahoo.com>)
- <li>tar: strip leading '/' BEFORE memorizing hardlink's name
- <li>tftp: fix infinite retry bug
- <li>umount: support (by ignoring) -i; style fixes
- <li>unzip: fix endianness bugs
- <li>vi: don't wait 50 ms before reading ESC sequences
- <li>watchdog: allow millisecond spec (-t 250ms)
- <li>zcip: fix unaligned trap on ARM
- </ul>
- </p>
-
- </li>
-
- <li><b>4 November 2007 -- BusyBox 1.7.3 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.7.3.tar.bz2>BusyBox 1.7.3</a>.
- (<a href=http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_7_stable/>svn</a>,
- <a href=http://busybox.net/downloads/fixes-1.7.3/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>This is a bugfix-only release, with fixes to ash, httpd, inetd, iptun, logger, login, tail.</p>
- </li>
-
- <li><b>30 September 2007 -- BusyBox 1.7.2 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.7.2.tar.bz2>BusyBox 1.7.2</a>.
- (<a href=http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_7_stable/>svn</a>,
- <a href=http://busybox.net/downloads/fixes-1.7.2/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>This is a bugfix-only release, with fixes to install, find, login, httpd, runsvdir, chcon, setfiles, fdisk and line editing.</p>
- </li>
-
- <li><b>16 September 2007 -- BusyBox 1.7.1 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.7.1.tar.bz2>BusyBox 1.7.1</a>.
- (<a href=http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_7_stable/>svn</a>,
- <a href=http://busybox.net/downloads/fixes-1.7.1/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>This is a bugfix-only release, with fixes to cp, runsv, tar, busybox --install and build system.</p>
- </li>
-
- <li><b>24 August 2007 -- BusyBox 1.7.0 (unstable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.7.0.tar.bz2>BusyBox 1.7.0</a>.
- (<a href=http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_7_stable/>svn</a>,
- <a href=http://busybox.net/downloads/fixes-1.7.0/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>Applets which had many changes since 1.6.x:
- <p>httpd:
- <ul>
- <li>works in standalone mode on NOMMU machines now (partly by Alex Landau <landau_alex at yahoo.com>)
- <li>indexer example is rewritten in C
- <li>optional support for error pages (by Pierre Metras <genepi at sympatico.ca>)
- <li>stop reading headers using 1-byte reads
- <li>new option -v[v]: prints client addresses, HTTP codes returned, URLs
- <li>extended -p PORT to -p [IP[v6]:]PORT
- <li>sendfile support (by Pierre Metras <genepi at sympatico.ca>)
- <li>add support for Status: CGI header
- <li>fix CGI handling bug (we were closing wrong fd)
- <li>CGI I/O loop still doesn't look 100% ok to me...
- </ul>
-
- <p>udhcp[cd]:
- <ul>
- <li>add -f "foreground" and -S "syslog" options
- <li>fixed "ifupdown + udhcpc_without_pidfile_creation" bug
- <li>new config option "Rewrite the lease file at every new acknowledge" (Mats Erik Andersson <mats at blue2net.com> (Blue2Net AB))
- <li>consistently treat server_config.start/end IPs as host-order
- <li>fix IP parsing for 64bit machines
- <li>fix unsafe hton macro usage in read_opt()
- <li>do not chdir to / when daemonizing
- </ul>
-
- <p>top, ps, killall, pidof:
- <ul>
- <li>simpler loadavg processing
- <li>truncate usernames to 8 chars
- <li>fix non-CONFIG_DESKTOP ps -ww (by rockeychu)
- <li>improve /proc/PID/cmdinfo reading code
- <li>use cmdline, not comm field (fixes problems with re-execed applets showing as processes with name "exe", and not being found by pidof/killall by applet name)
- <li>reduce CPU usage in decimal conversion (optional) (corresponding speedup on kernel side is accepted in mainline Linux kernel, yay!)
- <li>make percentile (0.1%) calculations configurable
- <li>add config option and code for global CPU% display
- <li>reorder columns, so that [P]PIDs are together and VSZ/%MEM are together - makes more sense
- </ul>
-
- <p>Build system improvements: doesn't link against libraries we don't need,
- generates verbose link output and map file, allows for custom link
- scripts (useful for removing extra padding, among other things).
-
- <p>Code and data size in comparison with 1.6.1:<pre>
-Equivalent .config, i386 glibc dynamic builds:
- text data bss dec hex filename
- 672671 2768 16808 692247 a9017 busybox-1.6.1/busybox
- 662948 2660 13528 679136 a5ce0 busybox-1.7.0/busybox
- 662783 2631 13416 678830 a5bae busybox-1.7.0/busybox.customld
-
-Same .config built against static uclibc:
- 765021 1059 11020 777100 bdb8c busybox-1.7.0/busybox_uc</pre>
-
- <p>Code/data shrink done in applets: crond, hdparm, dd, cal, od, nc, expr, uuencode,
- test, slattach, diff, ping, tr, syslogd, hwclock, zcip, find, pidof, ash, uudecode,
- runit/*, in libbb.
-
- <p>New applets:
- <ul>
- <li>pscan, expand, unexpand (from Tito <farmatito at tiscali.it>)
- <li>setfiles, restorecon (by Yuichi Nakamura <ynakam at hitachisoft.jp>)
- <li>chpasswd (by Alexander Shishkin <virtuoso at slind.org>)
- <li>slattach, ttysize
- </ul>
-
- <p>Unfortunately, not much work is done on shells. This was mostly stalled
- by lack of time (read: laziness) on my part to learn how to adapt existing
- qemu-runnable image for a NOMMU architechture (available on qemu website)
- for local testing of cross-compiled busybox on my machine.
-
- <p>Other changes since previous release (abridged):
- <ul>
- <li>addgroup: disallow addgroup -g num user group; make -g 0 work (Tito <farmatito at tiscali.it>)
- <li>adduser: close /etc/{passwd,shadow} before calling passwd etc. Spotted by Natanael Copa <natanael.copa at gmail.com>
- <li>arping: -i should be -I, fixed
- <li>ash: make "jobs | cat" work like in bash (was giving empty output)
- <li>ash: recognize -l as --login equivalent; do not recognize +-login
- <li>ash: fix buglet in DEBUG code (Nguyen Thai Ngoc Duy <pclouds at gmail.com>)
- <li>ash: fix SEGV if type has zero parameters
- <li>awk: fix -F 'regex' bug (miscounted fields if last field is empty)
- <li>catv: catv without arguments was trying to use environ as argv (Alex Landau <landau_alex at yahoo.com>)
- <li>catv: don't die on open error (emit warning)
- <li>chown/chgrp: completely match coreutils 6.8 wrt symlink handling
- <li>correct_password: do not print "no shadow passwd..." message
- <li>crond: don't start sendmail with absolute path, don't report obsolete version (report true bbox version)
- <li>dd: fix bug where we assume count=INT_MAX when count is unspecified
- <li>devfsd: sanitization by Tito <farmatito at tiscali.it>
- <li>echo: fix non-fancy echo
- <li>fdisk: make it work with big disks (read: typical today's disks) even if CONFIG_LFS is unset
- <li>find: -context support for SELinux (KaiGai Kohei <kaigai at kaigai.gr.jp>)
- <li>find: add conditional support for -maxdepth and -regex, make -size match GNU find
- <li>find: fix build failure on certain configs (found by Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com>)
- <li>fsck_minix: make it print bb version, not it's own (outdated/irrelevant) one
- <li>grep: implement -m MAX_MATCHES, fix buglets with context printing
- <li>grep: fix selection done by FEATURE_GREP_EGREP_ALIAS (Maxime Bizon <mbizon at freebox.fr> (Freebox))
- <li>hush: add missing dependencies (Maxime Bizon <mbizon at freebox.fr> (Freebox))
- <li>hush: fix read builtin to not read ahead past EOL and to not use insane amounts of stack
- <li>ifconfig: make it work with ifaces with interface no. > 255
- <li>ifup/ifdown: make location of ifstate configurable
- <li>ifupdown: make netmask parsing smaller and more strict (was accepting 255.0.255.0, 255.1234.0.0 etc...)
- <li>install: fix -s (strip) option, fix install a b /a/link/to/dir
- <li>libbb: consolidate ARRAY_SIZE macro (Walter Harms <wharms at bfs.de>)
- <li>libbb: make /etc/network parsing configurable. -200 bytes when off
- <li>libbb: nuke BB_GETOPT_ERROR, always die if there are mutually exclusive options
- <li>libbb: xioctl and friends by Tito <farmatito at tiscali.it>
- <li>login: optional support for PAM
- <li>login: make /etc/nologin support configurable (-240 bytes)
- <li>login: ask passwords even for wrong usernames
- <li>md5_sha1_sum: fix mishandling when run as /bin/md5sum
- <li>mdev: add support for firmware loading
- <li>mdev: work even when CONFIG_SYSFS_DEPRECATED in kernel is off
- <li>modprobe: add scanning of /lib/modules/`uname -r`/modules.symbols (by Yann E. MORIN <yann.morin.1998 at anciens.enib.fr>)
- <li>more: fixes by Tristan Schmelcher <tpkschme at engmail.uwaterloo.ca>
- <li>nc: make connecting to IPv4 from IPv6-enabled hosts easier (was requiring -s local_addr)
- <li>passwd: fix bug "updating shadow even if user's record is in passwd"
- <li>patch: fix -p -1 handling
- <li>patch: fix bad line ending handling (Nguyen Thai Ngoc Duy <pclouds at gmail.com>)
- <li>ping: display roundtrip times with 1/1000th of ms, not 1/10 ms precision.
- <li>ping: fix incorrect handling of -I (Iouri Kharon <bc-info at styx.cabel.net>)
- <li>ping: fix non-fancy ping6
- <li>printenv: fix "printenv VAR1 VAR2" bug (spotted by Kalyanatejaswi Balabhadrapatruni <kalyanatejaswi at yahoo.co.in>)
- <li>ps: fix -Z (by Yuichi Nakamura <ynakam at hitachisoft.jp>)
- <li>rpm: add optional support for bz2 data. +50 bytes of code
- <li>rpm: fix bogus "package is not installed" case
- <li>sed: fix 'q' command handling (by Nguyen Thai Ngoc Duy <pclouds at gmail.com>)
- <li>start_stop_daemon: NOMMU fixes by Alex Landau <landau_alex at yahoo.com>
- <li>stat: fix option -Z SEGV
- <li>strings: strings a b was processing a twice, fix that
- <li>svlogd: fix timestamping, do not warn if config is missing
- <li>syslogd, logread: get rid of head pointer, fix logread bug in the process
- <li>syslogd: do not convert tabs to ^I, set syslog IPC buffer to mode 0644
- <li>tar: improve OLDGNU compat, make old SUN compat configurable
- <li>test: fix testing primary expressions like '"-u" = "-u"'
- <li>uudecode: fix to base64 decode by Jorgen Cederlof <jcz at google.com>
- <li>vi: multiple fixes by Natanael Copa <natanael.copa at gmail.com>
- <li>wget: fix bug in base64 encoding (bug 1404). +10 bytes
- <li>wget: lift 256 chars limitation on terminal width
- <li>wget, zcip: use monotonic_sec instead of gettimeofday
- </ul>
- </p>
- </li>
-
- <li><b>30 June 2007 -- BusyBox 1.6.1 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.6.1.tar.bz2>BusyBox 1.6.1</a>.
- (<a href=http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_6_stable/>svn</a>,
- <a href=http://busybox.net/downloads/fixes-1.6.1/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>This is a bugfix-only release, with fixes to echo, hush, and wget.</p>
- </li>
-
- <li><b>1 June 2007 -- BusyBox 1.6.0 (unstable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.6.0.tar.bz2>BusyBox 1.6.0</a>.
- (<a href=http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_6_stable/>svn</a>,
- <a href=http://busybox.net/downloads/fixes-1.6.0/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>Since this is a x.x.0 release, it probably does not deserve "stable"
- label. Please help making 1.6.1 stable by testing 1.6.0.</p>
- <p>Note that hush shell had many changes and (hopefully) is much improved now,
- but there is a possibility that it regressed in some obscure cases. Please
- report any such cases.</p>
- <p>lash users please note: lash is going to be deprecated in busybox 1.7.0
- and removed in the more distant future. Please migrate to hush.</p>
- <p><a href=http://busybox.net/~vda/mem_usage-1.6.0.txt>Memory usage has decreased, but we can do better still</a></p>
- <p>Other changes since previous release:
- <ul>
-<li>NOFORK: audit small applets and mark some of them as NOFORK. Put big scary warnings in relevant places
-<li>NOFORK: factor out NOFORK/NOEXEC code from find. Use NOFORK/NOEXEC in find and xargs
-<li>NOFORK: remove potential xmalloc from NOFORK path in bb_full_fd_action
-<li>NOMMU: random fixes; compressed --help now works for NOMMU
-<li>SELinux: load_policy applet
-<li>[u]mount: extend -t option (Roy Marples <uberlord at gentoo.org>)
-<li>addgroup: clean up, fix adding users to existing groups and make it optional (Tito)
-<li>adduser: don't bomb out if shadow password file doesn't exist (from Tito <farmatito at tiscali.it>)
-<li>applet.c: do not even try to read config if run by real root; fix suid config handling
-<li>ash: fix infinite loop on exit if tty is not there anymore
-<li>ash: fix kill -l (by Mats Erik Andersson <mats.andersson64 at comhem.se>)
-<li>ash: implement type -p, costs less than 10 bytes (patch by Mats Erik Andersson <mats.andersson64 at comhem.se>)
-<li>awk: don't segfault on printf(%*s). Closes bug 1337
-<li>awk: guard against empty environment
-<li>awk: some 'lineno' vars were shorts, made them ints (code got smaller)
-<li>cat: stop using stdio.h opens
-<li>config system: clarify PREFER_APPLETS/SH_STANDALONE effects in help text
-<li>cryptpw: new applet (by Thomas Lundquist <lists at zelow.no>)
-<li>cttyhack: new applet
-<li>dd: NOEXEC fix; fix skip= parse error (spotted by Dirk Clemens <develop at cle-mens.de>)
-<li>deluser: add optional support for removing users from groups (by Tito <farmatito at tiscali.it>)
-<li>diff: fix SEGV (NULL deref) in diff -N
-<li>diff: fix segfault on empty dirs (Peter Korsgaard <peter.korsgaard at barco.com>)
-<li>dnsd: fix several buglets, make smaller; openlog(), so that applet's name is logged
-<li>dpkg: run_package_script() returns 0 if all ok and non-zero if failure. The result code was checked incorrectly in two places. (from Kim B. Heino <Kim.Heino at bluegiga.com>)
-<li>dpkg: use bitfields which are a bit closer to typical short/char. Code size -800 bytes
-<li>dumpleases: getopt32()-ization (from Mats Erik Andersson <mats.andersson64 at comhem.se>)
-<li>e2fsprogs: stop using statics in chattr. Minor code shrinkage (-130 bytes)
-<li>ether-wake: close bug 1317. Reorder fuctions to avoid forward refs while at it
-<li>ether-wake: save a few more bytes of code
-<li>find: -group, -depth (Natanael Copa <natanael.copa at gmail.com>)
-<li>find: add support for -delete, -path (by Natanael Copa)
-<li>find: fix -prune. Add big comment about it
-<li>find: improve usage text (Natanael Copa <natanael.copa at gmail.com>)
-<li>find: missed 'static' on const data; size and prune were mixed up; use index_in_str_array
-<li>find: un-DESKTOPize (Kai Schwenzfeier <niteblade at gmx.net>)
-<li>find_root_device: teach to deal with /dev/ subdirs (by Kirill K. Smirnov <lich at math.spbu.ru>)
-<li>find_root_device: use lstat - don't follow links
-<li>getopt32: fix llist_t options ordering. llist_rev is now unused
-<li>getopt: use getopt32 for option parsing - inspired by patch by Mats Erik Andersson <mats.andersson64 at comhem.se>
-<li>hdparm: fix multisector mode setting (from Toni Mirabete <amirabete at catix.cat>)
-<li>hdparm: make -T -t code smaller (-194 bytes), and output prettier
-<li>ifupdown: make it possible to use DHCP clients different from udhcp
-<li>ifupdown: reread state file before rewriting it. Fixes "ifup started another ifup" state corruption bug. Patch by Natanael Copa <natanael.copa at gmail.com>
-<li>ifupdown: small optimization (avoid doing useless work if we are not going to update state file)
-<li>ip: fix compilation if FEATURE_TR_CLASSES is off
-<li>ip: mv ip*_main into ip.c; use a dispatcher to save on needless duplication. Saves a minor 12b
-<li>ip: rewrite the ip applet to be less bloaty. Convert to index_in_(sub)str_array()
-<li>ip: set the scope properly. Thanks to Jean Wolter
-<li>iplink: shrink iplink; sanitize libiproute a bit (-916 bytes)
-<li>iproute: shrink a bit (-200 bytes)
-<li>kill: know much more signals; make code smaller; use common code for kill applet and ash kill builtin
-<li>klogd: remove dependency on syslogd
-<li>lash: "forking" applets are actually can be treated the same way as "non-forked". Also save a bit of space on trailing NULL array elements.
-<li>lash: fix kill buglet (didn't properly recognize ESRCH)
-<li>lash: make -c work; crush buffer overrun and free of non-malloced ptr (from Mats Erik Andersson <mats.andersson64 at comhem.se>)
-<li>lash: recognize and use NOFORK applets
-<li>less: fix case when regex search finds nothing; fix very obscure memory corruption bug; fix less <HUGEFILE + [End] busy loop
-<li>libbb: add xsendto, xunlink, xpipe
-<li>libbb: fix segfault in reset_ino_dev_hashtable() when *hashtable was NULL
-<li>libbb: make pidfile writing configurable
-<li>libbb: make xsocket die with address family printed (if VERBOSE_RESOLUTION_ERRORS=y)
-<li>libbb: rework NOMMU helper API so that it makes more sense and easier to use
-<li>libiproute: audit callgraph, shortcut error paths into die() functions
-<li>lineedit: do not try to open NULL history file
-<li>lineedit: nuke two unused variables and code which sets them
-<li>login: remove setpgrp call (makes it work from shell prompt again); sanitize stdio descriptors (we are suid, need to be careful!)
-<li>login: shrink login and set_environment by ~100 bytes
-<li>mount: fix incorrect usage of strtok (inadvertently used NULL sometimes)
-<li>mount: fix mounting of symlinks (mount from util-linux allows that)
-<li>msh: data/bss reduction (more than 9k of it); fix "underscore bug" (a_b=1111 didn't work); fix obscure case with backticks and closed fd 1
-<li>nc: port nc 1.10 to busybox
-<li>netstat: fix for bogus state value for raw sockets
-<li>netstat: introduce -W: wide, ipv6-friendly output; shrink by ~500 bytes
-<li>nmeter: should die if stdout doesn't like him anymore
-<li>patch: do not try to delete same file twice
-<li>ping: fix wrong sign extension of packet id (bug 1373)
-<li>ps: add -o tty and -o rss support; make a bit smaller; work around libc bug: printf("%.*s\n", MAX_INT, buffer)
-<li>run_parts: rewrite
-<li>run_parts: do not check path portion of a name for "bad chars". Needed for ifupdown. Patch by Gabriel L. Somlo <somlo at cmu.edu>
-<li>sed: fix escaped newlines in -f
-<li>split: new applet
-<li>stat: remove superfluous bss user (flags) and manually unswitch some areas
-<li>stty: fix option parsing bug (spotted by Sascha Hauer <s.hauer at pengutronix.de>)
-<li>svlogd: fix 'SEGV on uninitialized data' and make it honor TERM
-<li>tail: fix SEGV on "tail -N"
-<li>ipsvd: tcpsvd,udpsvd are new applets, GPL-ed 'clones' of Dan Bernstein's tcpserver. Author: Gerrit Pape <pape at smarden.org>, http://smarden.sunsite.dk/ipsvd/
-<li>test: close bug 1371; plug a memory leak; code size reduction
-<li>tftp: code diet, and I think retransmits were broken
-<li>tr: fix bug where we did not reject invalid classes like '[[:alpha'. debloat while at it
-<li>udhcp: MAC_BCAST_ADDR and blank_chaddr are in fact constant, move to rodata; use pipe instead of socketpair
-<li>udhcp[cd]: stop using atexit magic fir pidfile removal; stop deleting our own pidfile if we daemonize
-<li>xargs: shrink code, ~80 bytes; simplify word list management
-<li>zcip: make it work on NOMMU (+ improve NOMMU support machinery)
- </ul>
- </p>
- </li>
-
- <li><b>20 May 2007 -- BusyBox 1.5.1 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.5.1.tar.bz2>BusyBox 1.5.1</a>.
- (<a href=http://busybox.net/downloads/fixes-1.5.1/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>This is a bugfix-only release, with fixes to hdparm, hush, ifupdown, ps
- and sed.</p>
- </li>
-
- <li><b>23 March 2007 -- BusyBox 1.5.0 (unstable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.5.0.tar.bz2>BusyBox 1.5.0</a>.
- (<a href=http://busybox.net/downloads/fixes-1.5.0/>patches</a>,
- <a href=http://busybox.net/fix.html>how to add a patch</a>)</p>
-
- <p>Since this is a x.x.0 release, it probably does not deserve "stable"
- label. Please help making 1.5.1 stable by testing 1.5.0.</p>
- <p>Notable changes since previous release:
- <ul>
- <li>find: added support for -user, -not, fixed -mtime, -mmin, -perm
- <li>[de]archivers: merge common logic into one module
- <li>ping[6]: unified code for both
- <li>less: regex search improved
- <li>ash: more readable code, testsuite added
- <li>sed: several very obscure bugs fixed
- <li>chown: -H, -L, -P support (required by POSIX)
- <li>tar: handle (broken) checksums a-la Sun; tar restores mode again
- <li>grep: implement -w, "implement" -a and -I by ignoring them
- <li>cp: more sane behavior when overwriting existing files
- <li>init: stop doing silly things with the console (-400 bytes)
- <li>httpd: make httpd usable for NOMMU CPUs; fix POSTDATA handling bugs
- <li>httpd: run interpreter for configured file extensions in any dir,
- not only in /cgi-bin/
- <li>chrt: new applet
- <li>SELinux: SELinux-related code and -Z option added to several applets,
- new SELinux-specific applets: chcon, runcon.
- <li>Build system: produces link map, uses -Wwrite-strings to catch
- improper usage of string constants.
- <li>Data and bss section usage audited and reduced - should help NOMMU
- targets.
- <li>Applets with bug fixes: gunzip, vi, syslogd, dpkg, ls, adjtimex, resize,
- sv, printf, diff, awk, sort, dpkg, diff, tftp
- <li>Applets with usability improvements: swapon, more, ifup/ifdown, hwclock,
- udhcpd, start_stop_daemon, cmp
- <li>Applets with code cleaned up: telnet, fdisk, fsck_minix, mkfs_minix,
- syslogd, swapon, runsv, svlogd, klogd
- </ul>
- </p>
- </li>
-
- <li><b>18 March 2007 -- BusyBox 1.4.2 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.4.2.tar.bz2>BusyBox 1.4.2</a>.
- </p>
-
- <p>This release includes only trivial fixes accumulated since 1.4.1.
- </p>
- </li>
-
- <li><b>25 January 2007 -- BusyBox 1.4.1 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.4.1.tar.bz2>BusyBox 1.4.1</a>.
- (<a href=http://busybox.net/downloads/fixes-1.4.1/>patches</a>)</p>
-
- <p>This release includes only trivial fixes accumulated since 1.4.0.
- </p>
- </li>
-
- <li><b>20 January 2007 -- BusyBox 1.4.0 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.4.0.tar.bz2>BusyBox 1.4.0</a>.
- (<a href=http://busybox.net/downloads/fixes-1.4.0/>patches</a>)</p>
-
- <p>Since this is a x.x.0 release, it probably is a bit less "stable"
- than usual.</p>
- <p>Changes since previous release:
- <ul>
- <li>e2fsprogs are mostly removed from busybox. Some smaller parts remain,
- the rest of it sits disabled in e2fsprogs/old_e2fsprogs/*, because
- it's too bloated. Really. I'm afraid it's about the only way we can
- ever get e2fsprogs cleaned up.
- <li>less: many improvements. Now can display binary files
- (although I expect it to have trouble with displays where 8bit chars
- don't have 1-to-1 char/glyph relationship). Regexp search is not buggy
- anymore. Less does not read entire input up-front. Reads input
- as it appears (yay!). Works rather nice as man pager. I recommend it
- for general use now.
- <li>IPv6: generic support is in place, many networking applets are
- upgraded to be IPv6 capable. Probably some work remains, but it is
- already much better than what we had previously.
- <li>arp: new applet (thanks to Eric Spakman).
- <li>fakeidentd: non-forking standalone server part was taking ~90%
- of the applet. Factored it out (in fact, rewrote it).
- <li>syslogd: mostly rewritten.
- <li>decompress_unzip, gzip: sanitized a bit.
- <li>sed: better hadling of NULs
- <li>httpd: stop adding our own "Content-type:" to CGI output
- <li>chown: user.grp works again.
- <li>minor bugfixes to: passwd, date, tftp, start_stop_daemon, tar,
- ps, ifupdown, time, su, stty, awk, ping[6], sort,...
- </ul>
- </p>
- </li>
-
- <li><b>20 January 2007 -- BusyBox 1.3.2 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.3.2.tar.bz2>BusyBox 1.3.2</a>.</p>
-
- <p>This release includes only one trivial fix accumulated since 1.3.1
- </p>
- </li>
-
- <li><b>27 December 2006 -- BusyBox 1.3.1 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.3.1.tar.bz2>BusyBox 1.3.1</a>.
- (<a href=http://busybox.net/downloads/fixes-1.3.1/>patches</a>)</p>
-
- <p>Closing 2006 with new release. It includes only trivial fixes accumulated since 1.3.0
- </p>
- </li>
-
- <li><b>14 December 2006 -- BusyBox 1.3.0 (stable)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.3.0.tar.bz2>BusyBox 1.3.0</a>.
- (<a href=http://busybox.net/downloads/fixes-1.3.0/>patches</a>)</p>
-
- <p>This release has CONFIG_DESKTOP option which enables features
- needed for busybox usage on desktop machine. For example, find, chmod
- and chown get several less frequently used options, od is significantly
- bigger but matches GNU coreutils, etc. Intended to eventually make
- busybox a viable alternative for "standard" utilities for slightly
- adventurous desktop users.
- <p>Changes since previous release:
- <ul>
- <li>find: taking many more of standard options
- <li>ps: POSIX-compliant -o implemented
- <li>cp: added -s, -l
- <li>grep: added -r, fixed -h
- <li>watch: make it exec child like standard one does (was totally
- incompatible)
- <li>tar: fix limitations which were preventing bbox tar usage
- on big directories: long names and linknames, pax headers
- (Linux kernel tarballs have that). Fixed a number of obscure bugs.
- Raised max file limit (now 64Gb). Security fixes (/../ attacks).
- <li>httpd: added -i (inetd), -f (foreground), support for
- directory indexer CGI (example is included), bugfixes.
- <li>telnetd: fixed/improved IPv6 support, inetd+standalone support,
- other fixes. Useful IPv6 stuff factored out into libbb.
- <li>runit/*: new applets adapted from http://smarden.sunsite.dk/runit/
- (these are my personal favorite small-and-beautiful toys)
- <li>minor bugfixes to: login, dd, mount, umount, chmod, chown, ln, udhcp,
- fdisk, ifconfig, sort, tee, mkswap, wget, insmod.
- </ul>
- <p>Note that GnuPG key used to sign this release is different.
- 1.2.2.1 is also signed post-factum now. Sorry for the mess.
- </p>
- </li>
-
- <li><b>29 October 2006 -- BusyBox 1.2.2.1 (fix)</b>
- <p><a href=http://busybox.net/downloads/busybox-1.2.2.1.tar.bz2>BusyBox 1.2.2.1</a>.</p>
-
- <p>Added compile-time warning that static linking against glibc
- produces buggy executables.
- </li>
-
- <li><b>24 October 2006 -- BusyBox 1.2.2 (stable)</b>
- <p>It's a bit overdue, but
- <a href=http://busybox.net/downloads/busybox-1.2.2.tar.bz2>here is
- BusyBox 1.2.2</a>.</p>
-
- <p>This release has dozens of fixes backported from the ongoing development
- branch. There are a couple of bugfixes to sed, two fixes to documentation
- generation (BusyBox.html shouldn't have USE() macros in it anymore), fix
- umount to report the right errno on failure and to umount block devices by
- name with newer kernels, fix mount to handle symlinks properly, make mdev
- delete device nodes when called for hotplug remove, fix a segfault
- in traceroute, a minor portability fix to md5sum option parsing, a build
- fix for httpd with old gccs, an options parsing tweak to hdparm, make test
- fail gracefully when getgroups() returns -1, fix a race condition in
- modprobe when two instances run at once (hotplug does this), make "tar xf
- foo.tar dir/dir" extract all subdirectories, make our getty initialize the
- terminal more like mingetty, an selinux build fix, an endianness fix in
- ping6, fix for zcip defending addresses, clean up some global variables in
- gzip to save memory, fix sulogin -tNNN, a help text tweak, several warning
- fixes and build fixes, fixup dnsd a bit, and a partridge in a pear tree.</p>
-
- <p>As <a href=http://lwn.net/Articles/202106/>Linux Weekly News noted</a>,
- this is my (Rob's) last release of BusyBox. The new maintainer is Denis
- Vlasenko, I'm off to do <a href=http://landley.net/code>other things</a>.
- </p>
- </li>
-
- <li><b>29 September 2006 -- New license email address.</b>
- <p>The email address gpl@busybox.net is now the recommended way to contact
- the Software Freedom Law Center to report BusyBox license violations.</p>
-
- <li><b>31 July 2006 -- BusyBox 1.2.1 (stable)</b>
- <p>Since nobody seems to have objected too loudly over the weekend, I
- might as well point you all at
- <a href="http://busybox.net/downloads/busybox-1.2.1.tar.bz2">Busybox
- 1.2.1</a>, a bugfix-only release with no new features.</p>
-
- <p>It has three shell fixes (two to lash: going "var=value" without
- saying "export" should now work, plus a missing null pointer check, and
- one to ash when redirecting output to a file that fills up.) Fix three
- embarassing thinkos in the new dmesg command. Two build tweaks
- (dependencies for the compressed usage messages and running make in the
- libbb subdirectory). One fix to tar so it can extract git-generated
- tarballs (rather than barfing on the pax extensions). And a partridge
- in a pear... Ahem.</p>
-
- <p>But wait, there's more! A passwd changing fix so an empty
- gecos field doesn't trigger a false objection that the new passwd contains
- the gecos field. Make all our setuid() and setgid() calls check the return
- value in case somebody's using per-process resource limits that prevent
- a user from having too many processes (and thus prevent a process from
- switching away from root, in which case the process will now _die_ rather
- than continue with root privileges). A fix to adduser to make sure that
- /etc/group gets updated. And a fix to modprobe to look for modules.conf
- in the right place on 2.6 kernels.</p>
-
- <li><b>30 June 2006 -- BusyBox 1.2.0</b>
- <p>The -devel branch has been stabilized and the result is
- <a href="http://busybox.net/downloads/busybox-1.2.0.tar.bz2">Busybox
- 1.2.0</a>. Lots of stuff changed, I need to work up a decent changelog
- over the weekend.</p>
-
- <p>I'm still experimenting with how long is best for the development
- cycle, and since we've got some largeish projects queued up I'm going to
- try a longer one. Expect 1.3.0 in December. (Expect 1.2.1 any time
- we fix enough bugs. :)</p>
-
- <p>Update: Here are <a href="http://busybox.net/downloads/busybox-1.2.0.fixes.patch">the first few bug fixes</a> that will go into 1.2.1.</p>
-
- <li><b>17 May 2006 -- BusyBox 1.1.3 (stable)</b>
- <p><a href="http://busybox.net/downloads/busybox-1.1.3.tar.bz2">BusyBox
- 1.1.3</a> is another bugfix release. It makes passwd use salt, fixes a
- memory freeing bug in ls, fixes "build all sources at once" mode, makes
- mount -a not abort on the first failure, fixes msh so ctrl-c doesn't kill
- background processes, makes patch work with patch hunks that don't have a
- timestamp, make less's text search a lot more robust (the old one could
- segfault), and fixes readlink -f when built against uClibc.</p>
-
- <p>Expect 1.2.0 sometime next month, which won't be a bugfix release.</p>
-
- <li><b>10 April 2006 -- BusyBox 1.1.2 (stable)</b>
- <p>You can now download <a href="http://busybox.net/downloads/busybox-1.1.2.tar.bz2">BusyBox 1.1.2</a>, a bug fix release consisting of 11 patches
- backported from the development branch: Some build fixes, several fixes
- for mount and nfsmount, a fix for insmod on big endian systems, a fix for
- find -xdev, and a fix for comm. Check the file "changelog" in the tarball
- for more info.</p>
-
- <p>The next new development release (1.2.0) is slated for June. A 1.1.3
- will be released before then if more bug fixes crop up. (The new plan is
- to have a 1.x.0 new development release every 3 months, with 1.x.y stable
- bugfix only releases based on that as appropriate.)</p>
-
- <li><b>27 March 2006 -- Software Freedom Law Center representing BusyBox and uClibc</b>
- <p>One issue Erik Andersen wanted to resolve when handing off BusyBox
- maintainership to Rob Landley was license enforcement. BusyBox and
- uClibc's existing license enforcement efforts (pro-bono representation
- by Erik's father's law firm, and the
- <a href="http://www.busybox.net/shame.html">Hall of Shame</a>), haven't
- scaled to match the popularity of the projects. So we put our heads
- together and did the obvious thing: ask Pamela Jones of
- <a href="http://www.groklaw.net">Groklaw</a> for suggestions. She
- referred us to the fine folks at softwarefreedom.org.</p>
-
- <p>As a result, we're pleased to announce that the
- <a href="http://www.softwarefreedom.org">Software Freedom Law Center</a>
- has agreed to represent BusyBox and uClibc. We join a number of other
- free and open source software projects (such as
- <a href="http://lwn.net/Articles/141806/">X.org</a>,
- <a href="http://lwn.net/Articles/135413/">Wine</a>, and
- <a href="http://plone.org/foundation/newsitems/software-freedom-law-center-support/">Plone</a>
- in being represented by a fairly cool bunch of lawyers, which is not a
- phrase you get to use every day.</p>
-
- <li><b>22 March 2006 -- BusyBox 1.1.1</b>
- <p>The new maintainer is Rob Landley, and the new release is <a href="http://busybox.net/downloads/busybox-1.1.1.tar.bz2">BusyBox 1.1.1</a>. Expect a "what's new" document in a few days. (Also, Erik and I have have another announcement pending...)</p>
- <p>Update: Rather than put out an endless stream of 1.1.1.x releases,
- the various small fixes have been collected together into a
- <a href="http://busybox.net/downloads/busybox-1.1.1.fixes.patch">patch</a>,
- and new fixes will be appended to that as needed. Expect 1.1.2 around
- June.</p>
- </li>
- <li><b>11 January 2006 -- 1.1.0 is out</b>
- <p>The new stable release is
- <a href="http://www.busybox.net/downloads/busybox-1.1.0.tar.bz2">BusyBox
- 1.1.0</a>. It has a number of improvements, including several new applets.
- (It also has <a href="http://www.busybox.net/lists/busybox/2006-January/017733.html">a few rough spots</a>,
- but we're trying out a "release early, release often" strategy to see how
- that works. Expect 1.1.1 sometime in March.)</p>
-
- <li><b>Old News</b><p>
- <a href="/oldnews.html">Click here to read older news</a>
- </p>
- </li>
-
-
-</ul>
-
-<!--#include file="footer.html" -->
-
+++ /dev/null
-<!--#include file="header.html" -->
-
-
-<ul>
- <li><b>31 October 2005 -- 1.1.0-pre1</b>
- <p>The development branch of busybox is stable enough for wider testing, so
- you can now
- <a href="http://www.busybox.net/downloads/busybox-1.1.0-pre1.tar.bz2">download</a>,
- the first prerelease of 1.1.0. This prerelease includes a lot of
- <a href="http://www.busybox.net/downloads/BusyBox.html">new
- functionality</a>: new applets, new features, and extensive rewrites of
- several existing applets. This prerelease should be noticeably more
- <a href="http://www.opengroup.org/onlinepubs/009695399/">standards
- compliant</a> than earlier versions of busybox, although we're
- still working out the <a href="http://bugs.busybox.net">bugs</a>.</p>
-
- <li><b>16 August 2005 -- 1.01 is out</b>
-
- <p>A new stable release (<a href="http://www.busybox.net/downloads/busybox-1.01.tar.bz2">BusyBox
- 1.01</a>) is now available for download, containing over a hundred
- <a href="http://www.busybox.net/lists/busybox/2005-August/015424.html">small
- fixes</a> that have cropped up since the 1.00 release.</p>
-
- <li><b>13 January 2005 -- Bug and Patch Tracking</b><p>
-
- Bug reports sometimes get lost when posted to the mailing list. The
- developers of BusyBox are busy people, and have only so much they can keep
- in their brains at a time. In my case, I'm lucky if I can remember my own
- name, much less a bug report posted last week... To prevent your bug report
- from getting lost, if you find a bug in BusyBox, please use the
- <a href="http://bugs.busybox.net/">shiny new Bug and Patch Tracking System</a>
- to post all the gory details.
-
- <p>
-
- The same applies to patches... Regardless of whether your patch
- is a bug fix or adds spiffy new features, please post your patch
- to the Bug and Patch Tracking System to make certain it is
- properly considered.
-
-
- <p>
- <li><b>13 October 2004 -- BusyBox 1.00 released</b><p>
-
- When you take a careful look at nearly every embedded Linux device or
- software distribution shipping today, you will find a copy of BusyBox.
- With countless routers, set top boxes, wireless access points, PDAs, and
- who knows what else, the future for Linux and BusyBox on embedded devices
- is looking very bright.
-
- <p>
-
- It is therefore with great satisfaction that I declare each and every
- device already shipping with BusyBox is now officially out of date.
- The highly anticipated release of BusyBox 1.00 has arrived!
-
- <p>
-
- Over three years in development, BusyBox 1.00 represents a tremendous
- improvement over the old 0.60.x stable series. Now featuring a Linux
- KernelConf based configuration system (as used by the Linux kernel),
- Linux 2.6 kernel support, many many new applets, and the development
- work and testing of thousands of people from around the world.
-
- <p>
-
- If you are already using BusyBox, you are strongly encouraged to upgrade to
- BusyBox 1.00. If you are considering developing an embedded Linux device
- or software distribution, you may wish to investigate if using BusyBox is
- right for your application. If you need help getting started using
- BusyBox, if you wish to donate to help cover expenses, or if you find a bug
- and need help reporting it, you are invited to visit the <a
- href="FAQ.html">BusyBox FAQ</a>.
-
- <p>
-
- As usual you can <a href="downloads">download busybox here</a>.
-
- <p>Have Fun!
-
- <p>
- <li><b>Old News</b><p>
- <a href="/oldnews.html">Click here to read older news</a>
-
-
- <li><b>16 August 2004 -- BusyBox 1.0.0-rc3 released</b><p>
-
- Here goes release candidate 3...
- <p>
- The <a href="downloads/Changelog">changelog</a> has all the details.
- And as usual you can <a href="downloads">download busybox here</a>.
-
- <p>Have Fun!
-
- <p>
- <li><b>26 July 2004 -- BusyBox 1.0.0-rc2 released</b><p>
-
- Here goes release candidate 2...
- <p>
- The <a href="downloads/Changelog">changelog</a> has all the details.
- And as usual you can <a href="downloads">download busybox here</a>.
-
- <p>Have Fun!
-
- <p>
- <li><b>20 July 2004 -- BusyBox 1.0.0-rc1 released</b><p>
-
- Here goes release candidate 1... This fixes all (most?) of the problems
- that have turned up since -pre10. In particular, loading and unloading of
- kernel modules with 2.6.x kernels should be working much better.
- <p>
-
- I <b>really</b> want to get BusyBox 1.0.0 released soon and I see no real
- reason why the 1.0.0 release shouldn't happen with things pretty much as
- is. BusyBox is in good shape at the moment, and it works nicely for
- everything that I'm doing with it. And from the reports I've been getting,
- it works nicely for what most everyone else is doing with it as well.
- There will eventually be a 1.0.1 anyway, so we might as well get on with
- it. No, BusyBox is not perfect. No piece of software ever is. And while
- there is still plenty that can be done to improve things, most of that work
- is waiting till we can get a solid 1.0.0 release out the door....
- <p>
-
- Please do not bother to send in patches adding cool new features at this
- time. Only bug-fix patches will be accepted. If you have submitted a
- bug-fixing patch to the busybox mailing list and no one has emailed you
- explaining why your patch was rejected, it is safe to say that your patch
- has been lost or forgotten. That happens sometimes. Please re-submit your
- bug-fixing patch to the BusyBox mailing list, and be sure to put "[PATCH]"
- at the beginning of the email subject line!
-
- <p>
- The <a href="downloads/Changelog">changelog</a> has all the details.
- And as usual you can <a href="downloads">download busybox here</a>.
-
- <p>Have Fun!
-
- <p>
- On a less happy note, My 92 year old grandmother (my dad's mom) passed away
- yesterday (June 19th). The funeral will be Thursday in a little town about
- 2 hours south of my home. I've checked and there is absolutely no way I
- could be back in time for the funeral if I attend <a
- href="http://www.linuxsymposium.org/2004/">OLS</a> and give my presentation
- as scheduled.
- <p>
- As such, it is with great reluctance and sadness that I have come
- to the conclusion I will have to make my appologies and skip OLS
- this year.
- <p>
-
-
- <p>
- <li><b>13 April 2004 -- BusyBox 1.0.0-pre10 released</b><p>
-
- Ok, I lied. It turns out that -pre9 will not be the final BusyBox
- pre-release. With any luck however -pre10 will be, since I <b>really</b>
- want to get BusyBox 1.0.0 released very soon. As usual, please do not
- bother to send in patches adding cool new features at this time. Only
- bug-fix patches will be accepted. It would also be <b>very</b> helpful if
- people could continue to review the BusyBox documentation and submit
- improvements.
-
- <p>
- The <a href="downloads/Changelog">changelog</a> has all the details.
- And as usual you can <a href="downloads">download busybox here</a>.
-
- <p>Have Fun!
- <p>
-
-
- <p>
- <li><b>6 April 2004 -- BusyBox 1.0.0-pre9 released</b><p>
-
- Here goes the final BusyBox pre-release... This is your last chance for
- bug fixes. With luck this will be released as BusyBox 1.0.0 later this
- week. Please do not bother to send in patches adding cool new features at
- this time. Only bug-fix patches will be accepted. It would also be
- <b>very</b> helpful if people could help review the BusyBox documentation
- and submit improvements. I've spent a lot of time updating the
- documentation to make it better match reality, but I could really use some
- assistance in checking that the features supported by the various applets
- match the features listed in the documentation.
-
- <p>
- I had hoped to get this released a month ago, but
- <a href="http://codepoet.org/gallery/baby_peter/img_1796">
- another release on 1 March 2004</a> has kept me busy...
-
- <p>
- The <a href="downloads/Changelog">changelog</a> has all the details.
- And as usual you can <a href="downloads">download busybox here</a>.
-
- <p>Have Fun!
- <p>
-
-
- <p>
- <li><b>23 February 2004 -- BusyBox 1.0.0-pre8 released</b><p>
-
- Here goes yet another BusyBox pre-release... Please do not bother to send
- in patches supplying new features at this time. Only bug-fix patches will
- be accepted. If you have a cool new feature you would like to see
- supported, or if you have an amazing new applet you would like to submit,
- please wait and submit such things later. We really want to get a release
- out we can all be proud of. We are still aiming to finish off the -pre
- series in February and move on to the final 1.0.0 release... So if you
- spot any bugs, now would be an excellent time to send in a fix to the
- busybox mailing list. It would also be <b>very</b> helpful if people could
- help review the BusyBox documentation and submit improvements. It would be
- especially helpful if people could check that the features supported by the
- various applets match the features listed in the documentation.
-
- <p>
-
- The <a href="downloads/Changelog">changelog</a> has all the details.
- And as usual you can <a href="downloads">download busybox here</a>.
-
- <p>Have Fun!
- <p>
-
-
- <li><b>4 February 2004 -- BusyBox 1.0.0-pre7 released</b><p>
-
- There was a bug in -pre6 that broke argument parsing for a
- number of applets, since a variable was not being zeroed out
- properly. This release is primarily intended to fix that one
- problem. In addition, this release fixes several other
- problems, including a rewrite by mjn3 of the code for parsing
- the busybox.conf file used for suid handling, some shell updates
- from vodz, and a scattering of other small fixes. We are still
- aiming to finish off the -pre series in February and move on to
- the final 1.0.0 release... If you see any problems, of have
- suggestions to make, as always, please feel free to email the
- busybox mailing list.
-
- <p>
-
- The <a href="downloads/Changelog">changelog</a> has all
- the details. And as usual you can
- <a href="downloads">download busybox here</a>.
-
- <p>Have Fun!
- <p>
-
-
- <p>
- <li><b>30 January 2004 -- BusyBox 1.0.0-pre6 released</b><p>
-
- Here goes the next pre-release for the new BusyBox stable
- series. This release adds a number of size optimizations,
- updates udhcp, fixes up 2.6 modutils support, updates ash
- and the shell command line editing, and the usual pile of
- bug fixes both large and small. Things appear to be
- settling down now, so with a bit of luck and some testing
- perhaps we can finish off the -pre series in February and
- move on to the final 1.0.0 release... If you see any
- problems, of have suggestions to make, as always, please
- feel free to email the busybox mailing list.
-
- <p>
-
- People who rely on the <a href= "downloads/snapshots/">daily BusyBox snapshots</a>
- should be aware that snapshots of the old busybox 0.60.x
- series are no longer available. Daily snapshots are now
- only available for the BusyBox 1.0.0 series and now use
- the naming scheme "busybox-<date>.tar.bz2". Please
- adjust any build scripts using the old naming scheme accordingly.
-
- <p>
-
- The <a href="downloads/Changelog">changelog</a> has all
- the details. And as usual you can
- <a href="downloads">download busybox here</a>.
-
- <p>Have Fun!
- <p>
-
-
- <p>
- <li><b>23 December 2003 -- BusyBox 1.0.0-pre5 released</b><p>
-
- Here goes the next pre-release for the new BusyBox stable
- series. The most obvious thing in this release is a fix for
- a terribly stupid bug in mount that prevented it from working
- properly unless you specified the filesystem type. This
- release also fixes a few compile problems, updates udhcp,
- fixes a silly bug in fdisk, fixes ifup/ifdown to behave like
- the Debian version, updates devfsd, updates the 2.6.x
- modutils support, add a new 'rx' applet, removes the obsolete
- 'loadacm' applet, fixes a few tar bugs, fixes a sed bug, and
- a few other odd fixes.
-
- <p>
-
- If you see any problems, of have suggestions to make, as
- always, please feel free to send an email to the busybox
- mailing list.
-
- <p>
-
- The <a href="downloads/Changelog">changelog</a> has all
- the details. And as usual you can
- <a href="downloads">download busybox here</a>.
-
- <p>Have Fun!
- <p>
-
-
-
- <li><b>10 December 2003 -- BusyBox 1.0.0-pre4 released</b><p>
-
- Here goes the fourth pre-release for the new BusyBox stable
- series. This release includes major rework to sed, lots of
- rework on tar, a new tiny implementation of bunzip2, a new
- devfsd applet, support for 2.6.x kernel modules, updates to
- the ash shell, sha1sum and md5sum have been merged into a
- common applet, the dpkg applets has been cleaned up, and tons
- of random bugs have been fixed. Thanks everyone for all the
- testing, bug reports, and patches! Once again, a big
- thank-you goes to Glenn McGrath (bug1) for stepping in and
- helping get patches merged!
-
- <p>
-
- And of course, if you are reading this, you might have noticed
- the busybox website has been completely reworked. Hopefully
- things are now somewhat easier to navigate... If you see any
- problems, of have suggestions to make, as always, please feel
- free to send an email to the busybox mailing list.
-
- <p>
-
- The <a href="downloads/Changelog">changelog</a> has all
- the details. And as usual you can
- <a href="downloads">download busybox here</a>.
-
- <p>Have Fun!
-
-
-
- <p>
- <li><b>12 Sept 2003 -- BusyBox 1.0.0-pre3 released</b><p>
-
- Here goes the third pre-release for the new BusyBox stable
- series. The last prerelease has held up quite well under
- testing, but a number of problems have turned up as the number
- of people using it has increased. Thanks everyone for all
- the testing, bug reports, and patches!
-
- <p>
-
- If you have submitted a patch or a bug report to the busybox
- mailing list and no one has emailed you explaining why your
- patch was rejected, it is safe to say that your patch has
- somehow gotten lost or forgotten. That happens sometimes.
- Please re-submit your patch or bug report to the BusyBox
- mailing list!
-
- <p>
-
- The point of the "-preX" versions is to get a larger group of
- people and vendors testing, so any problems that turn up can be
- fixed prior to the final 1.0.0 release. The main feature
- (besides additional testing) that is still still on the TODO
- list before the final BusyBox 1.0.0 release is sorting out the
- modutils issues. For the new 2.6.x kernels, we already have
- patches adding insmod and rmmod support and those need to be
- integrated. For 2.4.x kernels, for which busybox only supports
- a limited number of architectures, we may want to invest a bit
- more work before we cut 1.0.0. Or we may just leave 2.4.x
- module loading alone.
-
- <p>
-
- I had hoped this release would be out a month ago. And of
- course, it wasn't since Erik became busy getting a release of
- <a href="http://www.uclibc.org/">uClibc</a>
- out the door. Many thanks to Glenn McGrath (bug1) for
- stepping in and helping get a bunch of patches merged! I am
- not even going to state a date for releasing BusyBox 1.0.0
- -pre4 (or the final 1.0.0). We're aiming for late September...
- But if this release proves as to be exceptionally stable (or
- exceptionally unstable!), the next release may be very soon
- indeed.
-
- <p>
-
- The <a href="downloads/Changelog">changelog</a> has all
- the details. And as usual you can
- <a href="downloads">download busybox here</a>.
-
- <p>Have Fun!
-
-
- <p>
- <li><b>30 July 2003 -- BusyBox 1.0.0-pre2 released</b><p>
-
- Here goes another pre release for the new BusyBox stable
- series. The last prerelease (pre1) was given quite a lot of
- testing (thanks everyone!) which has helped turn up a number of
- bugs, and these problems have now been fixed.
-
- <p>
-
- Highlights of -pre2 include updating the 'ash' shell to sync up
- with the Debian 'dash' shell, a new 'hdparm' applet was added,
- init again supports pivot_root, The 'reboot' 'halt' and
- 'poweroff' applets can now be used without using busybox init.
- an ifconfig buffer overflow was fixed, losetup now allows
- read-write loop devices, uClinux daemon support was added, the
- 'watchdog', 'fdisk', and 'kill' applets were rewritten, there were
- tons of doc updates, and there were many other bugs fixed.
- <p>
-
- If you have submitted a patch and it is not included in this
- release and Erik has not emailed you explaining why your patch
- was rejected, it is safe to say that he has lost your patch.
- That happens sometimes. Please re-submit your patch to the
- BusyBox mailing list.
- <p>
-
- The point of the "-preX" versions is to get a larger group of
- people and vendors testing, so any problems that turn up can be
- fixed prior to the final 1.0.0 release. The main feature that
- is still still on the TODO list before the final BusyBox 1.0.0
- release is adding module support for the new 2.6.x kernels. If
- necessary, a -pre3 BusyBox release will happen on August 6th.
- Hopefully (i.e. unless some horrible catastrophic problem
- turns up) the final BusyBox 1.0.0 release will be ready by
- then...
- <p>
-
- The <a href="downloads/Changelog">changelog</a> has all
- the details. As usual you can <a href="downloads">download busybox here</a>.
-
- <p>Have Fun!
- <p>
-
- <p>
- <li><b>15 July 2003 -- BusyBox 1.0.0-pre1 released</b><p>
-
- The busybox development series has been under construction for
- nearly two years now. Which is just entirely too long... So
- it is with great pleasure that I announce the imminent release
- of a new stable series. Due to the huge number of changes
- since the last stable release (and the usual mindless version
- number inflation) I am branding this new stable series verison
- 1.0.x...
- <p>
-
- The point of "-preX" versions is to get a larger group of
- people and vendors testing, so any problems that turn up can be
- fixed prior to the magic 1.0.0 release (which should happen
- later this month)... I plan to release BusyBox 1.0.0-pre2 next
- Monday (July 21st), and, if necessary, -pre3 on July 28th.
- Hopefully (i.e. unless some horrible catastrophic problem turns
- up) the final BusyBox 1.0.0 release should be ready by the end
- of July.
- <p>
-
- If you have submitted patches, and they are not in this release
- and I have not emailed you explaining why your patch was
- rejected, it is safe to say that I have lost your patch. That
- happens sometimes. Please do <B>NOT</b> send all your patches,
- support questions, etc, directly to Erik. I get hundreds of
- emails every day (which is why I end up losing patches
- sometimes in the flood)... The busybox mailing list is the
- right place to send your patches, support questions, etc.
- <p>
-
- I would like to especially thank Vladimir Oleynik (vodz), Glenn
- McGrath (bug1), Robert Griebl (sandman), and Manuel Novoa III
- (mjn3) for their significant efforts and contributions that
- have made this release possible.
- <p>
-
- As usual you can <a href="downloads">download busybox here</a>.
- You don't really need to bother with the
- <a href="downloads/Changelog">changelog</a>, as the changes
- vs the stable version are way too extensive to easily enumerate.
- But you can take a look if you really want too.
-
- <p>Have Fun!
- <p>
-
-
-
- <p>
- <li><b>26 October 2002 -- BusyBox 0.60.5 released</b><p>
-
- I am very pleased to announce that the BusyBox 0.60.5 (stable)
- is now available for download. This is a bugfix release for
- the stable series to address all the problems that have turned
- up since the last release. Unfortunately, the previous release
- had a few nasty bugs (i.e. init could deadlock, gunzip -c tried
- to delete source files, cp -a wouldn't copy symlinks, and init
- was not always providing controlling ttys when it should have).
- I know I said that the previous release would be the end of the
- 0.60.x series. Well, it turns out I'm a liar. But this time I
- mean it (just like last time ;-). This will be the last
- release for the 0.60.x series -- all further development work
- will be done for the development busybox tree. Expect the development
- version to have its first real release very very soon now...
-
- <p>
- The <a href="downloads/Changelog.full">changelog</a> has all
- the details. As usual you can <a href="downloads">download busybox here</a>.
- <p>Have Fun!
- <p>
-
- <p>
- <li><b>18 September 2002 -- BusyBox 0.60.4 released</b><p>
-
- I am very pleased to announce that the BusyBox 0.60.4
- (stable) is now available for download. This is primarily
- a bugfix release for the stable series to address all
- the problems that have turned up since the last
- release. This will be the last release for the 0.60.x series.
- I mean it this time -- all further development work will be done
- on the development busybox tree, which is quite solid now and
- should soon be getting its first real release.
-
- <p>
- The <a href="downloads/Changelog.full">changelog</a> has all
- the details. As usual you can <a href="downloads">download busybox here</a>.
- <p>Have Fun!
- <p>
-
-
- <p>
- <li><b>27 April 2002 -- BusyBox 0.60.3 released</b><p>
-
- I am very pleased to announce that the BusyBox 0.60.3 (stable) is
- now available for download. This is primarily a bugfix release
- for the stable series. A number of problems have turned up since
- the last release, and this should address most of those problems.
- This should be the last release for the 0.60.x series. The
- development busybox tree has been progressing nicely, and will
- hopefully be ready to become the next stable release.
-
- <p>
- The <a href="downloads/Changelog">changelog</a> has all
- the details. As usual you can <a href="downloads">download busybox here</a>.
- <p>Have Fun!
- <p>
-
-
- <p>
- <li><b>6 March 2002 -- busybox.net now has mirrors!</b><p>
-
- Busybox.net is now much more available, thanks to
- the fine folks at <a href= "http://i-netinnovations.com/">http://i-netinnovations.com/</a>
- who are providing hosting for busybox.net and
- uclibc.org. In addition, we now have two mirrors:
- <a href= "http://busybox.linuxmagic.com/">http://busybox.linuxmagic.com/</a>
- in Canada and
- <a href= "http://busybox.csservers.de/">http://busybox.csservers.de/</a>
- in Germany. I hope this makes things much more
- accessible for everyone!
-
-
-<li>
-<b>3 January 2002 -- Welcome to busybox.net!</b>
-
-<p>Thanks to the generosity of a number of busybox
-users, we have been able to purchase busybox.net
-(which is where you are probably reading this).
-Right now, busybox.net and uclibc.org are both
-living on my home system (at the end of my DSL
-line). I apologize for the abrupt move off of
-busybox.lineo.com. Unfortunately, I no longer have
-the access needed to keep that system updated (for
-example, you might notice the daily snapshots there
-stopped some time ago).</p>
-
-<p>Busybox.net is currently hosted on my home
-server, at the end of a DSL line. Unfortunately,
-the load on them is quite heavy. To address this,
-I'm trying to make arrangements to get busybox.net
-co-located directly at an ISP. To assist in the
-co-location effort, <a href=
-"http://www.codepoet.org/~markw">Mark Whitley</a>
-(author of busybox sed, cut, and grep) has donated
-his <a href=
-"http://www.netwinder.org/">NetWinder</a> computer
-for hosting busybox.net and uclibc.org. Once this
-system is co-located, the current speed problems
-should be completely eliminated. Hopefully, too,
-some of you will volunteer to set up some mirror
-sites, to help to distribute the load a bit.</p>
-
-<p><!--
- <center>
- Click here to help support busybox.net!
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
- <input type="hidden" name="cmd" value="_xclick">
- <input type="hidden" name="business" value="andersen@codepoet.org">
- <input type="hidden" name="item_name" value="Support Busybox">
- <input type="hidden" name="image_url" value="https://codepoet-consulting.com/images/busybox2.jpg">
- <input type="hidden" name="no_shipping" value="1">
- <input type="image" src="images/donate.png" border="0" name="submit" alt="Make donation using PayPal">
- </form>
- </center>
- -->
- Since some people expressed concern over BusyBox
-donations, let me assure you that no one is getting
-rich here. All BusyBox and uClibc donations will be
-spent paying for bandwidth and needed hardware
-upgrades. For example, Mark's NetWinder currently
-has just 64Meg of memory. As demonstrated when
-google spidered the site the other day, 64 Megs in
-not enough, so I'm going to be ordering 256Megs of
-ram and a larger hard drive for the box today. So
-far, donations received have been sufficient to
-cover almost all expenses. In the future, we may
-have co-location fees to worry about, but for now
-we are ok. A <b>HUGE thank-you</b> goes out to
-everyone that has contributed!<br>
- -Erik</p>
-</li>
-
-<li>
-<b>20 November 2001 -- BusyBox 0.60.2 released</b>
-
-<p>We am very pleased to announce that the BusyBox
-0.60.2 (stable) is now released to the world. This
-one is primarily a bugfix release for the stable
-series, and it should take care of most everyone's
-needs till we can get the nice new stuff we have
-been working on in CVS ready to release (with the
-wonderful new buildsystem). The biggest change in
-this release (beyond bugfixes) is the fact that msh
-(the minix shell) has been re-worked by Vladimir N.
-Oleynik (vodz) and so it no longer crashes when
-told to do complex things with backticks.</p>
-
-<p>This release has been tested on x86, ARM, and
-powerpc using glibc 2.2.4, libc5, and uClibc, so it
-should work with just about any Linux system you
-throw it at. See the <a href=
-"downloads/Changelog">changelog</a> for <small>most
-of</small> the details. The last release was
-<em>very</em> solid for people, and this one should
-be even better.</p>
-
-<p>As usual BusyBox 0.60.2 can be downloaded from
-<a href=
-"downloads">http://www.busybox.net/downloads</a>.</p>
-
-<p>Have Fun.<br>
- -Erik</p>
-</li>
-
-<li> <b>18 November 2001 -- Help us buy busybox.net!</b>
-
-<!-- Begin PayPal Logo -->
-<center>
-Click here to help buy busybox.net!
-<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
-<input type="hidden" name="cmd" value="_xclick">
-<input type="hidden" name="business" value="andersen@codepoet.org">
-<input type="hidden" name="item_name" value="Support Busybox">
-<input type="hidden" name="image_url" value="https://busybox.net/images/busybox2.jpg">
-<input type="hidden" name="no_shipping" value="1">
-<input type="image" src="images/donate.png" border="0" name="submit" alt="Make donation using PayPal">
-</form>
-</center>
-<!-- End PayPal Logo -->
-
-I've contacted the current owner of busybox.net and he is willing
-to sell the domain name -- for $250. He also owns busybox.org but
-will not part with it... I will then need to pay the registry fee
-for a couple of years and start paying for bandwidth, so this will
-initially cost about $300. I would like to host busybox.net on my
-home machine (codepoet.org) so I have full control over the system,
-but to do that would require that I increase the level of bandwidth
-I am paying for. Did you know that so far this month, there
-have been over 1.4 Gigabytes of busybox ftp downloads? I don't
-even <em>know</em> how much CVS bandwidth it requires. For the
-time being, Lineo has continued to graciously provide this
-bandwidth, despite the fact that I no longer work for them. If I
-start running this all on my home machine, paying for the needed bandwidth
-will start costing some money.
-<p>
-
-I was going to pay it all myself, but my wife didn't like that
-idea at all (big surprise). It turns out <insert argument
-where she wins and I don't> she has better ideas
-about what we should spend our money on that don't involve
-busybox. She suggested I should ask for contributions on the
-mailing list and web page. So...
-<p>
-
-I am hoping that if everyone could contribute a bit, we could pick
-up the busybox.net domain name and cover the bandwidth costs. I
-know that busybox is being used by a lot of companies as well as
-individuals -- hopefully people and companies that are willing to
-contribute back a bit. So if everyone could please help out, that
-would be wonderful!
-<p>
-
-
-<li> <b>23 August 2001 -- BusyBox 0.60.1 released</b>
-<br>
-
- This is a relatively minor bug fixing release that fixes
- up the bugs that have shown up in the stable release in
- the last few weeks. Fortunately, nothing <em>too</em>
- serious has shown up. This release only fixes bugs -- no
- new features, no new applets. So without further ado,
- here it is. Come and get it.
- <p>
- The
- <a href="downloads/Changelog">changelog</a> has all
- the details. As usual BusyBox 0.60.1 can be downloaded from
- <a href="downloads">http://busybox.net/downloads</a>.
- <p>Have Fun!
- <p>
-
-
-<li> <b>2 August 2001 -- BusyBox 0.60.0 released</b>
-<br>
- I am very pleased to announce the immediate availability of
- BusyBox 0.60.0. I have personally tested this release with libc5, glibc,
- and <a href="http://uclibc.org/">uClibc</a> on
- x86, ARM, and powerpc using linux 2.2 and 2.4, and I know a number
- of people using it on everything from ia64 to m68k with great success.
- Everything seems to be working very nicely now, so getting a nice
- stable bug-free(tm) release out seems to be in order. This releases fixes
- a memory leak in syslogd, a number of bugs in the ash and msh shells, and
- cleans up a number of things.
-
- <p>
-
- Those wanting an easy way to test the 0.60.0 release with uClibc can
- use <a href="http://user-mode-linux.sourceforge.net/">User-Mode Linux</a>
- to give it a try by downloading and compiling
- <a href="ftp://busybox.net/buildroot.tar.gz">buildroot.tar.gz</a>.
- You don't have to be root or reboot your machine to run test this way.
- Preconfigured User-Mode Linux kernel source is also on busybox.net.
- <p>
- Another cool thing is the nifty <a href="downloads/tutorial/index.html">
- BusyBox Tutorial</a> contributed by K Computing. This requires
- a ShockWave plugin (or standalone viewer), so you may want to grab the
- the GPLed shockwave viewer from <a href="http://www.swift-tools.com/Flash/flash-0.4.10.tgz">here</a>
- to view the tutorial.
- <p>
-
- Finally, In case you didn't notice anything odd about the
- version number of this release, let me point out that this release
- is <em>not</em> 0.53, because I bumped the version number up a
- bit. This reflects the fact that this release is intended to form
- a new stable BusyBox release series. If you need to rely on a
- stable version of BusyBox, you should plan on using the stable
- 0.60.x series. If bugs show up then I will release 0.60.1, then
- 0.60.2, etc... This is also intended to deal with the fact that
- the BusyBox build system will be getting a major overhaul for the
- next release and I don't want that to break products that people
- are shipping. To avoid that, the new build system will be
- released as part of a new BusyBox development series that will
- have some not-yet-decided-on odd version number. Once things
- stabilize and the new build system is working for everyone, then
- I will release that as a new stable release series.
-
- <p>
- The
- <a href="downloads/Changelog">changelog</a> has all
- the details. As usual BusyBox 0.60.0 can be downloaded from
- <a href="downloads">http://busybox.net/downloads</a>.
- <p>Have Fun!
- <p>
-
-
-<li> <b>7 July 2001 -- BusyBox 0.52 released</b>
-<br>
-
- I am very pleased to announce the immediate availability of
- BusyBox 0.52 (the "new-and-improved rock-solid release"). This
- release is the result of <em>many</em> hours of work and has tons
- of bugfixes, optimizations, and cleanups. This release adds
- several new applets, including several new shells (such as hush, msh,
- and ash).
-
- <p>
- The
- <a href="downloads/Changelog">changelog</a> covers
- some of the more obvious details, but there are many many things that
- are not mentioned, but have been improved in subtle ways. As usual,
- BusyBox 0.52 can be downloaded from
- <a href="downloads">http://busybox.net/downloads</a>.
- <p>Have Fun!
- <p>
-
-
-<li> <b>10 April 2001 - Graph of Busybox Growth </b>
-<br>
-The illustrious Larry Doolittle has made a PostScript chart of the growth
-of the Busybox tarball size over time. It is available for downloading /
-viewing <a href= "busybox-growth.ps"> right here</a>.
-
-<p> (Note that while the number of applets in Busybox has increased, you
-can still configure Busybox to be as small as you want by selectively
-turning off whichever applets you don't need.)
-<p>
-
-
-<li> <b>10 April 2001 -- BusyBox 0.51 released</b>
-<br>
-
- BusyBox 0.51 (the "rock-solid release") is now out there. This
- release adds only 2 new applets: env and vi. The vi applet,
- contributed by Sterling Huxley, is very functional, and is only
- 22k. This release fixes 3 critical bugs in the 0.50 release.
- There were 2 potential segfaults in lash (the busybox shell) in
- the 0.50 release which are now fixed. Another critical bug in
- 0.50 which is now fixed: syslogd from 0.50 could potentially
- deadlock the init process and thereby break your entire system.
- <p>
-
- There are a number of improvements in this release as well. For
- one thing, the wget applet is greatly improved. Dmitry Zakharov
- added FTP support, and Laurence Anderson make wget fully RFC
- compliant for HTTP 1.1. The mechanism for including utility
- functions in previous releases was clumsy and error prone. Now
- all utility functions are part of a new libbb library, which makes
- maintaining utility functions much simpler. And BusyBox now
- compiles on itanium systems (thanks to the Debian itanium porters
- for letting me use their system!).
- <p>
- You can read the
- <a href="downloads/Changelog">changelog</a> for
- complete details. BusyBox 0.51 can be downloaded from
- <a href="downloads">http://busybox.net/downloads</a>.
- <p>Have Fun!
- <p>
-
-<li> <b>Busybox Boot-Floppy Image</b>
-
-<p>Because you asked for it, we have made available a <a href=
-"downloads/busybox.floppy.img"> Busybox boot floppy
-image</a>. Here's how you use it:
-
-<ol>
-
- <li> <a href= "downloads/busybox.floppy.img">
- Download the image</a>
-
- <li> dd it onto a floppy like so: <tt> dd if=busybox.floppy.img
- of=/dev/fd0 ; sync </tt>
-
- <li> Pop it in a machine and boot up.
-
-</ol>
-
-<p> If you want to look at the contents of the initrd image, do this:
-
-<pre>
- mount ./busybox.floppy.img /mnt -o loop -t msdos
- cp /mnt/initrd.gz /tmp
- umount /mnt
- gunzip /tmp/initrd.gz
- mount /tmp/initrd /mnt -o loop -t minix
-</pre>
-
-
-<li> <b>15 March 2001 -- BusyBox 0.50 released</b>
-<br>
-
- This release adds several new applets including ifconfig, route, pivot_root, stty,
- and tftp, and also fixes tons of bugs. Tab completion in the
- shell is now working very well, and the shell's environment variable
- expansion was fixed. Tons of other things were fixed or made
- smaller. For a fairly complete overview, see the
- <a href="downloads/Changelog">changelog</a>.
- <p>
- lash (the busybox shell) is still with us, fixed up a bit so it
- now behaves itself quite nicely. It really is quite usable as
- long as you don't expect it to provide Bourne shell grammer.
- Standard things like pipes, redirects, command line editing, and
- environment variable expansion work great. But we have found that
- this shell, while very usable, does not provide an extensible
- framework for adding in full Bourne shell behavior. So the first order of
- business as we begin working on the next BusyBox release will be to merge in the new shell
- currently in progress at
- <a href="http://doolittle.faludi.com/~larry/parser.html">Larry Doolittle's website</a>.
- <p>
-
-
-<li> <b>27 January 2001 -- BusyBox 0.49 released</b>
-<br>
-
- Several new applets, lots of bug fixes, cleanups, and many smaller
- things made nicer. Several cleanups and improvements to the shell.
- For a list of the most interesting changes
- you might want to look at the <a href="downloads/Changelog">changelog</a>.
- <p>
- Special thanks go out to Matt Kraai and Larry Doolittle for all their
- work on this release, and for keeping on top of things while I've been
- out of town.
- <p>
- <em>Special Note</em><br>
-
- BusyBox 0.49 was supposed to have replaced lash, the BusyBox
- shell, with a new shell that understands full Bourne shell/Posix shell grammer.
- Well, that simply didn't happen in time for this release. A new
- shell that will eventually replace lash is already under
- construction. This new shell is being developed by Larry
- Doolittle, and could use all of our help. Please see the work in
- progress on <a href="http://doolittle.faludi.com/~larry/parser.html">Larry's website</a>
- and help out if you can. This shell will be included in the next
- release of BusyBox.
- <p>
-
-<li> <b>13 December 2000 -- BusyBox 0.48 released</b>
-<br>
-
- This release fixes lots and lots of bugs. This has had some very
- rigorous testing, and looks very, very clean. The usual tar
- update of course: tar no longer breaks hardlinks, tar -xzf is
- optionally supported, and the LRP folks will be pleased to know
- that 'tar -X' and 'tar --exclude' are both now in. Applets are
- now looked up using a binary search making lash (the busybox
- shell) much faster. For the new debian-installer (for Debian
- woody) a .udeb can now be generated.
- <p>
- The curious can get a list of some of the more interesting changes by reading
- the <a href="downloads/Changelog">changelog</a>.
- <p>
- Many thanks go out to the many many people that have contributed to
- this release, especially Matt Kraai, Larry Doolittle, and Kent Robotti.
- <p>
-<p> <li> <b>26 September 2000 -- BusyBox 0.47 released</b>
-<br>
-
- This release fixes lots of bugs (including an ugly bug in 0.46
- syslogd that could fork-bomb your system). Added several new
- apps: rdate, wget, getopt, dos2unix, unix2dos, reset, unrpm,
- renice, xargs, and expr. syslogd now supports network logging.
- There are the usual tar updates. Most apps now use getopt for
- more correct option parsing.
- See the <a href="downloads/Changelog">changelog</a>
- for complete details.
-
-
-<p> <li> <b>11 July 2000 -- BusyBox 0.46 released</b>
-<br>
-
- This release fixes several bugs (including a ugly bug in tar,
- and fixes for NFSv3 mount support). Added a dumpkmap to allow
- people to dump a binary keymaps for use with 'loadkmap', and a
- completely reworked 'grep' and 'sed' which should behave better.
- BusyBox shell can now also be used as a login shell.
- See the <a href="downloads/Changelog">changelog</a>
- for complete details.
-
-
-<p> <li> <b>21 June 2000 -- BusyBox 0.45 released</b>
-<br>
-
- This release has been slow in coming, but is very solid at this
- point. BusyBox now supports libc5 as well as GNU libc. This
- release provides the following new apps: cut, tr, insmod, ar,
- mktemp, setkeycodes, md5sum, uuencode, uudecode, which, and
- telnet. There are bug fixes for just about every app as well (see
- the <a href="downloads/Changelog">changelog</a> for
- details).
- <p>
- Also, some exciting infrastructure news! Busybox now has its own
- <a href="lists/busybox/">mailing list</a>,
- publically browsable
- <a href="/cgi-bin/viewcvs.cgi/trunk/busybox/">CVS tree</a>,
- anonymous
- <a href="cvs_anon.html">CVS access</a>, and
- for those that are actively contributing there is even
- <a href="cvs_write.html">CVS write access</a>.
- I think this will be a huge help to the ongoing development of BusyBox.
- <p>
- Also, for the curious, there is no 0.44 release. Somehow 0.44 got announced
- a few weeks ago prior to its actually being released. To avoid any confusion
- we are just skipping 0.44.
- <p>
- Many thanks go out to the many people that have contributed to this release
- of BusyBox (esp. Pavel Roskin)!
-
-
-<p> <li> <b>19 April 2000 -- syslogd bugfix</b>
-<br>
-Turns out that there was still a bug in busybox syslogd.
-For example, with the following test app:
-<pre>
-#include <syslog.h>
-
-int do_log(char* msg, int delay)
-{
- openlog("testlog", LOG_PID, LOG_DAEMON);
- while(1) {
- syslog(LOG_ERR, "%s: testing one, two, three\n", msg);
- sleep(delay);
- }
- closelog();
- return(0);
-};
-
-int main(void)
-{
- if (fork()==0)
- do_log("A", 2);
- do_log("B", 3);
-}
-</pre>
-it should be logging stuff from both "A" and "B". As released in 0.43 only stuff
-from "A" would have been logged. This means that if init tries to log something
-while say ppp has the syslog open, init would block (which is bad, bad, bad).
-<p>
-Karl M. Hegbloom has created a fix for the problem.
-Thanks Karl!
-
-
-<p> <li> <b>18 April 2000 -- BusyBox 0.43 released (finally!)</b>
-<br>
-I have finally gotten everything into a state where I feel pretty
-good about things. This is definitely the most stable, solid release
-so far. A lot of bugs have been fixed, and the following new apps
-have been added: sh, basename, dirname, killall, uptime,
-freeramdisk, tr, echo, test, and usleep. Tar has been completely
-rewritten from scratch. Bss size has also been greatly reduced.
-More details are available in the
-<a href="downloads/Changelog">changelog</a>.
-Oh, and as a special bonus, I wrote some fairly comprehensive
-<em>documentation</em>, complete with examples and full usage information.
-
-<p>
-Many thanks go out to the fine people that have helped by submitting patches
-and bug reports; particularly instrumental in helping for this release were
-Karl Hegbloom, Pavel Roskin, Friedrich Vedder, Emanuele Caratti,
-Bob Tinsley, Nicolas Pitre, Avery Pennarun, Arne Bernin, John Beppu, and Jim Gleason.
-There were others so if I somehow forgot to mention you, I'm very sorry.
-<p>
-
-You can grab BusyBox 0.43 tarballs <a href="downloads">here</a>.
-
-<p> <li> <b>9 April 2000 -- BusyBox 0.43 pre release</b>
-<br>
-Unfortunately, I have not yet finished all the things I want to
-do for BusyBox 0.43, so I am posting this pre-release for people
-to poke at. This contains my complete rewrite of tar, which now weighs in at
-5k (7k with all options turned on) and works for reading and writing
-tarballs (which it does correctly for everything I have been able to throw
-at it). Tar also (optionally) supports the "--exclude" option (mainly because
-the Linux Router Project folks asked for it). This also has a pre-release
-of the micro shell I have been writing. This pre-release should be stable
-enough for production use -- it just isn't a release since I have some structural
-changes I still want to make.
-<p>
-The pre-release can be found <a href="downloads">here</a>.
-Please let me know ASAP if you find <em>any</em> bugs.
-
-<p> <li> <b>28 March 2000 -- Andersen Baby Boy release</b>
-<br>
-I am pleased to announce that on Tuesday March 28th at 5:48pm, weighing in at 7
-lbs. 12 oz, Micah Erik Andersen was born at LDS Hospital here in Salt Lake City.
-He was born in the emergency room less then 5 minutes after we arrived -- and
-it was such a relief that we even made it to the hospital at all. Despite the
-fact that I was driving at an amazingly unlawful speed and honking at everybody
-and thinking decidedly unkind thoughts about the people in our way, my wife
-(inconsiderate of my feelings and complete lack of medical training) was lying
-down in the back seat saying things like "I think I need to start pushing now"
-(which she then proceeded to do despite my best encouraging statements to the
-contrary).
-<p>
-Anyway, I'm glad to note that despite the much-faster-than-we-were-expecting
-labor, both Shaunalei and our new baby boy are doing wonderfully.
-<p>
-So now that I am done with my excuse for the slow release cycle...
-Progress on the next release of BusyBox has been slow but steady. I expect
-to have a release sometime during the first week of April. This release will
-include a number of important changes, including the addition of a shell, a
-re-write of tar (to accommodate the Linux Router Project), and syslogd can now
-accept multiple concurrent connections, fixing lots of unexpected blocking
-problems.
-
-
-<p> <li> <b>11 February 2000 -- BusyBox 0.42 released</b>
-<br>
-
- This is the most solid BusyBox release so far. Many, many
- bugs have been fixed. See the
- <a href="downloads/Changelog">changelog</a> for details.
-
- Of particular interest, init will now cleanly unmount
- filesystems on reboot, cp and mv have been rewritten and
- behave much better, and mount and umount no longer leak
- loop devices. Many thanks go out to Randolph Chung,
- Karl M. Hegbloom, Taketoshi Sano, and Pavel Roskin for
- their hard work on this release of BusyBox. Please pound
- on it and let me know if you find any bugs.
-
-<p> <li> <b>19 January 2000 -- BusyBox 0.41 released</b>
-<br>
-
- This release includes bugfixes to cp, mv, logger, true, false,
- mkdir, syslogd, and init. New apps include wc, hostid,
- logname, tty, whoami, and yes. New features include loop device
- support in mount and umount, and better TERM handling by init.
- The changelog can be found <a href="downloads/Changelog">here</a>.
-
-<p> <li> <b>7 January 2000 -- BusyBox 0.40 released</b>
-<br>
-
- This release includes bugfixes to init (now includes inittab support),
- syslogd, head, logger, du, grep, cp, mv, sed, dmesg, ls, kill, gunzip, and mknod.
- New apps include sort, uniq, lsmod, rmmod, fbset, and loadacm.
- In particular, this release fixes an important bug in tar which
- in some cases produced serious security problems.
- As always, the changelog can be found <a href="downloads/Changelog">here</a>.
-
-<p> <li> <b>11 December 1999 -- BusyBox Website</b>
-<br>
- I have received permission from Bruce Perens (the original author of BusyBox)
- to set up this site as the new primary website for BusyBox. This website
- will always contain pointers to the latest and greatest, and will also
- contain the latest documentation on how to use BusyBox, what it can do,
- what arguments its apps support, etc.
-
-<p> <li> <b>10 December 1999 -- BusyBox 0.39 released</b>
-<br>
- This release includes fixes to init, reboot, halt, kill, and ls, and contains
- the new apps ping, hostname, mkfifo, free, tail, du, tee, and head. A full
- changelog can be found <a href="downloads/Changelog">here</a>.
-<p> <li> <b>5 December 1999 -- BusyBox 0.38 released</b>
-<br>
- This release includes fixes to tar, cat, ls, dd, rm, umount, find, df,
- and make install, and includes new apps syslogd/klogd and logger.
-
-
-</ul>
-
-
-<!--#include file="footer.html" -->
-
+++ /dev/null
-<!--#include file="header.html" -->
-
-
-<h3>Products/Projects Using BusyBox</h3>
-
-Do you use BusyBox? I'd love to know about it and
-I'd be happy to link to you.
-
-<p>
-I know of the following products and/or projects that use BusyBox --
-listed in the order I happen to add them to the web page:
-
-<ul>
-
-<li><a href="http://buildroot.uclibc.org/">buildroot</a><br>A configurable
-means for building your own busybox/uClibc based system systems, maintained
-by the uClibc developers.
-
-<li><a href="http://openwrt.org">OpenWrt</a> a Linux distribution for embedded
-devices, based on buildroot.
-
-<li><a href="http://www.pengutronix.de/software/ptxdist_en.html">PTXdist</a><br>another
-configurable means for building your own busybox based system systems.
-
-</li><li><a href=
-"http://cvs.debian.org/boot-floppies/">
-Debian installer (boot floppies) project</a>
-
-</li><li><a href="http://redhat.com/">Red Hat installer</a>
-
-</li><li><a href=
-"http://distro.ibiblio.org/pub/Linux/distributions/slackware/slackware-current/source/rootdisks/">
-Slackware Installer</a>
-
-</li><li><a href="http://www.gentoo.org/">Gentoo Linux install/boot CDs</a>
-</li><li><a href="http://www.mandriva.com/">The Mandriva installer</a>
-
-</li><li><a href="http://Leaf.SourceForge.net">Linux Embedded Appliance Firewall</a><br>The sucessor of the Linux Router Project, supporting all sorts of embedded Linux gateways, routers, wireless routers, and firewalls.
-
-</li><li><a href=
-"http://www.toms.net/rb/">tomsrtbt</a>
-
-</li><li><a href="http://www.stormix.com/">Stormix
-Installer</a>
-
-</li><li><a href=
-"http://www.emacinc.com/linux2_sbc.htm">EMAC Linux
-2.0 SBC</a>
-
-</li><li><a href="http://www.trinux.org/">Trinux</a>
-
-</li><li><a href="http://oddas.sourceforge.net/">ODDAS
-project</a>
-
-</li><li><a href="http://byld.sourceforge.net/">Build Your
-Linux Disk</a>
-
-</li><li><a href=
-"http://ibiblio.org/pub/Linux/system/recovery">Zdisk</a>
-
-</li><li><a href="http://www.adtran.com">AdTran -
-VPN/firewall VPN Linux Distribution</a>
-
-</li><li><a href="http://mkcdrec.ota.be/">mkCDrec - make
-CD-ROM recovery</a>
-
-</li><li><a href=
-"http://recycle.lbl.gov/~ldoolitt/bse/">Linux on
-nanoEngine</a>
-
-</li><li><a href=
-"http://www.zelow.no/floppyfw/">Floppyfw</a>
-
-</li><li><a href="http://www.ltsp.org/">Linux Terminal
-Server Project</a>
-
-</li><li><a href="http://www.devil-linux.org/">Devil-Linux</a>
-
-</li><li><a href="http://dutnux.sourceforge.net/">DutNux</a>
-
-</li><li><a href="http://www.microwerks.net/~hugo/mindi/">Mindi</a>
-
-</li><li><a href="http://www.minimalinux.org/ttylinux/">ttylinux</a>
-
-</li><li><a href="http://www.coyotelinux.com/">Coyote Linux</a>
-
-</li><li><a href="http://www.partimage.org/">Partition
-Image</a>
-
-</li><li><a href="http://www.fli4l.de/">fli4l the on(e)-disk-router</a>
-
-</li><li><a href="http://tinfoilhat.cultists.net/">Tinfoil
-Hat Linux</a>
-
-</li><li><a href="http://sourceforge.net/projects/gp32linux/">gp32linux</a>
-</li><li><a href="http://familiar.handhelds.org/">Familiar Linux</a><br>A linux distribution for handheld computers
-</li><li><a href="http://rescuecd.sourceforge.net/">Timo's Rescue CD Set</a>
-</li><li><a href="http://sf.net/projects/netstation/">Netstation</a>
-</li><li><a href="http://www.fiwix.org/">GNU/Fiwix Operating System</a>
-</li><li><a href="http://www.softcraft.com/">Generations Linux</a>
-</li><li><a href="http://systemimager.org/relatedprojects/">SystemImager / System Installation Suite</a>
-</li><li><a href="http://www.bablokb.de/gendist/">GENDIST distribution generator</a>
-</li><li><a href="http://diet-pc.sourceforge.net/">DIET-PC embedded Linux thin client distribution</a>
-</li><li><a href="http://byzgl.sourceforge.net/">BYZantine Gnu/Linux</a>
-</li><li><a href="http://dban.sourceforge.net/">Darik's Boot and Nuke</a>
-</li><li><a href="http://www.timesys.com/">TimeSys real-time Linux</a>
-</li><li><a href="http://movix.sf.net/">MoviX</a><br>Boots from CD and automatically plays every video file on the CD
-</li><li><a href="http://katamaran.sourceforge.net">katamaran</a><br>Linux, X11, xfce windowmanager, based on BusyBox
-</li><li><a href="http://www.sourceforge.net/projects/simplygnustep">Prometheus SimplyGNUstep</a>
-</li><li><a href="http://www.renyi.hu/~ekho/lowlife/">lowlife</a><br>A documentation project on how to make your own uClibc-based systems and floppy.
-</li><li><a href="http://metadistros.hispalinux.es/">Metadistros</a><br>a project to allow you easily make Live-CD distributions.
-</li><li><a href="http://salvare.sourceforge.net/">Salvare</a><br>More Linux than tomsrtbt but less than Knoppix, aims to provide a useful workstation as well as a rescue disk.
-</li><li><a href="http://www.stresslinux.org/">stresslinux</a><br>minimal linux distribution running from a bootable cdrom or via PXE.
-</li><li><a href="http://thinstation.sourceforge.net/">thinstation</a><br>convert standard PCs into full-featured diskless thinclients.
-</li><li><a href="http://www.uhulinux.hu/">UHU-Linux Hungary</a>
-</li><li><a href="http://deep-water.berlios.de/">Deep-Water Linux</a>
-</li><li><a href="http://www.freesco.org/">Freesco router</a>
-</li><li><a href="http://Sentry.SourceForge.net/">Sentry Firewall CD</a>
-
-
-
-</li><li><a href="http://tuxscreen.net">Tuxscreen Linux Phone</a>
-</li><li><a href="http://www.kerbango.com/">The Kerbango Internet Radio</a>
-</li><li><a href="http://www.linuxmagic.com/vpn/">LinuxMagic VPN Firewall</a>
-</li><li><a href="http://www.isilver-inc.com/">I-Silver Linux appliance servers</a>
-</li><li><a href="http://zaurus.sourceforge.net/">Sharp Zaurus PDA</a>
-</li><li><a href="http://www.cyclades.com/">Cyclades-TS and other Cyclades products</a>
-</li><li><a href="http://www.linksys.com/products/product.asp?prid=508">Linksys WRT54G - Wireless-G Broadband Router</a>
-</li><li><a href="http://www.dell.com/us/en/biz/topics/sbtopic_005_truemobile.htm">Dell TrueMobile 1184</a>
-</li><li><a href="http://actiontec.com/products/modems/dual_pcmodem/dpm_overview.html">Actiontec Dual PC Modem</a>
-</li><li><a href="http://www.kiss-technology.com/">Kiss DP Series DVD players</a>
-</li><li><a href="http://www.netgear.com/products/prod_details.asp?prodID=170">NetGear WG602 wireless router</a>
- <br>with sources <a href="http://www.netgear.com/support/support_details.asp?dnldID=453">here</a>
-</li><li><a href="http://www.trendware.com/products/TEW-411BRP.htm">TRENDnet TEW-411BRP 802.11g Wireless AP/Router/Switch</a>
- <br>Source for busybox and udhcp <a href="http://www.trendware.com/asp/download/fileinfo.asp?file_id=277&B1=Search">here</a> though no kernel source is provided.
-</li><li><a href="http://www.buffalo-technology.com/webcontent/products/wireless/wbr-g54.htm">Buffalo WBR-G54 wireless router</a>
- </li><li><a href="http://www.asus.com/products/communication/wireless/wl-300g/overview.htm">ASUS WL-300g Wireless LAN Access Point</a>
- <br>with source<a href="http://www.asus.com.tw/support/download/item.aspx?ModelName=WL-300G">here</a>
- </li><li><a href="http://catalog.belkin.com/IWCatProductPage.process?Merchant_Id=&Section_Id=201522&pcount=&Product_Id=136493">Belkin 54g Wireless DSL/Cable Gateway Router</a>
- <br>with source<a href="http://web.belkin.com/support/gpl.asp">here</a>
- <li><a href="http://www.acronis.com/products/partitionexpert/">Acronis PartitionExpert 2003</a>
- <br>includes a heavily modified BusyBox v0.60.5 with built in
- cardmgr, device detection, gpm, lspci, etc. Also includes udhcp,
- uClibc 0.9.26, a heavily patched up linux kernel, etc. Source
- can only be obtained <a href="http://www.acronis.com/files/gpl/linux.tar.bz2">here</a>
-
-</li><li><a href="http://www.usr.com/">U.S. Robotics Sureconnect 4-port ADSL router</a><br>
- with source <a href="http://www.usr.com/support/s-gpl-code.asp">here</a>
-</li><li><a href="http://www.actiontec.com/products/broadband/54mbps_wireless_gateway_1p/index.html">
- ActionTec GT701-WG Wireless Gateway/DSL Modem</a>
- with source <a href="http://128.121.226.214/gtproducts/index.html">here</a>
-</li><li><a href="http://smartlinux.sourceforge.net/">S.M.A.R.T. Linux</a>
-</li><li><a href="http://www.dlink.com/">DLink - Model GSL-G604T, DSL-300T, and possibly other models</a>
- with source <a href="ftp://ftp.dlink.co.uk/dsl_routers_modems/">here,</a>
- with source <a href="ftp://ftp.dlink.de/dsl-products/">and here,</a>
- and quite possibly other places as well. You may need to dig down a bit
- to find the source, but it does seem to be there.
-</li><li><a href="http://www.siemens-mobile.de/cds/frontdoor/0,2241,de_de_0_42931_rArNrNrNrN,00.html">Siemens SE515 DSL router</a>
- with source <a href="http://now-portal.c-lab.de/projects/gigaset/">here, I think...</a>
- with some details <a href="http://heinz.hippenstiel.org/familie/hp/hobby/gigaset_se515dsl.html">here.</a>
-</li><li><a href="http://freeterm.spb.ru/frwt/">Free Remote Windows Terminal</a>
-
-</li><li><a href="http://www.zyxel.com/">ZyXEL Routers</a>
-
-</li>
-</ul>
-
-
-<!--#include file="footer.html" -->
-
+++ /dev/null
-<!--#include file="header.html" -->
-
-
-<!-- Begin Screenshot -->
-
-<h3> Busybox Screenshot! </h3>
-
-
-Everybody loves to look at screenshots, so here is a live action screenshot of BusyBox.
-
-<pre style="background-color: black; color: lightgreen; padding: 5px;
-font-family: monospace; font-size: smaller;" width="100">
-
-$ busybox
-BusyBox v1.8.0 (2007-11-04 15:42:38 GMT) multi-call binary
-Copyright (C) 1998-2006 Erik Andersen, Rob Landley, and others.
-Licensed under GPLv2. See source distribution for full notice.
-
-Usage: busybox [function] [arguments]...
- or: [function] [arguments]...
-
- BusyBox is a multi-call binary that combines many common Unix
- utilities into a single executable. Most people will create a
- link to busybox for each function they wish to use and BusyBox
- will act like whatever it was invoked as!
-
-Currently defined functions:
- [, [[, addgroup, adduser, adjtimex, ar, arp, arping, ash,
- awk, basename, bunzip2, bzcat, bzip2, cal, cat, catv, chattr,
- chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt,
- cksum, clear, cmp, comm, cp, cpio, crond, crontab, cryptpw,
- cut, date, dc, dd, deallocvt, delgroup, deluser, df, dhcprelay,
- diff, dirname, dmesg, dnsd, dos2unix, dpkg, du, dumpkmap,
- dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid,
- expand, expr, fakeidentd, false, fbset, fdflush, fdformat,
- fdisk, fgrep, find, fold, free, freeramdisk, fsck, fsck.minix,
- ftpget, ftpput, fuser, getopt, getty, grep, gunzip, gzip,
- hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock,
- id, ifconfig, inetd, insmod, install, ip, ipaddr, ipcalc,
- ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kbd_mode,
- kill, killall, killall5, klogd, lash, last, length, less,
- linux32, linux64, ln, loadfont, loadkmap, logger, login, logname,
- logread, losetup, ls, lsattr, lsmod, lzmacat, md5sum, mdev,
- mesg, microcom, mkdir, mkfifo, mkfs.minix, mknod, mkswap,
- mktemp, modprobe, more, mount, mountpoint, msh, mt, mv, nameif,
- nc, netstat, nice, nmeter, nohup, nslookup, od, openvt, passwd,
- patch, pgrep, pidof, ping, ping6, pipe_progress, pivot_root,
- pkill, printenv, printf, ps, pscan, pwd, raidautorun, rdate,
- readlink, readprofile, realpath, renice, reset, resize, rm,
- rmdir, rmmod, route, rpm, rpm2cpio, run-parts, runlevel, runsv,
- runsvdir, rx, sed, seq, setarch, setconsole, setkeycodes,
- setlogcons, setsid, setuidgid, sha1sum, slattach, sleep, softlimit,
- sort, split, start-stop-daemon, stat, strings, stty, su, sulogin,
- sum, sv, svlogd, swapoff, swapon, switch_root, sync, sysctl,
- syslogd, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp,
- time, top, touch, tr, traceroute, true, tty, ttysize, udhcpc,
- udhcpd, udpsvd, umount, uname, uncompress, unexpand, uniq,
- unix2dos, unlzma, unzip, uptime, usleep, uudecode, uuencode,
- vconfig, vi, vlock, watch, watchdog, wc, wget, which, who,
- whoami, xargs, yes, zcat, zcip
-
-$ <span style="text-decoration:blink;">_</span>
-
-</pre>
-
-<!--#include file="footer.html" -->
+++ /dev/null
-<!--#include file="header.html" -->
-
-
-<h3>Hall of Shame!!!</h3>
-
-<p>This page is no longer updated, these days we forward this sort of
-thing to the <a href="http://www.softwarefreedom.org">Software Freedom Law
-Center</a> instead.</p>
-
-<p>The following products and/or projects appear to use BusyBox, but do not
-appear to release source code as required by the <a
-href="/license.html">BusyBox license</a>. This is a violation of the law!
-The distributors of these products are invited to contact <a href=
-"mailto:andersen@codepoet.org">Erik Andersen</a> if they have any confusion
-as to what is needed to bring their products into compliance, or if they have
-already brought their product into compliance and wish to be removed from the
-Hall of Shame.
-
-<p>
-
-Here are the details of <a href="/license.html">exactly how to comply
-with the BusyBox license</a>, so there should be no question as to
-exactly what is expected.
-Complying with the Busybox license is easy and completely free, so the
-companies listed below should be ashamed of themselves. Furthermore, each
-product listed here is subject to being legally ordered to cease and desist
-distribution for violation of copyright law, and the distributor of each
-product is subject to being sued for statutory copyright infringement damages
-of up to $150,000 per work plus legal fees. Nobody wants to be sued, and <a
-href="mailto:andersen@codepoet.org">Erik</a> certainly would prefer to spend
-his time doing better things than sue people. But he will sue if forced to
-do so to maintain compliance.
-
-<p>
-
-Do everyone a favor and don't break the law -- if you use busybox, comply with
-the busybox license by releasing the source code with your product.
-
-<p>
-
-<ul>
-
- <li><a href="http://www.trittontechnologies.com/products.html">Tritton Technologies NAS120</a>
- <br>see <a href="http://www.ussg.iu.edu/hypermail/linux/kernel/0404.0/1611.html">here for details</a>
- <li><a href="http://www.macsense.com/product/homepod/">Macsense HomePod</a>
- <br>with details
- <a href="http://developer.gloolabs.com/modules.php?op=modload&name=Forums&file=viewtopic&topic=123&forum=7">here</a>
- <li><a href="http://www.cpx.com/products.asp?c=Wireless+Products">Compex Wireless Products</a>
- <br>appears to be running v0.60.5 with Linux version 2.4.20-uc0 on ColdFire,
- but no source code is mentioned or offered.
- <li><a href="http://www.inventel.com/en/product/datasheet/10/">Inventel DW 200 wireless/ADSL router</a>
- <li><a href="http://www.sweex.com/product.asp">Sweex DSL router</a>
- <br>appears to be running BusyBox v1.00-pre2 and udhcpd, but no source
- code is mentioned or offered.
- <li><a href="http://www.trendware.com/products/TEW-410APB.htm">TRENDnet TEW-410APB</a>
- </li><li><a href="http://www.hauppauge.com/Pages/products/data_mediamvp.html">Hauppauge Media MVP</a>
- <br>Hauppauge contacted me on 16 Dec 2003, and claims to be working on resolving this problem.
- </li><li><a href="http://www.hitex.com/download/adescom/data/">TriCore</a>
- </li><li><a href="http://www.allnet.de/">ALLNET 0186 wireless router</a>
- </li><li><a href="http://www.dmmtv.com/">Dreambox DM7000S DVB Satellite Receiver</a>
- <br> Dream Multimedia contacted me on 22 Dec 2003 and is working on resolving this problem.
- <br> Source _may_ be here: http://cvs.tuxbox.org/cgi-bin/viewcvs.cgi/tuxbox/cdk/
- </li><li><a href="http://testing.lkml.org/slashdot.php?mid=331690">Sigma Designs EM8500 based DVD players</a>
- <br>Source for the Sigma Designs reference platform is found here<br>
- <a href="http://www.uclinux.org/pub/uClinux/ports/arm/EM8500/uClinux-2.4-sigma.tar.gz">uClinux-2.4-sigma.tar.gz</a>, so while Sigma Designs itself appears to be in compliance, as far as I can tell,
- no vendors of Sigma Designs EM8500 based devices actually comply with the GPL....
- </li><li><a href="http://testing.lkml.org/slashdot.php?mid=433790">Liteon LVD2001 DVD player using the Sigma Designs EM8500</a>
- </li><li><a href="http://www.rimax.net/">Rimax DVD players using the Sigma Designs EM8500</a>
- </li><li><a href="http://www.vinc.us/">Bravo DVD players using the Sigma Designs EM8500</a>
- </li><li><a href="http://www.hb-direct.com/">H&B DX3110 Divx player based on Sigma Designs EM8500</a>
- </li><li><a href="http://www.recospa.it/mdpro1/index.php">United *DVX4066 mpeg4 capable DVD players</a>
- </li><li><a href="http://www.a-link.com/RR64AP.html">Avaks alink Roadrunner 64</a>
- <br> Partial source available, based on source distributed under NDA from <a href="http://www.lsilogic.com/products/dsl_platform_solutions/hb_linuxr2_2.html"> LSILogic</a>. Why the NDA LSILogic, what are you hiding ?
- <br>To verify the Avaks infrigment see my slashdot <a href="http://slashdot.org/~bug1/journal/">journal</a>.
- <br>The ZipIt wireless IM device appears to be using Busybox-1.00-pre1 in the ramdisk, however no source has been made available.
- </li><li>Undoubtedly there are others... Please report them so we can shame them (or if necessary sue them) into compliance.
-
-</ul>
-
-
-<!--#include file="footer.html" -->
-
+++ /dev/null
-<!--#include file="header.html" -->
-
-<h3>Sponsors</h3>
-
-<p>Please visit our sponsors and thank them for their support! They have
-provided money for equipment and bandwidth. Next time you need help with a
-project, consider these fine companies!</p>
-
-
-<ul>
- <li><a href="http://osuosl.org/">OSU OSL</a><br>
- OSU OSL kindly provides hosting for BusyBox and uClibc.
- </li>
-
- <li><a href="http://www.penguru.net">Penguru Consulting</a><br>
- Custom development for embedded Linux systems and multimedia platforms
- </li>
-
- <li><a href="http://opensource.se/">opensource.se</a><br>
- Embedded open source consulting in Europe.
- </li>
-
- <li><a href="http://www.codepoet-consulting.com">Codepoet Consulting</a><br>
- Custom Linux, embedded Linux, BusyBox, and uClibc development.
- </li>
-
- <li><a href="http://www.timesys.com">TimeSys</a><br>
- Embedded Linux development, cross-compilers, real-time, KGDB, tsrpm and cygwin.
- </li>
-</ul>
-
-<p>If you wish to be a sponsor, or if you have already contributed and would
-like your name added here, email <a href="mailto:rob@landley.net">Rob</a>.</p>
-
-<!--#include file="footer.html" -->
+++ /dev/null
-<!--#include file="header.html" -->
-
-<h3>Accessing Source</h3>
-
-
-
-<h3>Patches</h3>
-
-<p>You can <a href="/downloads/">download</a> fixes for particular releases
-of busybox, e.g. downloads/fixes-<em>major</em>-<em>minor</em>-<em>patch</em>/
-
-<h3>Anonymous Subversion Access</h3>
-
-We allow anonymous (read-only) Subversion (svn) access to everyone. To
-grab a copy of the latest version of BusyBox using anonymous svn access:
-
-<pre>
-svn co svn://busybox.net/trunk/busybox</pre>
-
-<p>
-The current <em>stable branch</em> can be obtained with
-<pre>
-svn co svn://busybox.net/branches/busybox_1_9_stable
-</pre>
-
-<p>
-
-If you are not already familiar with using Subversion, I recommend you visit <a
-href="http://subversion.tigris.org/">the Subversion website</a>. You might
-also want to read online or buy a copy of <a
-href="http://svnbook.red-bean.com/">the Subversion Book</a>. If you are
-already comfortable with using CVS, you may want to skip ahead to the <a
-href="http://svnbook.red-bean.com/en/1.1/apa.html">Subversion for CVS Users</a>
-part of the Subversion Book.
-
-<p>
-
-Once you've checked out a copy of the source tree, you can update your source
-tree at any time so it is in sync with the latest and greatest by entering your
-BusyBox directory and running the command:
-
-<pre>
-svn update</pre>
-
-Because you've only been granted anonymous access to the tree, you won't be
-able to commit any changes. Changes can be submitted for inclusion by posting
-them to the BusyBox mailing list. For those that are actively contributing
-<a href="developer.html">Subversion commit access</a> can be made available.
-
-<!--#include file="footer.html" -->
-
+++ /dev/null
-<!--#include file="header.html" -->
-
-
-<h3>External Tiny Utilities</h3>
-
-This is a list of tiny utilities whose functionality is not provided by
-busybox. If you have additional suggestions, please send an e-mail to our
-dev mailing list.
-
-<br><br>
-
-<table border=1>
-<tr>
- <th>Feature</th>
- <th>Utilities</th>
-</tr>
-
-<tr>
- <td>SSH</td>
- <td><a href="http://matt.ucc.asn.au/dropbear/">Dropbear</a> has both an ssh server and an ssh client that together come in around 100k. It has no external
-dependencies (I.E. it does not depend on OpenSSL, using a built-in copy of
-LibTomCrypt instead). It's actively maintained, with a quiet but responsive
-mailing list.</td>
-</tr>
-
-<tr>
- <td>SMTP</td>
- <td><a href="ftp://ftp.debian.org/debian/pool/main/s/ssmtp/">ssmtp</a> is an extremely simple Mail Transfer Agent.</td>
-</tr>
-
-<tr>
- <td>ntp</td>
- <td><a href="http://doolittle.icarus.com/ntpclient/">ntpclient</a> is a
-tiny ntp client. BusyBox has rdate to set the date from a remote server, but
-if you want a daemon to repeatedly adjust the clock over time, try that.</td>
-</table>
-
-<p>In a gui environment, you'll probably want a web browser.
-<a href="http://www.konqueror.org/embedded/">Konqueror Embedded</a> requires QT
-(or QT Embedded), but not KDE. The <a href="http://www.dillo.org/">Dillo</a>
-requires GTK+, but not Gnome. Or you can try the <a href="http://links.twibright.com/">graphical
-version of links</a>.</p>
-
-<h3>SCRIPTING LANGUAGES</h3>
-<p>Although busybox has built-in support for shell scripts, plenty of other
-small scripting languages are available on the net. A few examples:</p>
-<table border=1>
-<tr>
-<th><language></th>
-<th><description></th>
-</tr>
-<tr>
-<td> <a href=http://www.foo.be/docs/tpj/issues/vol5_3/tpj0503-0003.html>microperl</a> </td>
-<td> A small standalone perl interpreter that can be built from the perl source
-s via "make -f Makefile.micro". If you really feel the need for perl on an embe
-dded system, this is where to start.
-</tr>
-<tr>
-
-<td><a href=http://www.lua.org/pil/>Lua</a></td>
-<td>If you just want a small embedded scripting language to write <em>new</en>
-code in, this Brazilian import is lightweight, fairly popular, and has
-a complete book about it online.</td>
-</tr>
-
-<tr>
-<td><a href= http://www.star.le.ac.uk/%7Etjg/rc/>rc</a></td>
-<td>The PLAN9 shell. Not compatible with conventional bourne shell syntax,
-but fairly lightweight and small.</td>
-</tr>
-
-</tr>
-<tr>
-<td><a href=http://www.forth.org>forth</a></td>
-<td>A well known language for fast and small programs, decades old but still
-in use for everything from OpenBIOS to computer controlled engine timing.</td>
-</tr>
-</table>
-
-<p>For more information, you probably want to look at
-<a href=http://buildroot.uclibc.org>buildroot</a> and
-<a href=http://gentoo-wiki.com/TinyGentoo>TinyGentoo</a>, which
-build and use tiny utilities for all sorts of things.</p>
-
-<!--#include file="footer.html" -->
-
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Linux Ext2 FS Progs"
-
-config CHATTR
- bool "chattr"
- default n
- help
- chattr changes the file attributes on a second extended file system.
-
-### 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 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 LSATTR
- bool "lsattr"
- default n
- help
- lsattr lists the file attributes on a second extended file system.
-
-### 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 TUNE2FS
-### bool "tune2fs"
-### default n
-### help
-### tune2fs allows the system administrator to adjust various tunable
-### filesystem parameters on Linux ext2/ext3 filesystems.
-
-### config E2LABEL
-### bool "e2label"
-### default n
-### depends on TUNE2FS
-### help
-### e2label will display or change the filesystem label on the ext2
-### filesystem located on device.
-
-### NB: this one is now provided by util-linux/volume_id/*
-### config FINDFS
-### bool "findfs"
-### default n
-### depends on 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
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-
-lib-$(CONFIG_CHATTR) += chattr.o e2fs_lib.o
-lib-$(CONFIG_LSATTR) += lsattr.o e2fs_lib.o
-
-lib-$(CONFIG_FSCK) += fsck.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Linux Ext2 FS Progs"
-
-config CHATTR
- bool "chattr"
- default n
- help
- chattr changes the file attributes on a second extended file system.
-
-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 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 LSATTR
- bool "lsattr"
- default n
- help
- lsattr lists the file attributes on a second extended file system.
-
-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 TUNE2FS
- bool "tune2fs"
- default n
- help
- tune2fs allows the system administrator to adjust various tunable
- filesystem parameters on Linux ext2/ext3 filesystems.
-
-config E2LABEL
- bool "e2label"
- default n
- depends on TUNE2FS
- help
- e2label will display or change the filesystem label on the ext2
- filesystem located on device.
-
-config FINDFS
- bool "findfs"
- default n
- depends on 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
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-
-lib-$(CONFIG_CHATTR) += chattr.o
-lib-$(CONFIG_E2FSCK) += e2fsck.o util.o
-lib-$(CONFIG_FSCK) += fsck.o util.o
-lib-$(CONFIG_LSATTR) += lsattr.o
-lib-$(CONFIG_MKE2FS) += mke2fs.o util.o
-lib-$(CONFIG_TUNE2FS) += tune2fs.o util.o
-
-CFLAGS += -include $(srctree)/e2fsprogs/e2fsbb.h
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-NEEDED-$(CONFIG_E2FSCK) = y
-NEEDED-$(CONFIG_FSCK) = y
-NEEDED-$(CONFIG_MKE2FS) = y
-NEEDED-$(CONFIG_TUNE2FS) = y
-
-lib-y:=
-lib-$(NEEDED-y) += cache.o dev.o devname.o devno.o blkid_getsize.o \
- probe.o read.o resolve.o save.o tag.o list.o
-
-CFLAGS_dev.o := -include $(srctree)/include/busybox.h
-CFLAGS_devname.o := -include $(srctree)/include/busybox.h
-CFLAGS_devno.o := -include $(srctree)/include/busybox.h
-CFLAGS_blkid_getsize.o := -include $(srctree)/include/busybox.h
-CFLAGS_probe.o := -include $(srctree)/include/busybox.h
-CFLAGS_save.o := -include $(srctree)/include/busybox.h
-CFLAGS_tag.o := -include $(srctree)/include/busybox.h
-CFLAGS_list.o := -include $(srctree)/include/busybox.h
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-NEEDED-$(CONFIG_CHATTR) = y
-NEEDED-$(CONFIG_LSATTR) = y
-NEEDED-$(CONFIG_MKE2FS) = y
-NEEDED-$(CONFIG_TUNE2FS) = y
-
-lib-y:=
-lib-$(NEEDED-y) += fgetsetflags.o fgetsetversion.o pf.o iod.o mntopts.o \
- feature.o ls.o uuid.o pe.o ostype.o ps.o hashstr.o \
- parse_num.o
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-NEEDED-$(CONFIG_E2FSCK) = y
-NEEDED-$(CONFIG_FSCK) = y
-NEEDED-$(CONFIG_MKE2FS) = y
-NEEDED-$(CONFIG_TUNE2FS) = y
-
-lib-y:=
-lib-$(NEEDED-y) += gen_bitmap.o bitops.o ismounted.o mkjournal.o unix_io.o \
- rw_bitmaps.o initialize.o bitmaps.o block.o \
- ind_block.o inode.o freefs.o alloc_stats.o closefs.o \
- openfs.o io_manager.o finddev.o read_bb.o alloc.o badblocks.o \
- getsize.o getsectsize.o alloc_tables.o read_bb_file.o mkdir.o \
- bb_inode.o newdir.o alloc_sb.o lookup.o dirblock.o expanddir.o \
- dir_iterate.o link.o res_gdt.o icount.o get_pathname.o dblist.o \
- dirhash.o version.o flushb.o unlink.o check_desc.o valid_blk.o \
- ext_attr.o bmap.o dblist_dir.o ext2fs_inline.o swapfs.o
-
-CFLAGS += -include $(srctree)/e2fsprogs/e2fsbb.h
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-NEEDED-$(CONFIG_E2FSCK) = y
-NEEDED-$(CONFIG_FSCK) = y
-NEEDED-$(CONFIG_MKE2FS) = y
-NEEDED-$(CONFIG_TUNE2FS) = y
-
-lib-y:=
-lib-$(NEEDED-y) += compare.o gen_uuid.o pack.o parse.o unpack.o unparse.o \
- uuid_time.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Editors"
-
-config AWK
- bool "awk"
- default n
- help
- Awk is used as a pattern scanning and processing language. This is
- the BusyBox implementation of that programming language.
-
-config FEATURE_AWK_MATH
- bool "Enable math functions (requires libm)"
- default y
- depends on AWK
- help
- Enable math functions of the Awk programming language.
- NOTE: This will require libm to be present for linking.
-
-config CMP
- bool "cmp"
- default n
- help
- cmp is used to compare two files and returns the result
- to standard output.
-
-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 FEATURE_DIFF_BINARY
- bool "Enable checks for binary files"
- default y
- depends on DIFF
- help
- This option enables support for checking for binary files
- before a comparison is carried out.
-
-config FEATURE_DIFF_DIR
- bool "Enable directory support"
- default y
- depends on DIFF
- help
- This option enables support for directory and subdirectory
- comparison.
-
-config FEATURE_DIFF_MINIMAL
- bool "Enable -d option to find smaller sets of changes"
- default n
- depends on DIFF
- help
- Enabling this option allows the use of -d to make diff
- try hard to find the smallest possible set of changes.
-
-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 PATCH
- bool "patch"
- default n
- help
- Apply a unified diff formatted patch.
-
-config SED
- bool "sed"
- default n
- help
- sed is used to perform text transformations on a file
- or input from a pipeline.
-
-config VI
- bool "vi"
- default n
- help
- 'vi' is a text editor. More specifically, it is the One True
- text editor <grin>. It does, however, have a rather steep
- learning curve. If you are not already comfortable with 'vi'
- you may wish to use something else.
-
-config FEATURE_VI_MAX_LEN
- int "Maximum screen width in vi"
- range 256 16384
- default 4096
- depends on VI
- help
- Contrary to what you may think, this is not eating much.
- Make it smaller than 4k only if you are very limited on memory.
-
-config FEATURE_VI_8BIT
- bool "Allow vi to display 8-bit chars (otherwise shows dots)"
- default y
- depends on VI
- help
- If your terminal can display characters with high bit set,
- you may want to enable this. Note: vi is not Unicode-capable.
- If your terminal combines several 8-bit bytes into one character
- (as in Unicode mode), this will not work properly.
-
-config FEATURE_VI_COLON
- bool "Enable \":\" colon commands (no \"ex\" mode)"
- default y
- depends on VI
- help
- Enable a limited set of colon commands for vi. This does not
- provide an "ex" mode.
-
-config FEATURE_VI_YANKMARK
- bool "Enable yank/put commands and mark cmds"
- default y
- depends on VI
- help
- This will enable you to use yank and put, as well as mark in
- busybox vi.
-
-config FEATURE_VI_SEARCH
- bool "Enable search and replace cmds"
- default y
- depends on VI
- help
- Select this if you wish to be able to do search and replace in
- busybox vi.
-
-config FEATURE_VI_USE_SIGNALS
- bool "Catch signals"
- default y
- depends on VI
- help
- Selecting this option will make busybox vi signal aware. This will
- make busybox vi support SIGWINCH to deal with Window Changes, catch
- Ctrl-Z and Ctrl-C and alarms.
-
-config FEATURE_VI_DOT_CMD
- bool "Remember previous cmd and \".\" cmd"
- default y
- depends on VI
- help
- Make busybox vi remember the last command and be able to repeat it.
-
-config FEATURE_VI_READONLY
- bool "Enable -R option and \"view\" mode"
- default y
- depends on VI
- help
- Enable the read-only command line option, which allows the user to
- open a file in read-only mode.
-
-config FEATURE_VI_SETOPTS
- bool "Enable set-able options, ai ic showmatch"
- default y
- depends on VI
- help
- Enable the editor to set some (ai, ic, showmatch) options.
-
-config FEATURE_VI_SET
- bool "Support for :set"
- default y
- depends on VI
- help
- Support for ":set".
-
-config FEATURE_VI_WIN_RESIZE
- bool "Handle window resize"
- default y
- depends on VI
- help
- Make busybox vi behave nicely with terminals that get resized.
-
-config FEATURE_VI_OPTIMIZE_CURSOR
- bool "Optimize cursor movement"
- default y
- depends on VI
- help
- This will make the cursor movement faster, but requires more memory
- and it makes the applet a tiny bit larger.
-
-config FEATURE_ALLOW_EXEC
- bool "Allow vi and awk to execute shell commands"
- default y
- depends on VI || AWK
- help
- Enables vi and awk features which allows user to execute
- shell commands (using system() C call).
-
-endmenu
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_AWK) += awk.o
-lib-$(CONFIG_CMP) += cmp.o
-lib-$(CONFIG_DIFF) += diff.o
-lib-$(CONFIG_ED) += ed.o
-lib-$(CONFIG_PATCH) += patch.o
-lib-$(CONFIG_SED) += sed.o
-lib-$(CONFIG_VI) += vi.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Finding Utilities"
-
-config FIND
- bool "find"
- default n
- help
- find is used to search your system to find specified files.
-
-config FEATURE_FIND_PRINT0
- bool "Enable -print0 option"
- default y
- depends on 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 FEATURE_FIND_MTIME
- bool "Enable modified time matching (-mtime) option"
- default y
- depends on FIND
- help
- Allow searching based on the modification time of
- files, in days.
-
-config FEATURE_FIND_MMIN
- bool "Enable modified time matching (-mmin) option"
- default y
- depends on FIND
- help
- Allow searching based on the modification time of
- files, in minutes.
-
-config FEATURE_FIND_PERM
- bool "Enable permissions matching (-perm) option"
- default y
- depends on FIND
- help
- Enable searching based on file permissions.
-
-config FEATURE_FIND_TYPE
- bool "Enable filetype matching (-type) option"
- default y
- depends on FIND
- help
- Enable searching based on file type (file,
- directory, socket, device, etc.).
-
-config FEATURE_FIND_XDEV
- bool "Enable stay in filesystem (-xdev) option"
- default y
- depends on FIND
- help
- This option allows find to restrict searches to a single filesystem.
-
-config FEATURE_FIND_MAXDEPTH
- bool "Enable -maxdepth N option"
- default y
- depends on FIND
- help
- This option enables -maxdepth N option.
-
-config FEATURE_FIND_NEWER
- bool "Enable -newer option for comparing file mtimes"
- default y
- depends on FIND
- help
- Support the 'find -newer' option for finding any files which have
- a modified time that is more recent than the specified FILE.
-
-config FEATURE_FIND_INUM
- bool "Enable inode number matching (-inum) option"
- default y
- depends on FIND
- help
- Support the 'find -inum' option for searching by inode number.
-
-config FEATURE_FIND_EXEC
- bool "Enable (-exec) option allowing execution of commands"
- default y
- depends on FIND
- help
- Support the 'find -exec' option for executing commands based upon
- the files matched.
-
-config FEATURE_FIND_USER
- bool "Enable username/uid matching (-user) option"
- default y
- depends on FIND
- help
- Support the 'find -user' option for searching by username or uid.
-
-config FEATURE_FIND_GROUP
- bool "Enable group/gid matching (-group) option"
- default y
- depends on FIND
- help
- Support the 'find -group' option for searching by group name or gid.
-
-config FEATURE_FIND_NOT
- bool "Enable the 'not' (!) operator"
- default y
- depends on FIND
- help
- Support the '!' operator to invert the test results.
- If 'Enable full-blown desktop' is enabled, then will also support
- the non-POSIX notation '-not'.
-
-config FEATURE_FIND_DEPTH
- bool "Enable the -depth option"
- default y
- depends on FIND
- help
- Process each directory's contents before the directory itself.
-
-config FEATURE_FIND_PAREN
- bool "Enable parens in options"
- default y
- depends on FIND
- help
- Enable usage of parens '(' to specify logical order of arguments.
-
-config FEATURE_FIND_SIZE
- bool "Enable (-size) option allowing matching for file size"
- default y
- depends on FIND
- help
- Support the 'find -size' option for searching by file size.
-
-config FEATURE_FIND_PRUNE
- bool "Enable (-prune) option allowing to exclude subdirectories"
- default y
- depends on FIND
- help
- If the file is a directory, dont descend into it. Useful for
- exclusion .svn and CVS directories.
-
-config FEATURE_FIND_DELETE
- bool "Enable -delete option allowing to delete files"
- default n
- depends on FIND && FEATURE_FIND_DEPTH
- help
- Support the 'find -delete' option for deleting files and direcotries.
- WARNING: This option can do much harm if used wrong. Busybox will not
- try to protect the user from doing stupid things. Use with care.
-
-config FEATURE_FIND_PATH
- bool "Enable -path option allowing to match pathname patterns"
- default y
- depends on FIND
- help
- The -path option matches whole pathname instead of just filename.
-
-config FEATURE_FIND_REGEX
- bool "Enable -regex: match pathname to regex"
- default y
- depends on FIND
- help
- The -regex option matches whole pathname against regular expression.
-
-config FEATURE_FIND_CONTEXT
- bool "Enable (-context) option for matching security context"
- default n
- depends on FIND && SELINUX
- help
- Support the 'find -context' option for matching security context.
-
-config GREP
- bool "grep"
- default n
- help
- grep is used to search files for a specified pattern.
-
-config FEATURE_GREP_EGREP_ALIAS
- bool "Support extended regular expressions (egrep & grep -E)"
- default y
- depends on GREP
- help
- Enabled support for extended regular expressions. Extended
- regular expressions allow for alternation (foo|bar), grouping,
- and various repetition operators.
-
-config FEATURE_GREP_FGREP_ALIAS
- bool "Alias fgrep to grep -F"
- default y
- depends on GREP
- help
- fgrep sees the search pattern as a normal string rather than
- regular expressions.
- grep -F is always builtin, this just creates the fgrep alias.
-
-config FEATURE_GREP_CONTEXT
- bool "Enable before and after context flags (-A, -B and -C)"
- default y
- depends on GREP
- help
- Print the specified number of leading (-B) and/or trailing (-A)
- context surrounding our matching lines.
- Print the specified number of context lines (-C).
-
-config XARGS
- bool "xargs"
- default n
- help
- xargs is used to execute a specified command on
- every item from standard input.
-
-config FEATURE_XARGS_SUPPORT_CONFIRMATION
- bool "Enable prompt and confirmation option -p"
- default n
- depends on XARGS
- help
- Support prompt the user about whether to run each command
- line and read a line from the terminal.
-
-config FEATURE_XARGS_SUPPORT_QUOTES
- bool "Enable support single and double quotes and backslash"
- default n
- depends on XARGS
- help
- Default xargs unsupport single and double quotes
- and backslash for can use aruments with spaces.
-
-config FEATURE_XARGS_SUPPORT_TERMOPT
- bool "Enable support options -x"
- default n
- depends on XARGS
- help
- Enable support exit if the size (see the -s or -n option)
- is exceeded.
-
-config FEATURE_XARGS_SUPPORT_ZERO_TERM
- bool "Enable null terminated option -0"
- default n
- depends on XARGS
- help
- Enable input filenames are terminated by a null character
- instead of by whitespace, and the quotes and backslash
- are not special.
-
-endmenu
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_FIND) += find.o
-lib-$(CONFIG_GREP) += grep.o
-lib-$(CONFIG_XARGS) += xargs.o
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * applets.h - a listing of all busybox applets.
- *
- * If you write a new applet, you need to add an entry to this list to make
- * busybox aware of it.
- *
- * It is CRUCIAL that this listing be kept in ascii order, otherwise the binary
- * search lookup contributed by Gaute B Strokkenes stops working. If you value
- * your kneecaps, you'll be sure to *make sure* that any changes made to this
- * file result in the listing remaining in ascii order. You have been warned.
- */
-
-/*
-name - applet name as it is typed on command line
-name2 - applet name, converted to C (ether-wake: name2 = ether_wake)
-main - corresponding <applet>_main to call (bzcat: main = bunzip2)
-l - location to install link to: [/usr]/[s]bin
-s - suid type:
- _BB_SUID_ALWAYS: will complain if busybox isn't suid
- and is run by non-root (applet_main() will not be called at all)
- _BB_SUID_NEVER: will drop suid prior to applet_main()
- _BB_SUID_MAYBE: neither of the above
-*/
-
-#if defined(PROTOTYPES)
-# define APPLET(name,l,s) int name##_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-# define APPLET_NOUSAGE(name,main,l,s) int main##_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-# define APPLET_ODDNAME(name,main,l,s,name2) int main##_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-# define APPLET_NOEXEC(name,main,l,s,name2) int main##_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-# define APPLET_NOFORK(name,main,l,s,name2) int main##_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-
-#elif defined(NAME_MAIN_CNAME)
-# define APPLET(name,l,s) name name##_main name
-# define APPLET_NOUSAGE(name,main,l,s) name main##_main name
-# define APPLET_ODDNAME(name,main,l,s,name2) name main##_main name2
-# define APPLET_NOEXEC(name,main,l,s,name2) name main##_main name2
-# define APPLET_NOFORK(name,main,l,s,name2) name main##_main name2
-
-#elif defined(MAKE_USAGE) && ENABLE_FEATURE_VERBOSE_USAGE
-# define APPLET(name,l,s) name##_trivial_usage "\n\n" name##_full_usage "\0"
-# define APPLET_NOUSAGE(name,main,l,s) "\b\0"
-# define APPLET_ODDNAME(name,main,l,s,name2) name2##_trivial_usage "\n\n" name2##_full_usage "\0"
-# define APPLET_NOEXEC(name,main,l,s,name2) name2##_trivial_usage "\n\n" name2##_full_usage "\0"
-# define APPLET_NOFORK(name,main,l,s,name2) name2##_trivial_usage "\n\n" name2##_full_usage "\0"
-
-#elif defined(MAKE_USAGE) && !ENABLE_FEATURE_VERBOSE_USAGE
-# define APPLET(name,l,s) name##_trivial_usage "\0"
-# define APPLET_NOUSAGE(name,main,l,s) "\b\0"
-# define APPLET_ODDNAME(name,main,l,s,name2) name2##_trivial_usage "\0"
-# define APPLET_NOEXEC(name,main,l,s,name2) name2##_trivial_usage "\0"
-# define APPLET_NOFORK(name,main,l,s,name2) name2##_trivial_usage "\0"
-
-#elif defined(MAKE_LINKS)
-# define APPLET(name,l,c) LINK l name
-# define APPLET_NOUSAGE(name,main,l,s) LINK l name
-# define APPLET_ODDNAME(name,main,l,s,name2) LINK l name
-# define APPLET_NOEXEC(name,main,l,s,name2) LINK l name
-# define APPLET_NOFORK(name,main,l,s,name2) LINK l name
-
-#else
- static struct bb_applet applets[] = { /* name, main, location, need_suid */
-# define APPLET(name,l,s) { #name, #name, l, s },
-# define APPLET_NOUSAGE(name,main,l,s) { #name, #main, l, s },
-# define APPLET_ODDNAME(name,main,l,s,name2) { #name, #main, l, s },
-# define APPLET_NOEXEC(name,main,l,s,name2) { #name, #main, l, s, 1 },
-# define APPLET_NOFORK(name,main,l,s,name2) { #name, #main, l, s, 1, 1 },
-#endif
-
-#if ENABLE_INSTALL_NO_USR
-# define _BB_DIR_USR_BIN _BB_DIR_BIN
-# define _BB_DIR_USR_SBIN _BB_DIR_SBIN
-#endif
-
-
-USE_TEST(APPLET_NOFORK([, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test))
-USE_TEST(APPLET_NOUSAGE([[, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_ADDGROUP(APPLET(addgroup, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_ADDUSER(APPLET(adduser, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_ADJTIMEX(APPLET(adjtimex, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_AR(APPLET(ar, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_ARP(APPLET(arp, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_ARPING(APPLET(arping, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_ASH(APPLET_NOUSAGE(ash, ash, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_AWK(APPLET_NOEXEC(awk, awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER, awk))
-USE_BASENAME(APPLET_NOFORK(basename, basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER, basename))
-USE_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER))
-//USE_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_BRCTL(APPLET(brctl, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_BUNZIP2(APPLET(bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER, bzcat))
-USE_BZIP2(APPLET(bzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CAL(APPLET(cal, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CAT(APPLET_NOFORK(cat, cat, _BB_DIR_BIN, _BB_SUID_NEVER, cat))
-USE_CATV(APPLET(catv, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_CHAT(APPLET(chat, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CHATTR(APPLET(chattr, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_CHCON(APPLET(chcon, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CHGRP(APPLET_NOEXEC(chgrp, chgrp, _BB_DIR_BIN, _BB_SUID_NEVER, chgrp))
-USE_CHMOD(APPLET_NOEXEC(chmod, chmod, _BB_DIR_BIN, _BB_SUID_NEVER, chmod))
-USE_CHOWN(APPLET_NOEXEC(chown, chown, _BB_DIR_BIN, _BB_SUID_NEVER, chown))
-USE_CHPASSWD(APPLET(chpasswd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_CHPST(APPLET(chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CHROOT(APPLET(chroot, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_CHRT(APPLET(chrt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CHVT(APPLET(chvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CKSUM(APPLET(cksum, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CLEAR(APPLET(clear, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CMP(APPLET(cmp, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_COMM(APPLET(comm, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CP(APPLET_NOEXEC(cp, cp, _BB_DIR_BIN, _BB_SUID_NEVER, cp))
-USE_CPIO(APPLET(cpio, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
-USE_CRYPTPW(APPLET(cryptpw, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CTTYHACK(APPLET_NOUSAGE(cttyhack, cttyhack, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_CUT(APPLET_NOEXEC(cut, cut, _BB_DIR_USR_BIN, _BB_SUID_NEVER, cut))
-USE_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_DC(APPLET(dc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_DD(APPLET_NOEXEC(dd, dd, _BB_DIR_BIN, _BB_SUID_NEVER, dd))
-USE_DEALLOCVT(APPLET(deallocvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_DELGROUP(APPLET_ODDNAME(delgroup, deluser, _BB_DIR_BIN, _BB_SUID_NEVER, delgroup))
-USE_DELUSER(APPLET(deluser, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_DEVFSD(APPLET(devfsd, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_DF(APPLET(df, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_APP_DHCPRELAY(APPLET(dhcprelay, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_DIFF(APPLET(diff, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_DIRNAME(APPLET_NOFORK(dirname, dirname, _BB_DIR_USR_BIN, _BB_SUID_NEVER, dirname))
-USE_DMESG(APPLET(dmesg, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_DNSD(APPLET(dnsd, _BB_DIR_USR_SBIN, _BB_SUID_ALWAYS))
-USE_DOS2UNIX(APPLET(dos2unix, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_DPKG(APPLET(dpkg, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, _BB_DIR_USR_BIN, _BB_SUID_NEVER, dpkg_deb))
-USE_DU(APPLET(du, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_DUMPKMAP(APPLET(dumpkmap, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_APP_DUMPLEASES(APPLET(dumpleases, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-//USE_E2FSCK(APPLET(e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER))
-//USE_E2LABEL(APPLET_NOUSAGE(e2label, tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_ECHO(APPLET_NOFORK(echo, echo, _BB_DIR_BIN, _BB_SUID_NEVER, echo))
-USE_ED(APPLET(ed, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_FEATURE_GREP_EGREP_ALIAS(APPLET_NOUSAGE(egrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_EJECT(APPLET(eject, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_ENV(APPLET(env, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_ENVDIR(APPLET_ODDNAME(envdir, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envdir))
-USE_ENVUIDGID(APPLET_ODDNAME(envuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envuidgid))
-USE_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ether_wake))
-USE_EXPAND(APPLET(expand, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_EXPR(APPLET(expr, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_FAKEIDENTD(APPLET(fakeidentd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_FALSE(APPLET_NOFORK(false, false, _BB_DIR_BIN, _BB_SUID_NEVER, false))
-USE_FBSET(APPLET(fbset, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, _BB_DIR_BIN, _BB_SUID_NEVER, fdflush))
-USE_FDFORMAT(APPLET(fdformat, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_FDISK(APPLET(fdisk, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_FETCHMAIL(APPLET_ODDNAME(fetchmail, sendgetmail, _BB_DIR_USR_BIN, _BB_SUID_NEVER, fetchmail))
-USE_FEATURE_GREP_FGREP_ALIAS(APPLET_NOUSAGE(fgrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_FIND(APPLET_NOEXEC(find, find, _BB_DIR_USR_BIN, _BB_SUID_NEVER, find))
-USE_FINDFS(APPLET(findfs, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_FOLD(APPLET(fold, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_FREE(APPLET(free, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_FREERAMDISK(APPLET(freeramdisk, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_FSCK(APPLET(fsck, _BB_DIR_SBIN, _BB_SUID_NEVER))
-//USE_E2FSCK(APPLET_NOUSAGE(fsck.ext2, e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER))
-//USE_E2FSCK(APPLET_NOUSAGE(fsck.ext3, e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_minix))
-USE_FTPGET(APPLET_ODDNAME(ftpget, ftpgetput, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ftpget))
-USE_FTPPUT(APPLET_ODDNAME(ftpput, ftpgetput, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ftpput))
-USE_FUSER(APPLET(fuser, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_GETENFORCE(APPLET(getenforce, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_GETOPT(APPLET(getopt, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_GETSEBOOL(APPLET(getsebool, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_GETTY(APPLET(getty, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_GREP(APPLET(grep, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_GUNZIP(APPLET(gunzip, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_GZIP(APPLET(gzip, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_HALT(APPLET(halt, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_HD(APPLET_ODDNAME(hd, hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hd))
-USE_HDPARM(APPLET(hdparm, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_HEAD(APPLET(head, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hexdump))
-USE_HOSTID(APPLET_NOFORK(hostid, hostid, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hostid))
-USE_HOSTNAME(APPLET(hostname, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_HTTPD(APPLET(httpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_HUSH(APPLET_NOUSAGE(hush, hush, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_HWCLOCK(APPLET(hwclock, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_ID(APPLET(id, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_IFCONFIG(APPLET(ifconfig, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_IFUPDOWN(APPLET_ODDNAME(ifdown, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifdown))
-USE_IFENSLAVE(APPLET(ifenslave, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_IFUPDOWN(APPLET_ODDNAME(ifup, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifup))
-USE_INETD(APPLET(inetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_INIT(APPLET(init, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_INSMOD(APPLET(insmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_INSTALL(APPLET(install, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-#if ENABLE_FEATURE_IP_ADDRESS \
- || ENABLE_FEATURE_IP_ROUTE \
- || ENABLE_FEATURE_IP_LINK \
- || ENABLE_FEATURE_IP_TUNNEL \
- || ENABLE_FEATURE_IP_RULE
-USE_IP(APPLET(ip, _BB_DIR_BIN, _BB_SUID_NEVER))
-#endif
-USE_IPADDR(APPLET(ipaddr, _BB_DIR_BIN, _BB_SUID_NEVER))
-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_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_IPRULE(APPLET(iprule, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_IPTUNNEL(APPLET(iptunnel, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_KBD_MODE(APPLET(kbd_mode, _BB_DIR_USR_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))
-USE_LENGTH(APPLET_NOFORK(length, length, _BB_DIR_USR_BIN, _BB_SUID_NEVER, length))
-USE_LESS(APPLET(less, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SETARCH(APPLET_NOUSAGE(linux32, setarch, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_SETARCH(APPLET_NOUSAGE(linux64, setarch, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_FEATURE_INITRD(APPLET_NOUSAGE(linuxrc, init, _BB_DIR_ROOT, _BB_SUID_NEVER))
-USE_LN(APPLET_NOEXEC(ln, ln, _BB_DIR_BIN, _BB_SUID_NEVER, ln))
-USE_LOAD_POLICY(APPLET(load_policy, _BB_DIR_USR_SBIN, _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_LOGGER(APPLET(logger, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_ALWAYS))
-USE_LOGNAME(APPLET_NOFORK(logname, logname, _BB_DIR_USR_BIN, _BB_SUID_NEVER, logname))
-USE_LOGREAD(APPLET(logread, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_LOSETUP(APPLET(losetup, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_LPD(APPLET(lpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_LPQ(APPLET_ODDNAME(lpq, lpqr, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lpq))
-USE_LPR(APPLET_ODDNAME(lpr, lpqr, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lpr))
-USE_LS(APPLET_NOEXEC(ls, ls, _BB_DIR_BIN, _BB_SUID_NEVER, ls))
-USE_LSATTR(APPLET(lsattr, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_UNLZMA(APPLET_ODDNAME(lzmacat, unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lzmacat))
-USE_MAKEDEVS(APPLET(makedevs, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MATCHPATHCON(APPLET(matchpathcon, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_MD5SUM(APPLET_ODDNAME(md5sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, md5sum))
-USE_MDEV(APPLET(mdev, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MESG(APPLET(mesg, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_MICROCOM(APPLET(microcom, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_MKDIR(APPLET_NOFORK(mkdir, mkdir, _BB_DIR_BIN, _BB_SUID_NEVER, mkdir))
-//USE_MKE2FS(APPLET(mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MKFIFO(APPLET(mkfifo, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-//USE_MKE2FS(APPLET_NOUSAGE(mkfs.ext2, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER))
-//USE_MKE2FS(APPLET_NOUSAGE(mkfs.ext3, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_minix))
-USE_MKNOD(APPLET(mknod, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_MKSWAP(APPLET(mkswap, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MKTEMP(APPLET(mktemp, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_MODPROBE(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MORE(APPLET(more, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_MOUNT(APPLET(mount, _BB_DIR_BIN, USE_DESKTOP(_BB_SUID_MAYBE) SKIP_DESKTOP(_BB_SUID_NEVER)))
-USE_MOUNTPOINT(APPLET(mountpoint, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_MSH(APPLET_NOUSAGE(msh, msh, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_MT(APPLET(mt, _BB_DIR_BIN, _BB_SUID_NEVER))
-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_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_NMETER(APPLET(nmeter, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_NOHUP(APPLET(nohup, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_NSLOOKUP(APPLET(nslookup, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_OD(APPLET(od, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_OPENVT(APPLET(openvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_PASSWD(APPLET(passwd, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
-USE_PATCH(APPLET(patch, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_PGREP(APPLET(pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_PIDOF(APPLET(pidof, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_PING(APPLET(ping, _BB_DIR_BIN, _BB_SUID_MAYBE))
-USE_PING6(APPLET(ping6, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_PIPE_PROGRESS(APPLET_NOUSAGE(pipe_progress, pipe_progress, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_PIVOT_ROOT(APPLET(pivot_root, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_PKILL(APPLET_ODDNAME(pkill, pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER, pkill))
-USE_HALT(APPLET_ODDNAME(poweroff, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, poweroff))
-USE_PRINTENV(APPLET(printenv, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_PRINTF(APPLET(printf, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_PS(APPLET(ps, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_PSCAN(APPLET(pscan, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_PWD(APPLET_NOFORK(pwd, pwd, _BB_DIR_BIN, _BB_SUID_NEVER, pwd))
-USE_RAIDAUTORUN(APPLET(raidautorun, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_RDATE(APPLET(rdate, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_READAHEAD(APPLET(readahead, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_READLINK(APPLET(readlink, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_READPROFILE(APPLET(readprofile, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_REALPATH(APPLET(realpath, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_HALT(APPLET_ODDNAME(reboot, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, reboot))
-USE_RENICE(APPLET(renice, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RESET(APPLET(reset, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RESIZE(APPLET(resize, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RESTORECON(APPLET_ODDNAME(restorecon, setfiles, _BB_DIR_SBIN, _BB_SUID_NEVER, restorecon))
-USE_RM(APPLET_NOFORK(rm, rm, _BB_DIR_BIN, _BB_SUID_NEVER, rm))
-USE_RMDIR(APPLET_NOFORK(rmdir, rmdir, _BB_DIR_BIN, _BB_SUID_NEVER, rmdir))
-USE_RMMOD(APPLET(rmmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_ROUTE(APPLET(route, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_RPM(APPLET(rpm, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_RPM2CPIO(APPLET(rpm2cpio, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RTCWAKE(APPLET(rtcwake, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, _BB_DIR_BIN, _BB_SUID_NEVER, run_parts))
-USE_RUNCON(APPLET(runcon, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RUNLEVEL(APPLET(runlevel, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_RUNSV(APPLET(runsv, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RUNSVDIR(APPLET(runsvdir, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RX(APPLET(rx, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SCRIPT(APPLET(script, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SED(APPLET(sed, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_SELINUXENABLED(APPLET(selinuxenabled, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_SENDMAIL(APPLET_ODDNAME(sendmail, sendgetmail, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sendmail))
-USE_SEQ(APPLET_NOFORK(seq, seq, _BB_DIR_USR_BIN, _BB_SUID_NEVER, seq))
-USE_SESTATUS(APPLET(sestatus, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_SETARCH(APPLET(setarch, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_SETCONSOLE(APPLET(setconsole, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_SETENFORCE(APPLET(setenforce, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_SETFILES(APPLET(setfiles, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_SETKEYCODES(APPLET(setkeycodes, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SETLOGCONS(APPLET(setlogcons, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_SETSEBOOL(APPLET(setsebool, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_SETSID(APPLET(setsid, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, setuidgid))
-USE_FEATURE_SH_IS_ASH(APPLET_NOUSAGE(sh, ash, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_FEATURE_SH_IS_HUSH(APPLET_NOUSAGE(sh, hush, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_FEATURE_SH_IS_MSH(APPLET_NOUSAGE(sh, msh, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_SHA1SUM(APPLET_ODDNAME(sha1sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha1sum))
-USE_SLATTACH(APPLET(slattach, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_SLEEP(APPLET_NOFORK(sleep, sleep, _BB_DIR_BIN, _BB_SUID_NEVER, sleep))
-USE_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, softlimit))
-USE_SORT(APPLET_NOEXEC(sort, sort, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sort))
-USE_SPLIT(APPLET(split, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, _BB_DIR_SBIN, _BB_SUID_NEVER, start_stop_daemon))
-USE_STAT(APPLET(stat, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_STRINGS(APPLET(strings, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_STTY(APPLET(stty, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_SU(APPLET(su, _BB_DIR_BIN, _BB_SUID_ALWAYS))
-USE_SULOGIN(APPLET(sulogin, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_SUM(APPLET(sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SV(APPLET(sv, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SVLOGD(APPLET(svlogd, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, _BB_DIR_SBIN, _BB_SUID_NEVER,swapoff))
-USE_SWAPONOFF(APPLET_ODDNAME(swapon, swap_on_off, _BB_DIR_SBIN, _BB_SUID_NEVER, swapon))
-USE_SWITCH_ROOT(APPLET(switch_root, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_SYNC(APPLET_NOFORK(sync, sync, _BB_DIR_BIN, _BB_SUID_NEVER, sync))
-USE_BB_SYSCTL(APPLET(sysctl, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_SYSLOGD(APPLET(syslogd, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_TAC(APPLET_NOEXEC(tac, tac, _BB_DIR_USR_BIN, _BB_SUID_NEVER, tac))
-USE_TAIL(APPLET(tail, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TAR(APPLET(tar, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_TASKSET(APPLET(taskset, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TCPSVD(APPLET_ODDNAME(tcpsvd, tcpudpsvd, _BB_DIR_USR_BIN, _BB_SUID_NEVER, tcpsvd))
-USE_TEE(APPLET(tee, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TELNET(APPLET(telnet, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TELNETD(APPLET(telnetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_TEST(APPLET_NOEXEC(test, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test))
-#if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT
-USE_TFTP(APPLET(tftp, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TFTPD(APPLET(tftpd, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-#endif
-USE_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_NEVER, touch))
-USE_TR(APPLET(tr, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TRACEROUTE(APPLET(traceroute, _BB_DIR_USR_BIN, _BB_SUID_MAYBE))
-USE_TRUE(APPLET_NOFORK(true, true, _BB_DIR_BIN, _BB_SUID_NEVER, true))
-USE_TTY(APPLET(tty, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TTYSIZE(APPLET(ttysize, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-//USE_TUNE2FS(APPLET(tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_APP_UDHCPC(APPLET(udhcpc, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_APP_UDHCPD(APPLET(udhcpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_UDPSVD(APPLET_ODDNAME(udpsvd, tcpudpsvd, _BB_DIR_USR_BIN, _BB_SUID_NEVER, udpsvd))
-USE_UMOUNT(APPLET(umount, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_UNAME(APPLET(uname, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_UNCOMPRESS(APPLET(uncompress, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_UNEXPAND(APPLET_ODDNAME(unexpand, expand, _BB_DIR_USR_BIN, _BB_SUID_NEVER, unexpand))
-USE_UNIQ(APPLET(uniq, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_UNIX2DOS(APPLET_ODDNAME(unix2dos, dos2unix, _BB_DIR_USR_BIN, _BB_SUID_NEVER, unix2dos))
-USE_UNLZMA(APPLET(unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_UNZIP(APPLET(unzip, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_UPTIME(APPLET(uptime, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_USLEEP(APPLET_NOFORK(usleep, usleep, _BB_DIR_BIN, _BB_SUID_NEVER, usleep))
-USE_UUDECODE(APPLET(uudecode, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_UUENCODE(APPLET(uuencode, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_VCONFIG(APPLET(vconfig, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_VI(APPLET(vi, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_VLOCK(APPLET(vlock, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
-USE_WATCH(APPLET(watch, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_WATCHDOG(APPLET(watchdog, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_WC(APPLET(wc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_WGET(APPLET(wget, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_WHICH(APPLET(which, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_WHO(APPLET(who, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_WHOAMI(APPLET_NOFORK(whoami, whoami, _BB_DIR_USR_BIN, _BB_SUID_NEVER, whoami))
-USE_XARGS(APPLET_NOEXEC(xargs, xargs, _BB_DIR_USR_BIN, _BB_SUID_NEVER, xargs))
-USE_YES(APPLET_NOFORK(yes, yes, _BB_DIR_USR_BIN, _BB_SUID_NEVER, yes))
-USE_GUNZIP(APPLET_ODDNAME(zcat, gunzip, _BB_DIR_BIN, _BB_SUID_NEVER, zcat))
-USE_ZCIP(APPLET(zcip, _BB_DIR_SBIN, _BB_SUID_NEVER))
-
-#if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE)
-};
-#endif
-
-#undef APPLET
-#undef APPLET_NOUSAGE
-#undef APPLET_ODDNAME
-#undef APPLET_NOEXEC
-#undef APPLET_NOFORK
+++ /dev/null
-/* vi: set sw=8 ts=8: */
-/*
- * This file suffers from chronically incorrect tabification
- * of messages. Before editing this file:
- * 1. Switch you editor to 8-space tab mode.
- * 2. Do not use \t in messages, use real tab character.
- * 3. Start each source line with message as follows:
- * |<7 spaces>"text with tabs"....
- * or
- * |<5 spaces>"\ntext with tabs"....
- */
-
-#ifndef __BB_USAGE_H__
-#define __BB_USAGE_H__
-
-#define addgroup_trivial_usage \
- "[-g GID] " USE_FEATURE_ADDUSER_TO_GROUP("[user_name] ") "group_name"
-#define addgroup_full_usage \
- "Add a group " USE_FEATURE_ADDUSER_TO_GROUP("or add an user to a group") "\n" \
- "\nOptions:" \
- "\n -g GID Group id"
-
-#define adduser_trivial_usage \
- "[OPTIONS] user_name"
-#define adduser_full_usage \
- "Add an user\n" \
- "\nOptions:" \
- "\n -h DIR Home directory" \
- "\n -g GECOS GECOS field" \
- "\n -s SHELL Login shell" \
- "\n -G GROUP Add user to existing group" \
- "\n -S Create a system user" \
- "\n -D Do not assign a password" \
- "\n -H Do not create home directory" \
-
-#define adjtimex_trivial_usage \
- "[-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick]"
-#define adjtimex_full_usage \
- "Read and optionally set system timebase parameters. See adjtimex(2).\n" \
- "\nOptions:" \
- "\n -q Quiet" \
- "\n -o offset Time offset, microseconds" \
- "\n -f frequency Frequency adjust, integer kernel units (65536 is 1ppm)" \
- "\n (positive values make clock run faster)" \
- "\n -t tick Microseconds per tick, usually 10000" \
- "\n -p timeconstant" \
-
-#define ar_trivial_usage \
- "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES"
-#define ar_full_usage \
- "Extract or list FILES from an ar archive\n" \
- "\nOptions:" \
- "\n -o Preserve original dates" \
- "\n -p Extract to stdout" \
- "\n -t List" \
- "\n -x Extract" \
- "\n -v Verbose" \
-
-#define arp_trivial_usage \
- "\n" \
- "[-vn] [-H type] [-i if] -a [hostname]\n" \
- "[-v] [-i if] -d hostname [pub]\n" \
- "[-v] [-H type] [-i if] -s hostname hw_addr [temp]\n" \
- "[-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub\n" \
- "[-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pub\n"
-#define arp_full_usage \
- "Manipulate ARP cache\n" \
- "\nOptions:" \
- "\n -a Display (all) hosts" \
- "\n -s Set new ARP entry" \
- "\n -d Delete a specified entry" \
- "\n -v Verbose" \
- "\n -n Don't resolve names" \
- "\n -i IF Network interface" \
- "\n -D Read <hwaddr> from given device" \
- "\n -A, -p AF Protocol family" \
- "\n -H HWTYPE Hardware address type" \
-
-#define arping_trivial_usage \
- "[-fqbDUA] [-c count] [-w timeout] [-I dev] [-s sender] target"
-#define arping_full_usage \
- "Send ARP requests/replies\n" \
- "\nOptions:" \
- "\n -f Quit on first ARP reply" \
- "\n -q Quiet" \
- "\n -b Keep broadcasting, don't go unicast" \
- "\n -D Duplicated address detection mode" \
- "\n -U Unsolicited ARP mode, update your neighbors" \
- "\n -A ARP answer mode, update your neighbors" \
- "\n -c N Stop after sending N ARP requests" \
- "\n -w timeout Time to wait for ARP reply, in seconds" \
- "\n -I dev Interface to use (default eth0)" \
- "\n -s sender Sender IP address" \
- "\n target Target IP address" \
-
-#define ash_trivial_usage \
- "[FILE]...\n" \
- "or: ash -c command [args]..."
-#define ash_full_usage \
- "The ash shell"
-
-#define awk_trivial_usage \
- "[OPTION]... [program-text] [FILE...]"
-#define awk_full_usage \
- "Options:" \
- "\n -v var=val Set variable" \
- "\n -F sep Use sep as field separator" \
- "\n -f file Read program from file" \
-
-#define basename_trivial_usage \
- "FILE [SUFFIX]"
-#define basename_full_usage \
- "Strip directory path and suffixes from FILE.\n" \
- "If specified, also remove any trailing SUFFIX."
-#define basename_example_usage \
- "$ basename /usr/local/bin/foo\n" \
- "foo\n" \
- "$ basename /usr/local/bin/\n" \
- "bin\n" \
- "$ basename /foo/bar.txt .txt\n" \
- "bar"
-
-#define brctl_trivial_usage \
- "COMMAND [BRIDGE [INTERFACE]]"
-#define brctl_full_usage \
- "Manage ethernet bridges.\n" \
- "\nCommands:" \
- "\n addbr BRIDGE Create BRIDGE" \
- "\n delbr BRIDGE Delete BRIDGE" \
- "\n addif BRIDGE IFACE Add IFACE to BRIDGE" \
- "\n delif BRIDGE IFACE Delete IFACE from BRIDGE" \
- USE_FEATURE_BRCTL_FANCY( \
- "\n setageing BRIDGE TIME Set ageing time" \
- "\n setfd BRIDGE TIME Set bridge forward delay" \
- "\n sethello BRIDGE TIME Set hello time" \
- "\n setmaxage BRIDGE TIME Set max message age" \
- "\n setpathcost BRIDGE COST Set path cost" \
- "\n setportprio BRIDGE PRIO Set port priority" \
- "\n setbridgeprio BRIDGE PRIO Set bridge priority" \
- "\n stp BRIDGE [1|0] STP on/off" \
- )
-#define bunzip2_trivial_usage \
- "[OPTION]... [FILE]"
-#define bunzip2_full_usage \
- "Uncompress FILE (or standard input if FILE is '-' or omitted)\n" \
- "\nOptions:" \
- "\n -c Write to standard output" \
- "\n -f Force" \
-
-#define bzip2_trivial_usage \
- "[OPTION]... [FILE]..."
-#define bzip2_full_usage \
- "Compress FILE(s) with bzip2 algorithm.\n" \
- "When FILE is '-' or unspecified, reads standard input. Implies -c.\n" \
- "\nOptions:" \
- "\n -c Write to standard output" \
- "\n -d Decompress" \
- "\n -f Force" \
- "\n -1..-9 Compression level" \
-
-#define busybox_notes_usage \
- "Hello world!\n"
-
-#define bzcat_trivial_usage \
- "FILE"
-#define bzcat_full_usage \
- "Uncompress to stdout"
-
-#define unlzma_trivial_usage \
- "[OPTION]... [FILE]"
-#define unlzma_full_usage \
- "Uncompress FILE (or standard input if FILE is '-' or omitted)\n" \
- "\nOptions:" \
- "\n -c Write to standard output" \
- "\n -f Force" \
-
-#define lzmacat_trivial_usage \
- "FILE"
-#define lzmacat_full_usage \
- "Uncompress to stdout"
-
-#define cal_trivial_usage \
- "[-jy] [[month] year]"
-#define cal_full_usage \
- "Display a calendar\n" \
- "\nOptions:" \
- "\n -j Use julian dates" \
- "\n -y Display the entire year" \
-
-#define cat_trivial_usage \
- "[-u] [FILE]..."
-#define cat_full_usage \
- "Concatenate FILE(s) and print them to stdout\n" \
- "\nOptions:" \
- "\n -u Use unbuffered i/o (ignored)" \
-
-#define cat_example_usage \
- "$ cat /proc/uptime\n" \
- "110716.72 17.67"
-
-#define catv_trivial_usage \
- "[-etv] [FILE]..."
-#define catv_full_usage \
- "Display nonprinting characters as ^x or M-x\n" \
- "\nOptions:" \
- "\n -e End each line with $" \
- "\n -t Show tabs as ^I" \
- "\n -v Don't use ^x or M-x escapes" \
-
-#define chat_trivial_usage \
- "EXPECT [SEND [EXPECT [SEND...]]]"
-#define chat_full_usage \
- "Useful for interacting with a modem connected to stdin/stdout.\n" \
- "A script consists of one or more \"expect-send\" pairs of strings,\n" \
- "each pair is a pair of arguments. Example:\n" \
- "chat '' ATZ OK ATD123456 CONNECT '' ogin: pppuser word: ppppass '~'" \
-
-#define chattr_trivial_usage \
- "[-R] [-+=AacDdijsStTu] [-v version] files..."
-#define chattr_full_usage \
- "Change file attributes on an ext2 fs\n" \
- "\nModifiers:" \
- "\n - Remove attributes" \
- "\n + Add attributes" \
- "\n = Set attributes" \
- "\nAttributes:" \
- "\n A Don't track atime" \
- "\n a Append mode only" \
- "\n c Enable compress" \
- "\n D Write dir contents synchronously" \
- "\n d Do not backup with dump" \
- "\n i Cannot be modified (immutable)" \
- "\n j Write all data to journal first" \
- "\n s Zero disk storage when deleted" \
- "\n S Write file contents synchronously" \
- "\n t Disable tail-merging of partial blocks with other files" \
- "\n u Allow file to be undeleted" \
- "\nOptions:" \
- "\n -R Recursively list subdirectories" \
- "\n -v Set the file's version/generation number" \
-
-#define chcon_trivial_usage \
- "[OPTIONS] CONTEXT FILE..." \
- "\n chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..." \
- USE_FEATURE_CHCON_LONG_OPTIONS( \
- "\n chcon [OPTIONS] --reference=RFILE FILE..." \
- )
-#define chcon_full_usage \
- "Change the security context of each FILE to CONTEXT\n" \
- USE_FEATURE_CHCON_LONG_OPTIONS( \
- "\n -v,--verbose Verbose" \
- "\n -c,--changes Report changes made" \
- "\n -h,--no-dereference Affect symlinks instead of their targets" \
- "\n -f,--silent,--quiet Suppress most error messages" \
- "\n --reference=RFILE Use RFILE's group instead of using a CONTEXT value" \
- "\n -u,--user=USER Set user/role/type/range in the target" \
- "\n -r,--role=ROLE security context" \
- "\n -t,--type=TYPE" \
- "\n -l,--range=RANGE" \
- "\n -R,--recursive Recurse subdirectories" \
- ) \
- SKIP_FEATURE_CHCON_LONG_OPTIONS( \
- "\n -v Verbose" \
- "\n -c Report changes made" \
- "\n -h Affect symlinks instead of their targets" \
- "\n -f Suppress most error messages" \
- "\n -u USER Set user/role/type/range in the target security context" \
- "\n -r ROLE" \
- "\n -t TYPE" \
- "\n -l RNG" \
- "\n -R Recurse subdirectories" \
- )
-
-#define chmod_trivial_usage \
- "[-R"USE_DESKTOP("cvf")"] MODE[,MODE]... FILE..."
-#define chmod_full_usage \
- "Each MODE is one or more of the letters ugoa, one of the\n" \
- "symbols +-= and one or more of the letters rwxst\n" \
- "\nOptions:" \
- "\n -R Recurse directories" \
- USE_DESKTOP( \
- "\n -c List changed files" \
- "\n -v List all files" \
- "\n -f Hide errors" \
- )
-#define chmod_example_usage \
- "$ ls -l /tmp/foo\n" \
- "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \
- "$ chmod u+x /tmp/foo\n" \
- "$ ls -l /tmp/foo\n" \
- "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n" \
- "$ chmod 444 /tmp/foo\n" \
- "$ ls -l /tmp/foo\n" \
- "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
-
-#define chgrp_trivial_usage \
- "[-RhLHP"USE_DESKTOP("cvf")"]... GROUP FILE..."
-#define chgrp_full_usage \
- "Change the group membership of each FILE to GROUP\n" \
- "\nOptions:" \
- "\n -R Recurse directories" \
- "\n -h Affect symlinks instead of symlink targets" \
- "\n -L Traverse all symlinks to directories" \
- "\n -H Traverse symlinks on command line only" \
- "\n -P Do not traverse symlinks (default)" \
- USE_DESKTOP( \
- "\n -c List changed files" \
- "\n -v Verbose" \
- "\n -f Hide errors" \
- )
-#define chgrp_example_usage \
- "$ ls -l /tmp/foo\n" \
- "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
- "$ chgrp root /tmp/foo\n" \
- "$ ls -l /tmp/foo\n" \
- "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n"
-
-#define chown_trivial_usage \
- "[-RhLHP"USE_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..."
-#define chown_full_usage \
- "Change the owner and/or group of each FILE to OWNER and/or GROUP\n" \
- "\nOptions:" \
- "\n -R Recurse directories" \
- "\n -h Affect symlinks instead of symlink targets" \
- "\n -L Traverse all symlinks to directories" \
- "\n -H Traverse symlinks on command line only" \
- "\n -P Do not traverse symlinks (default)" \
- USE_DESKTOP( \
- "\n -c List changed files" \
- "\n -v List all files" \
- "\n -f Hide errors" \
- )
-#define chown_example_usage \
- "$ ls -l /tmp/foo\n" \
- "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
- "$ chown root /tmp/foo\n" \
- "$ ls -l /tmp/foo\n" \
- "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n" \
- "$ chown root.root /tmp/foo\n" \
- "ls -l /tmp/foo\n" \
- "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
-
-#define chpst_trivial_usage \
- "[-vP012] [-u user[:group]] [-U user[:group]] [-e dir] " \
- "[-/ dir] [-n nice] [-m bytes] [-d bytes] [-o files] " \
- "[-p processes] [-f bytes] [-c bytes] prog args"
-#define chpst_full_usage \
- "Change the process state and run specified program\n" \
- "\nOptions:" \
- "\n -u USER[:GRP] Set uid and gid" \
- "\n -U USER[:GRP] Set $UID and $GID in environment" \
- "\n -e DIR Set environment variables as specified by files" \
- "\n in DIR: file=1st_line_of_file" \
- "\n -/ DIR Chroot to DIR" \
- "\n -n INC Add INC to nice value" \
- "\n -m BYTES Limit data segment, stack segment, locked physical pages," \
- "\n and total of all segment per process to BYTES each" \
- "\n -d BYTES Limit data segment" \
- "\n -o N Limit the number of open file descriptors per process to N" \
- "\n -p N Limit number of processes per uid to N" \
- "\n -f BYTES Limit output file size to BYTES" \
- "\n -c BYTES Limit core file size to BYTES" \
- "\n -v Verbose" \
- "\n -P Run prog in a new process group" \
- "\n -0 Close standard input" \
- "\n -1 Close standard output" \
- "\n -2 Close standard error" \
-
-#define setuidgid_trivial_usage \
- "account prog args"
-#define setuidgid_full_usage \
- "Set uid and gid to account's uid and gid, removing all supplementary\n" \
- "groups, then run prog"
-#define envuidgid_trivial_usage \
- "account prog args"
-#define envuidgid_full_usage \
- "Set $UID to account's uid and $GID to account's gid, then run prog"
-#define envdir_trivial_usage \
- "dir prog args"
-#define envdir_full_usage \
- "Set various environment variables as specified by files\n" \
- "in the directory dir, then run prog"
-#define softlimit_trivial_usage \
- "[-a allbytes] [-c corebytes] [-d databytes] [-f filebytes] " \
- "[-l lockbytes] [-m membytes] [-o openfiles] [-p processes] " \
- "[-r residentbytes] [-s stackbytes] [-t cpusecs] prog args"
-#define softlimit_full_usage \
- "Set soft resource limits, then run prog\n" \
- "\nOptions:" \
- "\n -m n Same as -d n -s n -l n -a n" \
- "\n -d n Limit the data segment per process to n bytes" \
- "\n -s n Limit the stack segment per process to n bytes" \
- "\n -l n Limit the locked physical pages per process to n bytes" \
- "\n -a n Limit the total of all segments per process to n bytes" \
- "\n -o n Limit the number of open file descriptors per process to n" \
- "\n -p n Limit the number of processes per uid to n" \
- "\nOptions controlling file sizes:" \
- "\n -f n Limit output file sizes to n bytes" \
- "\n -c n Limit core file sizes to n bytes" \
- "\nEfficiency opts:" \
- "\n -r n Limit the resident set size to n bytes. This limit is not" \
- "\n enforced unless physical memory is full" \
- "\n -t n Limit the CPU time to n seconds. This limit is not enforced" \
- "\n except that the process receives a SIGXCPU signal after n seconds" \
- "\n" \
- "\nSome options may have no effect on some operating systems" \
- "\nn may be =, indicating that soft limit should be set equal to hard limit" \
-
-#define chroot_trivial_usage \
- "NEWROOT [COMMAND...]"
-#define chroot_full_usage \
- "Run COMMAND with root directory set to NEWROOT"
-#define chroot_example_usage \
- "$ ls -l /bin/ls\n" \
- "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n" \
- "# mount /dev/hdc1 /mnt -t minix\n" \
- "# chroot /mnt\n" \
- "# ls -l /bin/ls\n" \
- "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n"
-
-#define chvt_trivial_usage \
- "N"
-#define chvt_full_usage \
- "Change the foreground virtual terminal to /dev/ttyN"
-
-#define cksum_trivial_usage \
- "FILES..."
-#define cksum_full_usage \
- "Calculate the CRC32 checksums of FILES"
-
-#define clear_trivial_usage \
- ""
-#define clear_full_usage \
- "Clear screen"
-
-#define cmp_trivial_usage \
- "[-l] [-s] FILE1 [FILE2" USE_DESKTOP(" [SKIP1 [SKIP2]") "]]"
-#define cmp_full_usage \
- "Compares FILE1 vs stdin if FILE2 is not specified\n" \
- "\nOptions:" \
- "\n -l Write the byte numbers (decimal) and values (octal)" \
- "\n for all differing bytes" \
- "\n -s Quiet" \
-
-#define comm_trivial_usage \
- "[-123] FILE1 FILE2"
-#define comm_full_usage \
- "Compare FILE1 to FILE2, or to stdin if - is specified\n" \
- "\nOptions:" \
- "\n -1 Suppress lines unique to FILE1" \
- "\n -2 Suppress lines unique to FILE2" \
- "\n -3 Suppress lines common to both files" \
-
-#define bbconfig_trivial_usage \
- ""
-#define bbconfig_full_usage \
- "Print the config file which built busybox"
-
-#define bbsh_trivial_usage \
- "[FILE]...\n" \
- "or: bbsh -c command [args]..."
-#define bbsh_full_usage \
- "The bbsh shell (command interpreter)"
-
-#define chrt_trivial_usage \
- "[OPTION]... [prio] [pid | command [arg]...]"
-#define chrt_full_usage \
- "Manipulate real-time attributes of a process\n" \
- "\nOptions:" \
- "\n -p Operate on pid" \
- "\n -r Set scheduling policy to SCHED_RR" \
- "\n -f Set scheduling policy to SCHED_FIFO" \
- "\n -o Set scheduling policy to SCHED_OTHER" \
- "\n -m Show min and max priorities" \
-
-#define chrt_example_usage \
- "$ chrt -r 4 sleep 900; x=$!\n" \
- "$ chrt -f -p 3 $x\n" \
- "You need CAP_SYS_NICE privileges to set scheduling attributes of a process"
-
-#define cp_trivial_usage \
- "[OPTION]... SOURCE DEST"
-#define cp_full_usage \
- "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n" \
- "\nOptions:" \
- "\n -a Same as -dpR" \
- USE_SELINUX( \
- "\n -c Preserve security context" \
- ) \
- "\n -d,-P Preserve links" \
- "\n -H,-L Dereference all symlinks (default)" \
- "\n -p Preserve file attributes if possible" \
- "\n -f Force overwrite" \
- "\n -i Prompt before overwrite" \
- "\n -R,-r Recurse directories" \
- "\n -l,-s Create (sym)links" \
-
-#define cpio_trivial_usage \
- "-[dimtuv][F cpiofile]"
-#define cpio_full_usage \
- "Extract or list files from a cpio archive\n" \
- "Main operation mode:" \
- "\n d Make leading directories" \
- "\n i Extract" \
- "\n m Preserve mtime" \
- "\n t List" \
- "\n v Verbose" \
- "\n u Unconditional overwrite" \
- "\n F Input from file" \
-
-#define crond_trivial_usage \
- "-fbS -l N " USE_DEBUG_CROND_OPTION("-d N ") "-L LOGFILE -c DIR"
-#define crond_full_usage \
- " -f Foreground" \
- "\n -b Background (default)" \
- "\n -S Log to syslog (default)" \
- "\n -l Set log level. 0 is the most verbose, default 8" \
- USE_DEBUG_CROND_OPTION( \
- "\n -d Set log level, log to stderr" \
- ) \
- "\n -L Log to file" \
- "\n -c Working dir" \
-
-#define crontab_trivial_usage \
- "[-c DIR] [-u USER] [-ler]|[FILE]"
-#define crontab_full_usage \
- " -c Crontab directory" \
- "\n -u User" \
- "\n -l List crontab" \
- "\n -e Edit crontab" \
- "\n -r Delete crontab" \
- "\n FILE Replace crontab by FILE ('-': stdin)" \
-
-#define cryptpw_trivial_usage \
- "[-a des|md5] [string]"
-#define cryptpw_full_usage \
- "Output crypted string.\n" \
- "If string isn't supplied on cmdline, read it from stdin.\n" \
- "\nOptions:" \
- "\n -a Algorithm to use (default: md5)" \
-
-#define cut_trivial_usage \
- "[OPTION]... [FILE]..."
-#define cut_full_usage \
- "Print selected fields from each input FILE to standard output\n" \
- "\nOptions:" \
- "\n -b LIST Output only bytes from LIST" \
- "\n -c LIST Output only characters from LIST" \
- "\n -d CHAR Use CHAR instead of tab as the field delimiter" \
- "\n -s Output only the lines containing delimiter" \
- "\n -f N Print only these fields" \
- "\n -n Ignored" \
-
-#define cut_example_usage \
- "$ echo \"Hello world\" | cut -f 1 -d ' '\n" \
- "Hello\n" \
- "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \
- "world\n"
-
-#define date_trivial_usage \
- "[OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT]"
-#define date_full_usage \
- "Display current time in the given FORMAT, or set system date\n" \
- "\nOptions:" \
- "\n -R Output RFC-822 compliant date string" \
- "\n -d STRING Display time described by STRING, not 'now'" \
- USE_FEATURE_DATE_ISOFMT( \
- "\n -I[TIMESPEC] Output an ISO-8601 compliant date/time string" \
- "\n TIMESPEC='date' (or missing) for date only," \
- "\n 'hours', 'minutes', or 'seconds' for date and" \
- "\n time to the indicated precision" \
- "\n -D hint Use 'hint' as date format, via strptime()" \
- ) \
- "\n -s STRING Set time described by STRING" \
- "\n -r FILE Display the last modification time of FILE" \
- "\n -u Print or sets Coordinated Universal Time" \
-
-#define date_example_usage \
- "$ date\n" \
- "Wed Apr 12 18:52:41 MDT 2000\n"
-
-#define dc_trivial_usage \
- "expression..."
-#define dc_full_usage \
- "This is a Tiny RPN calculator that understands the following operations:\n" \
- "+, add, -, sub, *, mul, /, div, %, mod, **, exp, and, or, not, eor.\n" \
- "For example: 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16.\n" \
- "\nOptions:" \
- "\np - Print the value on the top of the stack, without altering the stack" \
- "\nf - Print the entire contents of the stack without altering anything" \
- "\no - Pop the value off the top of the stack and use it to set the output radix" \
- "\n Only 10 and 16 are supported" \
-
-#define dc_example_usage \
- "$ dc 2 2 + p\n" \
- "4\n" \
- "$ dc 8 8 \\* 2 2 + / p\n" \
- "16\n" \
- "$ dc 0 1 and p\n" \
- "0\n" \
- "$ dc 0 1 or p\n" \
- "1\n" \
- "$ echo 72 9 div 8 mul p | dc\n" \
- "64\n"
-
-#define dd_trivial_usage \
- "[if=FILE] [of=FILE] " USE_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \
- " [seek=N]" USE_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync]")
-#define dd_full_usage \
- "Copy a file with converting and formatting\n" \
- "\nOptions:" \
- "\n if=FILE Read from FILE instead of stdin" \
- "\n of=FILE Write to FILE instead of stdout" \
- "\n bs=N Read and write N bytes at a time" \
- USE_FEATURE_DD_IBS_OBS( \
- "\n ibs=N Read N bytes at a time") \
- USE_FEATURE_DD_IBS_OBS( \
- "\n obs=N Write N bytes at a time") \
- "\n count=N Copy only N input blocks" \
- "\n skip=N Skip N input blocks" \
- "\n seek=N Skip N output blocks" \
- USE_FEATURE_DD_IBS_OBS( \
- "\n conv=notrunc Don't truncate output file" \
- "\n conv=noerror Continue after read errors" \
- "\n conv=sync Pad blocks with zeros") \
- "\n" \
- "\nNumbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024)," \
- "\nMD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)" \
-
-#define dd_example_usage \
- "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \
- "4+0 records in\n" \
- "4+0 records out\n"
-
-#define deallocvt_trivial_usage \
- "[N]"
-#define deallocvt_full_usage \
- "Deallocate unused virtual terminal /dev/ttyN"
-
-#define delgroup_trivial_usage \
- USE_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
-#define delgroup_full_usage \
- "Delete group GROUP from the system" \
- USE_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
-
-#define deluser_trivial_usage \
- "USER"
-#define deluser_full_usage \
- "Delete user USER from the system"
-
-#define devfsd_trivial_usage \
- "mntpnt [-v]" USE_DEVFSD_FG_NP("[-fg][-np]")
-#define devfsd_full_usage \
- "Manage devfs permissions and old device name symlinks\n" \
- "\nOptions:" \
- "\n mntpnt The mount point where devfs is mounted" \
- "\n -v Print the protocol version numbers for devfsd" \
- "\n and the kernel-side protocol version and exit" \
- USE_DEVFSD_FG_NP( \
- "\n -fg Run in foreground" \
- "\n -np Exit after parsing the configuration file" \
- "\n and processing synthetic REGISTER events," \
- "\n do not poll for events" \
- )
-
-/* -k is accepted but ignored for !HUMAN_READABLE,
- * but we won't mention this (unimportant) */
-#if ENABLE_FEATURE_HUMAN_READABLE || ENABLE_FEATURE_DF_INODE
-#define DF_HAS_OPTIONS(x) x
-#else
-#define DF_HAS_OPTIONS(x)
-#endif
-#define df_trivial_usage \
- DF_HAS_OPTIONS("[-") \
- USE_FEATURE_HUMAN_READABLE("hmk") USE_FEATURE_DF_INODE("i") \
- DF_HAS_OPTIONS("] ") "[FILESYSTEM...]"
-#define df_full_usage \
- "Print filesystem usage statistics\n" \
- DF_HAS_OPTIONS("\nOptions:") \
- USE_FEATURE_HUMAN_READABLE( \
- "\n -h Human readable (e.g. 1K 243M 2G)" \
- "\n -m 1024*1024 blocks" \
- "\n -k 1024 blocks" \
- ) \
- USE_FEATURE_DF_INODE( \
- "\n -i Inodes" \
- )
-#define df_example_usage \
- "$ df\n" \
- "Filesystem 1k-blocks Used Available Use% Mounted on\n" \
- "/dev/sda3 8690864 8553540 137324 98% /\n" \
- "/dev/sda1 64216 36364 27852 57% /boot\n" \
- "$ df /dev/sda3\n" \
- "Filesystem 1k-blocks Used Available Use% Mounted on\n" \
- "/dev/sda3 8690864 8553540 137324 98% /\n"
-
-#define dhcprelay_trivial_usage \
- "[client_device_list] [server_device]"
-#define dhcprelay_full_usage \
- "Relay dhcp requests from client devices to server device"
-
-#define dhcprelay_trivial_usage \
- "[client_device_list] [server_device]"
-#define dhcprelay_full_usage \
- "Relay dhcp requests from client devices to server device"
-
-#define diff_trivial_usage \
- "[-abdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2"
-#define diff_full_usage \
- "Compare files line by line and output the differences between them.\n" \
- "This implementation supports unified diffs only.\n" \
- "\nOptions:" \
- "\n -a Treat all files as text" \
- "\n -b Ignore changes in the amount of whitespace" \
- "\n -d Try hard to find a smaller set of changes" \
- "\n -i Ignore case differences" \
- "\n -L Use LABEL instead of the filename in the unified header" \
- "\n -N Treat absent files as empty" \
- "\n -q Output only whether files differ" \
- "\n -r Recursively compare subdirectories" \
- "\n -S Start with FILE when comparing directories" \
- "\n -T Make tabs line up by prefixing a tab when necessary" \
- "\n -s Report when two files are the same" \
- "\n -t Expand tabs to spaces in output" \
- "\n -U Output LINES lines of context" \
- "\n -w Ignore all whitespace" \
-
-#define dirname_trivial_usage \
- "FILENAME"
-#define dirname_full_usage \
- "Strip non-directory suffix from FILENAME"
-#define dirname_example_usage \
- "$ dirname /tmp/foo\n" \
- "/tmp\n" \
- "$ dirname /tmp/foo/\n" \
- "/tmp\n"
-
-#define dmesg_trivial_usage \
- "[-c] [-n LEVEL] [-s SIZE]"
-#define dmesg_full_usage \
- "Print or control the kernel ring buffer\n" \
- "\nOptions:" \
- "\n -c Clear ring buffer after printing" \
- "\n -n LEVEL Set console logging level" \
- "\n -s SIZE Buffer size" \
-
-#define dnsd_trivial_usage \
- "[-c config] [-t seconds] [-p port] [-i iface-ip] [-d]"
-#define dnsd_full_usage \
- "Small static DNS server daemon\n" \
- "\nOptions:" \
- "\n -c Config filename" \
- "\n -t TTL in seconds" \
- "\n -p Listening port" \
- "\n -i Listening ip (default all)" \
- "\n -d Daemonize" \
-
-#define dos2unix_trivial_usage \
- "[option] [FILE]"
-#define dos2unix_full_usage \
- "Convert FILE from dos to unix format.\n" \
- "When no file is given, use stdin/stdout.\n" \
- "\nOptions:" \
- "\n -u dos2unix" \
- "\n -d unix2dos" \
-
-#define dpkg_trivial_usage \
- "[-ilCPru] [-F option] package_name"
-#define dpkg_full_usage \
- "Install, remove and manage Debian packages\n" \
- "\nOptions:" \
- "\n -i Install the package" \
- "\n -l List of installed packages" \
- "\n -C Configure an unpackaged package" \
- "\n -F depends Ignore dependency problems" \
- "\n -P Purge all files of a package" \
- "\n -r Remove all but the configuration files for a package" \
- "\n -u Unpack a package, but don't configure it" \
-
-#define dpkg_deb_trivial_usage \
- "[-cefxX] FILE [argument]"
-#define dpkg_deb_full_usage \
- "Perform actions on Debian packages (.debs)\n" \
- "\nOptions:" \
- "\n -c List contents of filesystem tree" \
- "\n -e Extract control files to [argument] directory" \
- "\n -f Display control field name starting with [argument]" \
- "\n -x Extract packages filesystem tree to directory" \
- "\n -X Verbose extract" \
-
-#define dpkg_deb_example_usage \
- "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
-
-#define du_trivial_usage \
- "[-aHLdclsx" USE_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..."
-#define du_full_usage \
- "Summarize disk space used for each FILE and/or directory.\n" \
- "Disk space is printed in units of " \
- USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \
- SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \
- " bytes.\n" \
- "\nOptions:" \
- "\n -a Show file sizes too" \
- "\n -H Follow symlinks on command line" \
- "\n -L Follow all symlinks" \
- "\n -d N Limit output to directories (and files with -a) of depth < N" \
- "\n -c Show grand total" \
- "\n -l Count sizes many times if hard linked" \
- "\n -s Display only a total for each argument" \
- "\n -x Skip directories on different filesystems" \
- USE_FEATURE_HUMAN_READABLE( \
- "\n -h Sizes in human readable format (e.g., 1K 243M 2G )" \
- "\n -m Sizes in megabytes" \
- ) \
- "\n -k Sizes in kilobytes" \
- USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)") \
-
-#define du_example_usage \
- "$ du\n" \
- "16 ./CVS\n" \
- "12 ./kernel-patches/CVS\n" \
- "80 ./kernel-patches\n" \
- "12 ./tests/CVS\n" \
- "36 ./tests\n" \
- "12 ./scripts/CVS\n" \
- "16 ./scripts\n" \
- "12 ./docs/CVS\n" \
- "104 ./docs\n" \
- "2417 .\n"
-
-#define dumpkmap_trivial_usage \
- "> keymap"
-#define dumpkmap_full_usage \
- "Print out a binary keyboard translation table to standard output"
-#define dumpkmap_example_usage \
- "$ dumpkmap > keymap\n"
-
-#define dumpleases_trivial_usage \
- "[-r|-a] [-f LEASEFILE]"
-#define dumpleases_full_usage \
- "Display DHCP leases granted by udhcpd\n" \
- "\nOptions:" \
- USE_GETOPT_LONG( \
- "\n -f,--file=FILE Leases file to load" \
- "\n -r,--remaining Interpret lease times as time remaining" \
- "\n -a,--absolute Interpret lease times as expire time" \
- ) \
- SKIP_GETOPT_LONG( \
- "\n -f FILE Leases file to load" \
- "\n -r Interpret lease times as time remaining" \
- "\n -a Interpret lease times as expire time" \
- )
-
-#define e2fsck_trivial_usage \
- "[-panyrcdfvstDFSV] [-b superblock] [-B blocksize] " \
- "[-I inode_buffer_blocks] [-P process_inode_size] " \
- "[-l|-L bad_blocks_file] [-C fd] [-j external_journal] " \
- "[-E extended-options] device"
-#define e2fsck_full_usage \
- "Check ext2/ext3 file system\n" \
- "\nOptions:" \
- "\n -p Automatic repair (no questions)" \
- "\n -n Make no changes to the filesystem" \
- "\n -y Assume 'yes' to all questions" \
- "\n -c Check for bad blocks and add them to the badblock list" \
- "\n -f Force checking even if filesystem is marked clean" \
- "\n -v Verbose" \
- "\n -b superblock Use alternative superblock" \
- "\n -B blocksize Force blocksize when looking for superblock" \
- "\n -j journal Set location of the external journal" \
- "\n -l file Add to badblocks list" \
- "\n -L file Set badblocks list" \
-
-#define echo_trivial_usage \
- USE_FEATURE_FANCY_ECHO("[-neE] ") "[ARG...]"
-#define echo_full_usage \
- "Print the specified ARGs to stdout" \
- USE_FEATURE_FANCY_ECHO( "\n" \
- "\nOptions:" \
- "\n -n Suppress trailing newline" \
- "\n -e Interpret backslash-escaped characters (i.e., \\t=tab)" \
- "\n -E Disable interpretation of backslash-escaped characters" \
- )
-#define echo_example_usage \
- "$ echo \"Erik is cool\"\n" \
- "Erik is cool\n" \
- USE_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \
- "Erik\n" \
- "is\n" \
- "cool\n" \
- "$ echo \"Erik\\nis\\ncool\"\n" \
- "Erik\\nis\\ncool\n")
-
-#define eject_trivial_usage \
- "[-t] [-T] [DEVICE]"
-#define eject_full_usage \
- "Eject specified DEVICE (or default /dev/cdrom)\n" \
- "\nOptions:" \
- USE_FEATURE_EJECT_SCSI( \
- "\n -s SCSI device" \
- ) \
- "\n -t Close tray" \
- "\n -T Open/close tray (toggle)" \
-
-#define ed_trivial_usage ""
-#define ed_full_usage ""
-
-#define env_trivial_usage \
- "[-iu] [-] [name=value]... [command]"
-#define env_full_usage \
- "Print the current environment or run a program after setting\n" \
- "up the specified environment\n" \
- "\nOptions:" \
- "\n -, -i Start with an empty environment" \
- "\n -u Remove variable from the environment" \
-
-#define ether_wake_trivial_usage \
- "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC"
-#define ether_wake_full_usage \
- "Send a magic packet to wake up sleeping machines.\n" \
- "MAC must be a station address (00:11:22:33:44:55) or\n" \
- "a hostname with a known 'ethers' entry.\n" \
- "\nOptions:" \
- "\n -b Send wake-up packet to the broadcast address" \
- "\n -i iface Interface to use (default eth0)" \
- "\n -p pass Append four or six byte password PW to the packet" \
-
-#define expand_trivial_usage \
- "[-i] [-t NUM] [FILE|-]"
-#define expand_full_usage \
- "Convert tabs to spaces, writing to standard output.\n" \
- "\nOptions:" \
- USE_FEATURE_EXPAND_LONG_OPTIONS( \
- "\n -i,--initial Do not convert tabs after non blanks" \
- "\n -t,--tabs=N Tabstops every N chars" \
- ) \
- SKIP_FEATURE_EXPAND_LONG_OPTIONS( \
- "\n -i Do not convert tabs after non blanks" \
- "\n -t Tabstops every N chars" \
- )
-
-#define expr_trivial_usage \
- "EXPRESSION"
-#define expr_full_usage \
- "Print the value of EXPRESSION to standard output.\n" \
- "\n" \
- "EXPRESSION may be:\n" \
- " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \
- " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \
- " ARG1 < ARG2 1 if ARG1 is less than ARG2, else 0. Similarly:\n" \
- " ARG1 <= ARG2\n" \
- " ARG1 = ARG2\n" \
- " ARG1 != ARG2\n" \
- " ARG1 >= ARG2\n" \
- " ARG1 > ARG2\n" \
- " ARG1 + ARG2 Sum of ARG1 and ARG2. Similarly:\n" \
- " ARG1 - ARG2\n" \
- " ARG1 * ARG2\n" \
- " ARG1 / ARG2\n" \
- " ARG1 % ARG2\n" \
- " STRING : REGEXP Anchored pattern match of REGEXP in STRING\n" \
- " match STRING REGEXP Same as STRING : REGEXP\n" \
- " substr STRING POS LENGTH Substring of STRING, POS counted from 1\n" \
- " index STRING CHARS Index in STRING where any CHARS is found, or 0\n" \
- " length STRING Length of STRING\n" \
- " quote TOKEN Interpret TOKEN as a string, even if\n" \
- " it is a keyword like 'match' or an\n" \
- " operator like '/'\n" \
- " (EXPRESSION) Value of EXPRESSION\n" \
- "\n" \
- "Beware that many operators need to be escaped or quoted for shells.\n" \
- "Comparisons are arithmetic if both ARGs are numbers, else\n" \
- "lexicographical. Pattern matches return the string matched between\n" \
- "\\( and \\) or null; if \\( and \\) are not used, they return the number\n" \
- "of characters matched or 0."
-
-#define fakeidentd_trivial_usage \
- "[-fiw] [-b ADDR] [STRING]"
-#define fakeidentd_full_usage \
- "Provide fake ident (auth) service\n" \
- "\nOptions:" \
- "\n -f Run in foreground" \
- "\n -i Inetd mode" \
- "\n -w Inetd 'wait' mode" \
- "\n -b ADDR Bind to specified address" \
- "\n STRING Ident answer string (default is 'nobody')" \
-
-#define false_trivial_usage \
- ""
-#define false_full_usage \
- "Return an exit code of FALSE (1)"
-
-#define false_example_usage \
- "$ false\n" \
- "$ echo $?\n" \
- "1\n"
-
-#define fbset_trivial_usage \
- "[options] [mode]"
-#define fbset_full_usage \
- "Show and modify frame buffer settings"
-
-#define fbset_example_usage \
- "$ fbset\n" \
- "mode \"1024x768-76\"\n" \
- " # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz\n" \
- " geometry 1024 768 1024 768 16\n" \
- " timings 12714 128 32 16 4 128 4\n" \
- " accel false\n" \
- " rgba 5/11,6/5,5/0,0/0\n" \
- "endmode\n"
-
-#define fdflush_trivial_usage \
- "DEVICE"
-#define fdflush_full_usage \
- "Force floppy disk drive to detect disk change"
-
-#define fdformat_trivial_usage \
- "[-n] DEVICE"
-#define fdformat_full_usage \
- "Format floppy disk\n" \
- "\nOptions:" \
- "\n -n Don't verify after format" \
-
-/* Looks like someone forgot to add this to config system */
-#ifndef ENABLE_FEATURE_FDISK_BLKSIZE
-# define ENABLE_FEATURE_FDISK_BLKSIZE 0
-# define USE_FEATURE_FDISK_BLKSIZE(a)
-#endif
-
-#define fdisk_trivial_usage \
- "[-ul" USE_FEATURE_FDISK_BLKSIZE("s") "] " \
- "[-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK"
-#define fdisk_full_usage \
- "Change partition table\n" \
- "\nOptions:" \
- "\n -u Start and End are in sectors (instead of cylinders)" \
- "\n -l Show partition table for each DISK, then exit" \
- USE_FEATURE_FDISK_BLKSIZE( \
- "\n -s Show partition sizes in kb for each DISK, then exit" \
- ) \
- "\n -b 2048 (for certain MO disks) use 2048-byte sectors" \
- "\n -C CYLINDERS Set number of cylinders/heads/sectors" \
- "\n -H HEADS\n" \
- "\n -S SECTORS" \
-
-#define fetchmail_trivial_usage \
- "[-w timeout] [-U user] -P password [-X] [-t] [-z] server[:port] maildir [prog]"
-#define fetchmail_full_usage \
- "Fetch content of remote mailbox to local Maildir.\n" \
- "\nOptions:" \
- "\n -w timeout Set timeout on network operations" \
- "\n -U username Authenticate with specified username/password" \
- "\n -P password" \
- "\n -X Use openssl connection helper for secured servers" \
- "\n -t Get only headers" \
- "\n -z Delete messages on server" \
- "\n prog Run prog <message_file> on message delivery" \
-
-#define findfs_trivial_usage \
- "LABEL=label or UUID=uuid"
-#define findfs_full_usage \
- "Find a filesystem device based on a label or UUID."
-#define findfs_example_usage \
- "$ findfs LABEL=MyDevice"
-
-#define find_trivial_usage \
- "[PATH...] [EXPRESSION]"
-#define find_full_usage \
- "Search for files. The default PATH is the current directory,\n" \
- "default EXPRESSION is '-print'\n" \
- "\nEXPRESSION may consist of:" \
- "\n -follow Dereference symlinks" \
- USE_FEATURE_FIND_XDEV( \
- "\n -xdev Don't descend directories on other filesystems") \
- USE_FEATURE_FIND_MAXDEPTH( \
- "\n -maxdepth N Descend at most N levels. -maxdepth 0 applies" \
- "\n tests/actions to command line arguments only") \
- "\n -name PATTERN File name (w/o directory name) matches PATTERN" \
- "\n -iname PATTERN Case insensitive -name" \
- USE_FEATURE_FIND_PATH( \
- "\n -path PATTERN Path matches PATTERN") \
- USE_FEATURE_FIND_REGEX( \
- "\n -regex PATTERN Path matches regex PATTERN") \
- USE_FEATURE_FIND_TYPE( \
- "\n -type X File type is X (X is one of: f,d,l,b,c,...)") \
- USE_FEATURE_FIND_PERM( \
- "\n -perm NNN Permissions match any of (+NNN), all of (-NNN)," \
- "\n or exactly (NNN)") \
- USE_FEATURE_FIND_MTIME( \
- "\n -mtime DAYS Modified time is greater than (+N), less than (-N)," \
- "\n or exactly (N) days") \
- USE_FEATURE_FIND_MMIN( \
- "\n -mmin MINS Modified time is greater than (+N), less than (-N)," \
- "\n or exactly (N) minutes") \
- USE_FEATURE_FIND_NEWER( \
- "\n -newer FILE Modified time is more recent than FILE's") \
- USE_FEATURE_FIND_INUM( \
- "\n -inum N File has inode number N") \
- USE_FEATURE_FIND_USER( \
- "\n -user NAME File is owned by user NAME (numeric user ID allowed)") \
- USE_FEATURE_FIND_GROUP( \
- "\n -group NAME File belongs to group NAME (numeric group ID allowed)") \
- USE_FEATURE_FIND_DEPTH( \
- "\n -depth Process directory name after traversing it") \
- USE_FEATURE_FIND_SIZE( \
- "\n -size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.))." \
- "\n +/-N: file size is bigger/smaller than N") \
- "\n -print Print (default and assumed)" \
- USE_FEATURE_FIND_PRINT0( \
- "\n -print0 Delimit output with null characters rather than" \
- "\n newlines") \
- USE_FEATURE_FIND_CONTEXT ( \
- "\n -context File has specified security context") \
- USE_FEATURE_FIND_EXEC( \
- "\n -exec CMD ARG ; Execute CMD with all instances of {} replaced by the" \
- "\n matching files") \
- USE_FEATURE_FIND_PRUNE( \
- "\n -prune Stop traversing current subtree") \
- USE_FEATURE_FIND_DELETE( \
- "\n -delete Delete files, turns on -depth option") \
- USE_FEATURE_FIND_PAREN( \
- "\n (EXPR) Group an expression") \
-
-#define find_example_usage \
- "$ find / -name passwd\n" \
- "/etc/passwd\n"
-
-#define fold_trivial_usage \
- "[-bs] [-w WIDTH] [FILE]"
-#define fold_full_usage \
- "Wrap input lines in each FILE (standard input by default), writing to\n" \
- "standard output\n" \
- "\nOptions:" \
- "\n -b Count bytes rather than columns" \
- "\n -s Break at spaces" \
- "\n -w Use WIDTH columns instead of 80" \
-
-#define free_trivial_usage \
- ""
-#define free_full_usage \
- "Display the amount of free and used system memory"
-#define free_example_usage \
- "$ free\n" \
- " total used free shared buffers\n" \
- " Mem: 257628 248724 8904 59644 93124\n" \
- " Swap: 128516 8404 120112\n" \
- "Total: 386144 257128 129016\n" \
-
-#define freeramdisk_trivial_usage \
- "DEVICE"
-#define freeramdisk_full_usage \
- "Free all memory used by the specified ramdisk"
-#define freeramdisk_example_usage \
- "$ freeramdisk /dev/ram2\n"
-
-#define fsck_trivial_usage \
- "[-ANPRTV] [-C fd] [-t fstype] [fs-options] [filesys...]"
-#define fsck_full_usage \
- "Check and repair filesystems\n" \
- "\nOptions:" \
- "\n -A Walk /etc/fstab and check all filesystems" \
- "\n -N Don't execute, just show what would be done" \
- "\n -P With -A, check filesystems in parallel" \
- "\n -R With -A, skip the root filesystem" \
- "\n -T Don't show title on startup" \
- "\n -V Verbose" \
- "\n -C n Write status information to specified filedescriptor" \
- "\n -t type List of filesystem types to check" \
-
-#define fsck_minix_trivial_usage \
- "[-larvsmf] /dev/name"
-#define fsck_minix_full_usage \
- "Perform a consistency check for MINIX filesystems\n" \
- "\nOptions:" \
- "\n -l List all filenames" \
- "\n -r Perform interactive repairs" \
- "\n -a Perform automatic repairs" \
- "\n -v Verbose" \
- "\n -s Output super-block information" \
- "\n -m Activate MINIX-like \"mode not cleared\" warnings" \
- "\n -f Force file system check" \
-
-#define ftpget_trivial_usage \
- "[options] remote-host local-file remote-file"
-#define ftpget_full_usage \
- "Retrieve a remote file via FTP\n" \
- "\nOptions:" \
- USE_GETOPT_LONG( \
- "\n -c,--continue Continue previous transfer" \
- "\n -v,--verbose Verbose" \
- "\n -u,--username Username" \
- "\n -p,--password Password" \
- "\n -P,--port Port number" \
- ) \
- SKIP_GETOPT_LONG( \
- "\n -c Continue previous transfer" \
- "\n -v Verbose" \
- "\n -u Username" \
- "\n -p Password" \
- "\n -P Port number" \
- )
-
-#define ftpput_trivial_usage \
- "[options] remote-host remote-file local-file"
-#define ftpput_full_usage \
- "Store a local file on a remote machine via FTP\n" \
- "\nOptions:" \
- USE_GETOPT_LONG( \
- "\n -v,--verbose Verbose" \
- "\n -u,--username Username" \
- "\n -p,--password Password" \
- "\n -P,--port Port number" \
- ) \
- SKIP_GETOPT_LONG( \
- "\n -v Verbose" \
- "\n -u Username" \
- "\n -p Password" \
- "\n -P Port number" \
- )
-
-#define fuser_trivial_usage \
- "[options] FILE or PORT/PROTO"
-#define fuser_full_usage \
- "Find processes which use FILEs or PORTs\n" \
- "\nOptions:" \
- "\n -m Find processes which use same fs as FILEs" \
- "\n -4 Search only IPv4 space" \
- "\n -6 Search only IPv6 space" \
- "\n -s Silent: just exit with 0 if any processes are found" \
- "\n -k Kill found processes (otherwise display PIDs)" \
- "\n -SIGNAL Signal to send (default: TERM)" \
-
-#define getenforce_trivial_usage
-#define getenforce_full_usage
-
-#define getopt_trivial_usage \
- "[OPTIONS]..."
-#define getopt_full_usage \
- "Parse command options\n" \
- USE_GETOPT_LONG( \
- "\n -a,--alternative Allow long options starting with single -" \
- "\n -l,--longoptions=longopts Long options to be recognized" \
- "\n -n,--name=progname The name under which errors are reported" \
- "\n -o,--options=optstring Short options to be recognized" \
- "\n -q,--quiet Disable error reporting by getopt(3)" \
- "\n -Q,--quiet-output No normal output" \
- "\n -s,--shell=shell Set shell quoting conventions" \
- "\n -T,--test Test for getopt(1) version" \
- "\n -u,--unquoted Don't quote the output" \
- ) \
- SKIP_GETOPT_LONG( \
- "\n -a Allow long options starting with single -" \
- "\n -l longopts Long options to be recognized" \
- "\n -n progname The name under which errors are reported" \
- "\n -o optstring Short options to be recognized" \
- "\n -q Disable error reporting by getopt(3)" \
- "\n -Q No normal output" \
- "\n -s shell Set shell quoting conventions" \
- "\n -T Test for getopt(1) version" \
- "\n -u Don't quote the output" \
- )
-#define getopt_example_usage \
- "$ cat getopt.test\n" \
- "#!/bin/sh\n" \
- "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \
- " -n 'example.busybox' -- \"$@\"`\n" \
- "if [ $? != 0 ]; then exit 1; fi\n" \
- "eval set -- \"$GETOPT\"\n" \
- "while true; do\n" \
- " case $1 in\n" \
- " -a|--a-long) echo \"Option a\"; shift;;\n" \
- " -b|--b-long) echo \"Option b, argument '$2'\"; shift 2;;\n" \
- " -c|--c-long)\n" \
- " case \"$2\" in\n" \
- " \"\") echo \"Option c, no argument\"; shift 2;;\n" \
- " *) echo \"Option c, argument '$2'\"; shift 2;;\n" \
- " esac;;\n" \
- " --) shift; break;;\n" \
- " *) echo \"Internal error!\"; exit 1;;\n" \
- " esac\n" \
- "done\n"
-
-#define getsebool_trivial_usage \
- "-a or getsebool boolean..."
-#define getsebool_full_usage \
- " -a Show all SELinux booleans"
-
-#define getty_trivial_usage \
- "[OPTIONS] BAUD_RATE TTY [TERMTYPE]"
-#define getty_full_usage \
- "Open a tty, prompt for a login name, then invoke /bin/login\n" \
- "\nOptions:" \
- "\n -h Enable hardware (RTS/CTS) flow control" \
- "\n -i Do not display /etc/issue before running login" \
- "\n -L Local line, do not do carrier detect" \
- "\n -m Get baud rate from modem's CONNECT status message" \
- "\n -w Wait for a CR or LF before sending /etc/issue" \
- "\n -n Do not prompt the user for a login name" \
- "\n -f issue_file Display issue_file instead of /etc/issue" \
- "\n -l login_app Invoke login_app instead of /bin/login" \
- "\n -t timeout Terminate after timeout if no username is read" \
- "\n -I initstring Init string to send before anything else" \
- "\n -H login_host Log login_host into the utmp file as the hostname" \
-
-#define grep_trivial_usage \
- "[-HhrilLnqvso" \
- USE_DESKTOP("w") \
- "eF" \
- USE_FEATURE_GREP_EGREP_ALIAS("E") \
- USE_FEATURE_GREP_CONTEXT("ABC") \
- "] PATTERN [FILEs...]"
-#define grep_full_usage \
- "Search for PATTERN in each FILE or standard input\n" \
- "\nOptions:" \
- "\n -H Prefix output lines with filename where match was found" \
- "\n -h Suppress the prefixing filename on output" \
- "\n -r Recurse subdirectories" \
- "\n -i Ignore case distinctions" \
- "\n -l List names of files that match" \
- "\n -L List names of files that do not match" \
- "\n -n Print line number with output lines" \
- "\n -q Quiet. Return 0 if PATTERN is found, 1 otherwise" \
- "\n -v Select non-matching lines" \
- "\n -s Suppress file open/read error messages" \
- "\n -c Only print count of matching lines" \
- "\n -o Show only the part of a line that matches PATTERN" \
- "\n -m MAX Match up to MAX times per file" \
- USE_DESKTOP( \
- "\n -w Match whole words only") \
- "\n -F PATTERN is a set of newline-separated strings" \
- USE_FEATURE_GREP_EGREP_ALIAS( \
- "\n -E PATTERN is an extended regular expression") \
- "\n -e PTRN Pattern to match" \
- "\n -f FILE Read pattern from file" \
- USE_FEATURE_GREP_CONTEXT( \
- "\n -A Print NUM lines of trailing context" \
- "\n -B Print NUM lines of leading context" \
- "\n -C Print NUM lines of output context") \
-
-#define grep_example_usage \
- "$ grep root /etc/passwd\n" \
- "root:x:0:0:root:/root:/bin/bash\n" \
- "$ grep ^[rR]oo. /etc/passwd\n" \
- "root:x:0:0:root:/root:/bin/bash\n"
-
-#define gunzip_trivial_usage \
- "[OPTION]... [FILE]..."
-#define gunzip_full_usage \
- "Uncompress FILEs (or standard input)\n" \
- "\nOptions:" \
- "\n -c Write to standard output" \
- "\n -f Force" \
- "\n -t Test file integrity" \
-
-#define gunzip_example_usage \
- "$ ls -la /tmp/BusyBox*\n" \
- "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n" \
- "$ gunzip /tmp/BusyBox-0.43.tar.gz\n" \
- "$ ls -la /tmp/BusyBox*\n" \
- "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n"
-
-#define gzip_trivial_usage \
- "[OPTION]... [FILE]..."
-#define gzip_full_usage \
- "Compress FILEs (or standard input)\n" \
- "\nOptions:" \
- "\n -c Write to standard output" \
- "\n -d Decompress" \
- "\n -f Force" \
-
-#define gzip_example_usage \
- "$ ls -la /tmp/busybox*\n" \
- "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n" \
- "$ gzip /tmp/busybox.tar\n" \
- "$ ls -la /tmp/busybox*\n" \
- "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
-
-#define halt_trivial_usage \
- "[-d delay] [-n] [-f]"
-#define halt_full_usage \
- "Halt the system\n" \
- "\nOptions:" \
- "\n -d Delay interval for halting" \
- "\n -n No call to sync()" \
- "\n -f Force halt (don't go through init)" \
- USE_FEATURE_WTMP( \
- "\n -w Only write a wtmp record" \
- )
-
-#define hdparm_trivial_usage \
- "[options] [device] .."
-#define hdparm_full_usage \
- "Options:" \
- "\n -a Get/set fs readahead" \
- "\n -A Set drive read-lookahead flag (0/1)" \
- "\n -b Get/set bus state (0 == off, 1 == on, 2 == tristate)" \
- "\n -B Set Advanced Power Management setting (1-255)" \
- "\n -c Get/set IDE 32-bit IO setting" \
- "\n -C Check IDE power mode status" \
- USE_FEATURE_HDPARM_HDIO_GETSET_DMA( \
- "\n -d Get/set using_dma flag") \
- "\n -D Enable/disable drive defect-mgmt" \
- "\n -f Flush buffer cache for device on exit" \
- "\n -g Display drive geometry" \
- "\n -h Display terse usage information" \
- USE_FEATURE_HDPARM_GET_IDENTITY( \
- "\n -i Display drive identification") \
- USE_FEATURE_HDPARM_GET_IDENTITY( \
- "\n -I Detailed/current information directly from drive") \
- "\n -k Get/set keep_settings_over_reset flag (0/1)" \
- "\n -K Set drive keep_features_over_reset flag (0/1)" \
- "\n -L Set drive doorlock (0/1) (removable harddisks only)" \
- "\n -m Get/set multiple sector count" \
- "\n -n Get/set ignore-write-errors flag (0/1)" \
- "\n -p Set PIO mode on IDE interface chipset (0,1,2,3,4,...)" \
- "\n -P Set drive prefetch count" \
-/* "\n -q Change next setting quietly" - not supported ib bbox */ \
- "\n -Q Get/set DMA tagged-queuing depth (if supported)" \
- "\n -r Get/set readonly flag (DANGEROUS to set)" \
- USE_FEATURE_HDPARM_HDIO_SCAN_HWIF( \
- "\n -R Register an IDE interface (DANGEROUS)") \
- "\n -S Set standby (spindown) timeout" \
- "\n -t Perform device read timings" \
- "\n -T Perform cache read timings" \
- "\n -u Get/set unmaskirq flag (0/1)" \
- USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \
- "\n -U Un-register an IDE interface (DANGEROUS)") \
- "\n -v Defaults; same as -mcudkrag for IDE drives" \
- "\n -V Display program version and exit immediately" \
- USE_FEATURE_HDPARM_HDIO_DRIVE_RESET( \
- "\n -w Perform device reset (DANGEROUS)") \
- "\n -W Set drive write-caching flag (0/1) (DANGEROUS)" \
- USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \
- "\n -x Tristate device for hotswap (0/1) (DANGEROUS)") \
- "\n -X Set IDE xfer mode (DANGEROUS)" \
- "\n -y Put IDE drive in standby mode" \
- "\n -Y Put IDE drive to sleep" \
- "\n -Z Disable Seagate auto-powersaving mode" \
- "\n -z Re-read partition table" \
-
-#define head_trivial_usage \
- "[OPTION]... [FILE]..."
-#define head_full_usage \
- "Print first 10 lines of each FILE to standard output.\n" \
- "With more than one FILE, precede each with a header giving the\n" \
- "file name. With no FILE, or when FILE is -, read standard input.\n" \
- "\nOptions:" \
- "\n -n NUM Print first NUM lines instead of first 10" \
- USE_FEATURE_FANCY_HEAD( \
- "\n -c NUM Output the first NUM bytes" \
- "\n -q Never output headers giving file names" \
- "\n -v Always output headers giving file names") \
-
-#define head_example_usage \
- "$ head -n 2 /etc/passwd\n" \
- "root:x:0:0:root:/root:/bin/bash\n" \
- "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n"
-
-#define hexdump_trivial_usage \
- "[-bcCdefnosvx" USE_FEATURE_HEXDUMP_REVERSE("R") "] FILE..."
-#define hexdump_full_usage \
- "Display file(s) or standard input in a user specified format\n" \
- "\nOptions:" \
- "\n -b One-byte octal display" \
- "\n -c One-byte character display" \
- "\n -C Canonical hex+ASCII, 16 bytes per line" \
- "\n -d Two-byte decimal display" \
- "\n -e FORMAT STRING" \
- "\n -f FORMAT FILE" \
- "\n -n LENGTH Interpret only LENGTH bytes of input" \
- "\n -o Two-byte octal display" \
- "\n -s OFFSET Skip OFFSET bytes" \
- "\n -v Display all input data" \
- "\n -x Two-byte hexadecimal display" \
- USE_FEATURE_HEXDUMP_REVERSE( \
- "\n -R Reverse of 'hexdump -Cv'") \
-
-#define hd_trivial_usage \
- "FILE..."
-#define hd_full_usage \
- "hd is an alias for hexdump -C"
-
-#define hostid_trivial_usage \
- ""
-#define hostid_full_usage \
- "Print out a unique 32-bit identifier for the machine"
-
-#define hostname_trivial_usage \
- "[OPTION] [hostname | -F FILE]"
-#define hostname_full_usage \
- "Get or set hostname or DNS domain name\n" \
- "\nOptions:" \
- "\n -s Short" \
- "\n -i Addresses for the hostname" \
- "\n -d DNS domain name" \
- "\n -f Fully qualified domain name" \
- "\n -F FILE Use the contents of FILE to specify the hostname" \
-
-#define hostname_example_usage \
- "$ hostname\n" \
- "sage\n"
-
-#define httpd_trivial_usage \
- "[-c conffile]" \
- " [-p [ip:]port]" \
- " [-i] [-f] [-v[v]]" \
- USE_FEATURE_HTTPD_SETUID(" [-u user[:grp]]") \
- USE_FEATURE_HTTPD_BASIC_AUTH(" [-r realm]") \
- USE_FEATURE_HTTPD_AUTH_MD5(" [-m pass]") \
- " [-h home]" \
- " [-d/-e string]"
-#define httpd_full_usage \
- "Listen for incoming HTTP requests\n" \
- "\nOptions:" \
- "\n -c FILE Configuration file (default httpd.conf)" \
- "\n -p [IP:]PORT Bind to ip:port (default *:80)" \
- "\n -i Inetd mode" \
- "\n -f Do not daemonize" \
- "\n -v[v] Verbose" \
- USE_FEATURE_HTTPD_SETUID( \
- "\n -u USER[:GRP] Set uid/gid after binding to port") \
- USE_FEATURE_HTTPD_BASIC_AUTH( \
- "\n -r REALM Authentication Realm for Basic Authentication") \
- USE_FEATURE_HTTPD_AUTH_MD5( \
- "\n -m PASS Crypt PASS with md5 algorithm") \
- "\n -h HOME Home directory (default .)" \
- "\n -e STRING HTML encode STRING" \
- "\n -d STRING URL decode STRING" \
-
-#define hwclock_trivial_usage \
- USE_GETOPT_LONG( \
- "[-r|--show] [-s|--hctosys] [-w|--systohc]" \
- " [-l|--localtime] [-u|--utc]" \
- " [-f FILE]" \
- ) \
- SKIP_GETOPT_LONG( \
- "[-r] [-s] [-w] [-l] [-u] [-f FILE]" \
- )
-#define hwclock_full_usage \
- "Query and set hardware clock (RTC)\n" \
- "\nOptions:" \
- "\n -r Show time from hardware clock" \
- "\n -s Set system time from hardware clock" \
- "\n -w Set hardware clock to system time" \
- "\n -u Hardware clock is in UTC" \
- "\n -l Hardware clock is in local time" \
- "\n -f FILE Use specified device (e.g. /dev/rtc2)" \
-
-#define id_trivial_usage \
- "[OPTIONS]... [USER]"
-#define id_full_usage \
- "Print information about USER or the current user\n" \
- "\nOptions:" \
- USE_SELINUX( \
- "\n -Z Print the security context" \
- ) \
- "\n -g Print group ID" \
- "\n -u Print user ID" \
- "\n -n Print name instead of a number" \
- "\n -r Print real user ID instead of effective ID" \
-
-#define id_example_usage \
- "$ id\n" \
- "uid=1000(andersen) gid=1000(andersen)\n"
-
-#define ifconfig_trivial_usage \
- USE_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]"
-#define ifconfig_full_usage \
- "Configure a network interface\n" \
- "\nOptions:" \
- "\n" \
- USE_FEATURE_IPV6( \
- " [add ADDRESS[/PREFIXLEN]]\n") \
- USE_FEATURE_IPV6( \
- " [del ADDRESS[/PREFIXLEN]]\n") \
- " [[-]broadcast [ADDRESS]] [[-]pointopoint [ADDRESS]]\n" \
- " [netmask ADDRESS] [dstaddr ADDRESS]\n" \
- USE_FEATURE_IFCONFIG_SLIP( \
- " [outfill NN] [keepalive NN]\n") \
- " " USE_FEATURE_IFCONFIG_HW("[hw ether ADDRESS] ") "[metric NN] [mtu NN]\n" \
- " [[-]trailers] [[-]arp] [[-]allmulti]\n" \
- " [multicast] [[-]promisc] [txqueuelen NN] [[-]dynamic]\n" \
- USE_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ( \
- " [mem_start NN] [io_addr NN] [irq NN]\n") \
- " [up|down] ..."
-
-#define ifenslave_trivial_usage \
- "[-cdf] master-iface <slave-iface...>"
-#define ifenslave_full_usage \
- "Configure network interfaces for parallel routing\n" \
- "\nOptions:" \
- "\n -c, --change-active Change active slave" \
- "\n -d, --detach Remove slave interface from bonding device" \
- "\n -f, --force Force, even if interface is not Ethernet" \
-/* "\n -r, --receive-slave Create a receive-only slave" */
-
-#define ifenslave_example_usage \
- "To create a bond device, simply follow these three steps :\n" \
- "- ensure that the required drivers are properly loaded :\n" \
- " # modprobe bonding ; modprobe <3c59x|eepro100|pcnet32|tulip|...>\n" \
- "- assign an IP address to the bond device :\n" \
- " # ifconfig bond0 <addr> netmask <mask> broadcast <bcast>\n" \
- "- attach all the interfaces you need to the bond device :\n" \
- " # ifenslave bond0 eth0 eth1 eth2\n" \
- " If bond0 didn't have a MAC address, it will take eth0's. Then, all\n" \
- " interfaces attached AFTER this assignment will get the same MAC addr.\n\n" \
- " To detach a dead interface without setting the bond device down :\n" \
- " # ifenslave -d bond0 eth1\n\n" \
- " To set the bond device down and automatically release all the slaves :\n" \
- " # ifconfig bond0 down\n\n" \
- " To change active slave :\n" \
- " # ifenslave -c bond0 eth0\n" \
-
-#define ifup_trivial_usage \
- "[-ain"USE_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..."
-#define ifup_full_usage \
- "Options:" \
- "\n -a De/configure all interfaces automatically" \
- "\n -i FILE Use FILE for interface definitions" \
- "\n -n Print out what would happen, but don't do it" \
- USE_FEATURE_IFUPDOWN_MAPPING( \
- "\n (note: doesn't disable mappings)" \
- "\n -m Don't run any mappings" \
- ) \
- "\n -v Print out what would happen before doing it" \
- "\n -f Force de/configuration" \
-
-#define ifdown_trivial_usage \
- "[-ain"USE_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..."
-#define ifdown_full_usage \
- "Options:" \
- "\n -a De/configure all interfaces automatically" \
- "\n -i FILE Use FILE for interface definitions" \
- "\n -n Print out what would happen, but don't do it" \
- USE_FEATURE_IFUPDOWN_MAPPING( \
- "\n (note: doesn't disable mappings)" \
- "\n -m Don't run any mappings" \
- ) \
- "\n -v Print out what would happen before doing it" \
- "\n -f Force de/configuration" \
-
-#define inetd_trivial_usage \
- "[-fe] [-q N] [-R N] [CONFFILE]"
-#define inetd_full_usage \
- "Listen for network connections and launch programs\n" \
- "\nOptions:" \
- "\n -f Run in foreground" \
- "\n -e Log to stderr" \
- "\n -q N Socket listen queue (default: 128)" \
- "\n -R N Pause services after N connects/min" \
- "\n (default: 0 - disabled)" \
-
-#define init_trivial_usage \
- ""
-#define init_full_usage \
- "Init is the parent of all processes"
-
-#define init_notes_usage \
-"This version of init is designed to be run only by the kernel.\n" \
-"\n" \
-"BusyBox init doesn't support multiple runlevels. The runlevels field of\n" \
-"the /etc/inittab file is completely ignored by BusyBox init. If you want\n" \
-"runlevels, use sysvinit.\n" \
-"\n" \
-"BusyBox init works just fine without an inittab. If no inittab is found,\n" \
-"it has the following default behavior:\n" \
-"\n" \
-" ::sysinit:/etc/init.d/rcS\n" \
-" ::askfirst:/bin/sh\n" \
-" ::ctrlaltdel:/sbin/reboot\n" \
-" ::shutdown:/sbin/swapoff -a\n" \
-" ::shutdown:/bin/umount -a -r\n" \
-" ::restart:/sbin/init\n" \
-"\n" \
-"if it detects that /dev/console is _not_ a serial console, it will also run:\n" \
-"\n" \
-" tty2::askfirst:/bin/sh\n" \
-" tty3::askfirst:/bin/sh\n" \
-" tty4::askfirst:/bin/sh\n" \
-"\n" \
-"If you choose to use an /etc/inittab file, the inittab entry format is as follows:\n" \
-"\n" \
-" <id>:<runlevels>:<action>:<process>\n" \
-"\n" \
-" <id>:\n" \
-"\n" \
-" WARNING: This field has a non-traditional meaning for BusyBox init!\n" \
-" The id field is used by BusyBox init to specify the controlling tty for\n" \
-" the specified process to run on. The contents of this field are\n" \
-" appended to \"/dev/\" and used as-is. There is no need for this field to\n" \
-" be unique, although if it isn't you may have strange results. If this\n" \
-" field is left blank, the controlling tty is set to the console. Also\n" \
-" note that if BusyBox detects that a serial console is in use, then only\n" \
-" entries whose controlling tty is either the serial console or /dev/null\n" \
-" will be run. BusyBox init does nothing with utmp. We don't need no\n" \
-" stinkin' utmp.\n" \
-"\n" \
-" <runlevels>:\n" \
-"\n" \
-" The runlevels field is completely ignored.\n" \
-"\n" \
-" <action>:\n" \
-"\n" \
-" Valid actions include: sysinit, respawn, askfirst, wait,\n" \
-" once, restart, ctrlaltdel, and shutdown.\n" \
-"\n" \
-" The available actions can be classified into two groups: actions\n" \
-" that are run only once, and actions that are re-run when the specified\n" \
-" process exits.\n" \
-"\n" \
-" Run only-once actions:\n" \
-"\n" \
-" 'sysinit' is the first item run on boot. init waits until all\n" \
-" sysinit actions are completed before continuing. Following the\n" \
-" completion of all sysinit actions, all 'wait' actions are run.\n" \
-" 'wait' actions, like 'sysinit' actions, cause init to wait until\n" \
-" the specified task completes. 'once' actions are asynchronous,\n" \
-" therefore, init does not wait for them to complete. 'restart' is\n" \
-" the action taken to restart the init process. By default this should\n" \
-" simply run /sbin/init, but can be a script which runs pivot_root or it\n" \
-" can do all sorts of other interesting things. The 'ctrlaltdel' init\n" \
-" actions are run when the system detects that someone on the system\n" \
-" console has pressed the CTRL-ALT-DEL key combination. Typically one\n" \
-" wants to run 'reboot' at this point to cause the system to reboot.\n" \
-" Finally the 'shutdown' action specifies the actions to taken when\n" \
-" init is told to reboot. Unmounting filesystems and disabling swap\n" \
-" is a very good here.\n" \
-"\n" \
-" Run repeatedly actions:\n" \
-"\n" \
-" 'respawn' actions are run after the 'once' actions. When a process\n" \
-" started with a 'respawn' action exits, init automatically restarts\n" \
-" it. Unlike sysvinit, BusyBox init does not stop processes from\n" \
-" respawning out of control. The 'askfirst' actions acts just like\n" \
-" respawn, except that before running the specified process it\n" \
-" displays the line \"Please press Enter to activate this console.\"\n" \
-" and then waits for the user to press enter before starting the\n" \
-" specified process.\n" \
-"\n" \
-" Unrecognized actions (like initdefault) will cause init to emit an\n" \
-" error message, and then go along with its business. All actions are\n" \
-" run in the order they appear in /etc/inittab.\n" \
-"\n" \
-" <process>:\n" \
-"\n" \
-" Specifies the process to be executed and its command line.\n" \
-"\n" \
-"Example /etc/inittab file:\n" \
-"\n" \
-" # This is run first except when booting in single-user mode\n" \
-" #\n" \
-" ::sysinit:/etc/init.d/rcS\n" \
-" \n" \
-" # /bin/sh invocations on selected ttys\n" \
-" #\n" \
-" # Start an \"askfirst\" shell on the console (whatever that may be)\n" \
-" ::askfirst:-/bin/sh\n" \
-" # Start an \"askfirst\" shell on /dev/tty2-4\n" \
-" tty2::askfirst:-/bin/sh\n" \
-" tty3::askfirst:-/bin/sh\n" \
-" tty4::askfirst:-/bin/sh\n" \
-" \n" \
-" # /sbin/getty invocations for selected ttys\n" \
-" #\n" \
-" tty4::respawn:/sbin/getty 38400 tty4\n" \
-" tty5::respawn:/sbin/getty 38400 tty5\n" \
-" \n" \
-" \n" \
-" # Example of how to put a getty on a serial line (for a terminal)\n" \
-" #\n" \
-" #::respawn:/sbin/getty -L ttyS0 9600 vt100\n" \
-" #::respawn:/sbin/getty -L ttyS1 9600 vt100\n" \
-" #\n" \
-" # Example how to put a getty on a modem line\n" \
-" #::respawn:/sbin/getty 57600 ttyS2\n" \
-" \n" \
-" # Stuff to do when restarting the init process\n" \
-" ::restart:/sbin/init\n" \
-" \n" \
-" # Stuff to do before rebooting\n" \
-" ::ctrlaltdel:/sbin/reboot\n" \
-" ::shutdown:/bin/umount -a -r\n" \
-" ::shutdown:/sbin/swapoff -a\n"
-
-#define insmod_trivial_usage \
- USE_FEATURE_2_4_MODULES("[OPTION]... ") "MODULE [symbol=value]..."
-#define insmod_full_usage \
- "Load the specified kernel modules into the kernel" \
- USE_FEATURE_2_4_MODULES( "\n" \
- "\nOptions:" \
- "\n -f Force module to load into the wrong kernel version" \
- "\n -k Make module autoclean-able" \
- "\n -v Verbose" \
- "\n -q Quiet" \
- "\n -L Lock to prevent simultaneous loads of a module" \
- USE_FEATURE_INSMOD_LOAD_MAP( \
- "\n -m Output load map to stdout" \
- ) \
- "\n -o NAME Set internal module name to NAME" \
- "\n -x Do not export externs" \
- )
-
-#define install_trivial_usage \
- "[-cgmops] [sources] dest|directory"
-#define install_full_usage \
- "Copy files and set attributes\n" \
- "\nOptions:" \
- "\n -c Copy the file, default" \
- "\n -d Create directories" \
- "\n -g Set group ownership" \
- "\n -m Set permissions" \
- "\n -o Set ownership" \
- "\n -p Preserve date" \
- "\n -s Strip symbol tables" \
- USE_SELINUX( \
- "\n -Z Set security context of copy" \
- )
-
-/* would need to make the " | " optional depending on more than one selected: */
-#define ip_trivial_usage \
- "[OPTIONS] {" \
- USE_FEATURE_IP_ADDRESS("address | ") \
- USE_FEATURE_IP_ROUTE("route | ") \
- USE_FEATURE_IP_LINK("link | ") \
- USE_FEATURE_IP_TUNNEL("tunnel | ") \
- USE_FEATURE_IP_RULE("rule") \
- "} {COMMAND}"
-#define ip_full_usage \
- "ip [OPTIONS] OBJECT {COMMAND}\n" \
- "where OBJECT := {" \
- USE_FEATURE_IP_ADDRESS("address | ") \
- USE_FEATURE_IP_ROUTE("route | ") \
- USE_FEATURE_IP_LINK("link | ") \
- USE_FEATURE_IP_TUNNEL("tunnel | ") \
- USE_FEATURE_IP_RULE("rule") \
- "}\n" \
- "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }" \
-
-#define ipaddr_trivial_usage \
- "{ {add|del} IFADDR dev STRING | {show|flush}\n" \
- " [dev STRING] [to PREFIX] }"
-#define ipaddr_full_usage \
- "ipaddr {add|delete} IFADDR dev STRING\n" \
- "ipaddr {show|flush} [dev STRING] [scope SCOPE-ID]\n" \
- " [to PREFIX] [label PATTERN]\n" \
- " IFADDR := PREFIX | ADDR peer PREFIX\n" \
- " [broadcast ADDR] [anycast ADDR]\n" \
- " [label STRING] [scope SCOPE-ID]\n" \
- " SCOPE-ID := [host | link | global | NUMBER]" \
-
-#define ipcalc_trivial_usage \
- "[OPTION]... ADDRESS[[/]NETMASK] [NETMASK]"
-#define ipcalc_full_usage \
- "Calculate IP network settings from a IP address\n" \
- "\nOptions:" \
- USE_FEATURE_IPCALC_LONG_OPTIONS( \
- "\n -b,--broadcast Display calculated broadcast address" \
- "\n -n,--network Display calculated network address" \
- "\n -m,--netmask Display default netmask for IP" \
- USE_FEATURE_IPCALC_FANCY( \
- "\n -p,--prefix Display the prefix for IP/NETMASK" \
- "\n -h,--hostname Display first resolved host name" \
- "\n -s,--silent Don't ever display error messages" \
- ) \
- ) \
- SKIP_FEATURE_IPCALC_LONG_OPTIONS( \
- "\n -b Display calculated broadcast address" \
- "\n -n Display calculated network address" \
- "\n -m Display default netmask for IP" \
- USE_FEATURE_IPCALC_FANCY( \
- "\n -p Display the prefix for IP/NETMASK" \
- "\n -h Display first resolved host name" \
- "\n -s Don't ever display error messages" \
- ) \
- )
-
-#define ipcrm_trivial_usage \
- "[-MQS key] [-mqs id]"
-#define ipcrm_full_usage \
- "Upper-case options MQS remove an object by shmkey value.\n" \
- "Lower-case options remove an object by shmid value.\n" \
- "\nOptions:" \
- "\n -mM Remove memory segment after last detach" \
- "\n -qQ Remove message queue" \
- "\n -sS Remove semaphore" \
-
-#define ipcs_trivial_usage \
- "[[-smq] -i shmid] | [[-asmq] [-tcplu]]"
-#define ipcs_full_usage \
- " -i Show specific resource" \
- "\nResource specification:" \
- "\n -m Shared memory segments" \
- "\n -q Message queues" \
- "\n -s Semaphore arrays" \
- "\n -a All (default)" \
- "\nOutput format:" \
- "\n -t Time" \
- "\n -c Creator" \
- "\n -p Pid" \
- "\n -l Limits" \
- "\n -u Summary" \
-
-#define iplink_trivial_usage \
- "{ set DEVICE { up | down | arp { on | off } | show [DEVICE] }"
-#define iplink_full_usage \
- "iplink set DEVICE { up | down | arp | multicast { on | off } |\n" \
- " dynamic { on | off } |\n" \
- " mtu MTU }\n" \
- "iplink show [DEVICE]" \
-
-#define iproute_trivial_usage \
- "{ list | flush | { add | del | change | append |\n" \
- " replace | monitor } ROUTE }"
-#define iproute_full_usage \
- "iproute { list | flush } SELECTOR\n" \
- "iproute get ADDRESS [from ADDRESS iif STRING]\n" \
- " [oif STRING] [tos TOS]\n" \
- "iproute { add | del | change | append | replace | monitor } ROUTE\n" \
- " SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO]\n" \
- " ROUTE := [TYPE] PREFIX [tos TOS] [proto RTPROTO]" \
-
-#define iprule_trivial_usage \
- "{[list | add | del] RULE}"
-#define iprule_full_usage \
- "iprule [list | add | del] SELECTOR ACTION\n" \
- " SELECTOR := [from PREFIX] [to PREFIX] [tos TOS] [fwmark FWMARK]\n" \
- " [dev STRING] [pref NUMBER]\n" \
- " ACTION := [table TABLE_ID] [nat ADDRESS]\n" \
- " [prohibit | reject | unreachable]\n" \
- " [realms [SRCREALM/]DSTREALM]\n" \
- " TABLE_ID := [local | main | default | NUMBER]" \
-
-#define iptunnel_trivial_usage \
- "{ add | change | del | show } [NAME]\n" \
- " [mode { ipip | gre | sit }]\n" \
- " [remote ADDR] [local ADDR] [ttl TTL]"
-#define iptunnel_full_usage \
- "iptunnel { add | change | del | show } [NAME]\n" \
- " [mode { ipip | gre | sit }] [remote ADDR] [local ADDR]\n" \
- " [[i|o]seq] [[i|o]key KEY] [[i|o]csum]\n" \
- " [ttl TTL] [tos TOS] [[no]pmtudisc] [dev PHYS_DEV]" \
-
-#define kbd_mode_trivial_usage \
- "[-a|k|s|u]"
-#define kbd_mode_full_usage \
- "Report or set the keyboard mode\n" \
- "\nOptions set mode:" \
- "\n -a Default (ASCII)" \
- "\n -k Medium-raw (keyboard)" \
- "\n -s Raw (scancode)" \
- "\n -u Unicode (utf-8)" \
-
-#define kill_trivial_usage \
- "[-l] [-signal] process-id..."
-#define kill_full_usage \
- "Send a signal (default is TERM) to the specified process(es)\n" \
- "\nOptions:" \
- "\n -l List all signal names and numbers" \
-
-#define kill_example_usage \
- "$ ps | grep apache\n" \
- "252 root root S [apache]\n" \
- "263 www-data www-data S [apache]\n" \
- "264 www-data www-data S [apache]\n" \
- "265 www-data www-data S [apache]\n" \
- "266 www-data www-data S [apache]\n" \
- "267 www-data www-data S [apache]\n" \
- "$ kill 252\n"
-
-#define killall_trivial_usage \
- "[-l] [-q] [-signal] process-name..."
-#define killall_full_usage \
- "Send a signal (default is TERM) to the specified process(es)\n" \
- "\nOptions:" \
- "\n -l List all signal names and numbers" \
- "\n -q Do not complain if no processes were killed" \
-
-#define killall_example_usage \
- "$ killall apache\n"
-
-#define killall5_trivial_usage \
- "[-l] [-signal]"
-#define killall5_full_usage \
- "Send a signal (default is TERM) to all processes outside current session\n" \
- "\nOptions:" \
- "\n -l List all signal names and numbers" \
-
-#define klogd_trivial_usage \
- "[-c n] [-n]"
-#define klogd_full_usage \
- "Kernel logger\n" \
- "\nOptions:" \
- "\n -c n Set the default log level of console messages to n" \
- "\n -n Run in foreground" \
-
-#define length_trivial_usage \
- "STRING"
-#define length_full_usage \
- "Print STRING's length"
-
-#define length_example_usage \
- "$ length Hello\n" \
- "5\n"
-
-#define less_trivial_usage \
- "[-EMNmh~?] [FILE...]"
-#define less_full_usage \
- "View a file or list of files. The position within files can be\n" \
- "changed, and files can be manipulated in various ways.\n" \
- "\nOptions:" \
- "\n -E Quit once the end of a file is reached" \
- "\n -M,-m Display a status line containing the line numbers" \
- "\n and percentage through the file" \
- "\n -N Prefix line numbers to each line" \
- "\n -~ Suppress ~s displayed past the end of the file" \
-
-#define setarch_trivial_usage \
- "personality program [args...]"
-#define setarch_full_usage \
- "Personality may be:\n" \
- " linux32 Set 32bit uname emulation\n" \
- " linux64 Set 64bit uname emulation" \
-
-#define ln_trivial_usage \
- "[OPTION] TARGET... LINK_NAME|DIRECTORY"
-#define ln_full_usage \
- "Create a link named LINK_NAME or DIRECTORY to the specified TARGET.\n" \
- "Use '--' to indicate that all following arguments are non-options.\n" \
- "\nOptions:" \
- "\n -s Make symlinks instead of hardlinks" \
- "\n -f Remove existing destination files" \
- "\n -n Don't dereference symlinks - treat like normal file" \
- "\n -b Make a backup of the target (if exists) before link operation" \
- "\n -S suf Use suffix instead of ~ when making backup files" \
-
-#define ln_example_usage \
- "$ ln -s BusyBox /tmp/ls\n" \
- "$ ls -l /tmp/ls\n" \
- "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n"
-
-#define load_policy_trivial_usage
-
-#define load_policy_full_usage
-
-#define loadfont_trivial_usage \
- "< font"
-#define loadfont_full_usage \
- "Load a console font from standard input"
-#define loadfont_example_usage \
- "$ loadfont < /etc/i18n/fontname\n"
-
-#define loadkmap_trivial_usage \
- "< keymap"
-#define loadkmap_full_usage \
- "Load a binary keyboard translation table from standard input"
-#define loadkmap_example_usage \
- "$ loadkmap < /etc/i18n/lang-keymap\n"
-
-#define logger_trivial_usage \
- "[OPTION]... [MESSAGE]"
-#define logger_full_usage \
- "Write MESSAGE to the system log. If MESSAGE is omitted, log stdin.\n" \
- "\nOptions:" \
- "\n -s Log to stderr as well as the system log" \
- "\n -t TAG Log using the specified tag (defaults to user name)" \
- "\n -p PRIO Priority (numeric or facility.level pair)" \
-
-#define logger_example_usage \
- "$ logger \"hello\"\n"
-
-#define login_trivial_usage \
- "[-p] [-h HOST] [[-f] USER]"
-#define login_full_usage \
- "Begin a new session on the system\n" \
- "\nOptions:" \
- "\n -f Do not authenticate (user already authenticated)" \
- "\n -h Name of the remote host" \
- "\n -p Preserve environment" \
-
-#define logname_trivial_usage \
- ""
-#define logname_full_usage \
- "Print the name of the current user"
-#define logname_example_usage \
- "$ logname\n" \
- "root\n"
-
-#define logread_trivial_usage \
- "[OPTION]..."
-#define logread_full_usage \
- "Show messages in syslogd's circular buffer\n" \
- "\nOptions:" \
- "\n -f Output data as log grows" \
-
-#define losetup_trivial_usage \
- "[-o OFS] LOOPDEV FILE - associate loop devices\n" \
- " losetup -d LOOPDEV - disassociate\n" \
- " losetup [-f] - show"
-#define losetup_full_usage \
- "Options:" \
- "\n -o OFS Start OFS bytes into FILE" \
- "\n -f Show first free loop device" \
-
-#define losetup_notes_usage \
- "No arguments will display all current associations.\n" \
- "One argument (losetup /dev/loop1) will display the current association\n" \
- "(if any), or disassociate it (with -d). The display shows the offset\n" \
- "and filename of the file the loop device is currently bound to.\n\n" \
- "Two arguments (losetup /dev/loop1 file.img) create a new association,\n" \
- "with an optional offset (-o 12345). Encryption is not yet supported.\n" \
- "losetup -f will show the first loop free loop device\n\n"
-
-#define lpd_trivial_usage \
- "SPOOLDIR"
-#define lpd_full_usage \
- "Example:" \
- "\n tcpsvd -E 0 515 softlimit -m 99999 lpd /var/spool"
-
-#define lpq_trivial_usage \
- "[-P queue[@host[:port]]] [-U USERNAME] [-d JOBID...] [-fs]"
-#define lpq_full_usage \
- "Options:" \
- "\n -P lp service to connect to (else uses $PRINTER)" \
- "\n -d Delete jobs" \
- "\n -f Force any waiting job to be printed" \
- "\n -s Short display" \
-
-#define lpr_trivial_usage \
- "-P queue[@host[:port]] -U USERNAME -J TITLE -Vmh [FILE...]"
-/* -C CLASS exists too, not shown.
- * CLASS is supposed to be printed on banner page, if one is requested */
-#define lpr_full_usage \
- "Options:" \
- "\n -P lp service to connect to (else uses $PRINTER)"\
- "\n -m Send mail on completion" \
- "\n -h Print banner page too" \
- "\n -V Verbose" \
-
-#define ls_trivial_usage \
- "[-1Aa" USE_FEATURE_LS_TIMESTAMPS("c") "Cd" \
- USE_FEATURE_LS_TIMESTAMPS("e") USE_FEATURE_LS_FILETYPES("F") "iln" \
- USE_FEATURE_LS_FILETYPES("p") USE_FEATURE_LS_FOLLOWLINKS("L") \
- USE_FEATURE_LS_RECURSIVE("R") USE_FEATURE_LS_SORTFILES("rS") "s" \
- USE_FEATURE_AUTOWIDTH("T") USE_FEATURE_LS_TIMESTAMPS("tu") \
- USE_FEATURE_LS_SORTFILES("v") USE_FEATURE_AUTOWIDTH("w") "x" \
- USE_FEATURE_LS_SORTFILES("X") USE_FEATURE_HUMAN_READABLE("h") "k" \
- USE_SELINUX("K") "] [filenames...]"
-#define ls_full_usage \
- "List directory contents\n" \
- "\nOptions:" \
- "\n -1 List files in a single column" \
- "\n -A Do not list implied . and .." \
- "\n -a Do not hide entries starting with ." \
- "\n -C List entries by columns" \
- USE_FEATURE_LS_TIMESTAMPS( \
- "\n -c With -l: show ctime") \
- USE_FEATURE_LS_COLOR( \
- "\n --color[={always,never,auto}] Control coloring") \
- "\n -d List directory entries instead of contents" \
- USE_FEATURE_LS_TIMESTAMPS( \
- "\n -e List both full date and full time") \
- USE_FEATURE_LS_FILETYPES( \
- "\n -F Append indicator (one of */=@|) to entries") \
- "\n -i List the i-node for each file" \
- "\n -l Use a long listing format" \
- "\n -n List numeric UIDs and GIDs instead of names" \
- USE_FEATURE_LS_FILETYPES( \
- "\n -p Append indicator (one of /=@|) to entries") \
- USE_FEATURE_LS_FOLLOWLINKS( \
- "\n -L List entries pointed to by symlinks") \
- USE_FEATURE_LS_RECURSIVE( \
- "\n -R List subdirectories recursively") \
- USE_FEATURE_LS_SORTFILES( \
- "\n -r Sort the listing in reverse order") \
- USE_FEATURE_LS_SORTFILES( \
- "\n -S Sort the listing by file size") \
- "\n -s List the size of each file, in blocks" \
- USE_FEATURE_AUTOWIDTH( \
- "\n -T NUM Assume Tabstop every NUM columns") \
- USE_FEATURE_LS_TIMESTAMPS( \
- "\n -t With -l: show modification time") \
- USE_FEATURE_LS_TIMESTAMPS( \
- "\n -u With -l: show access time") \
- USE_FEATURE_LS_SORTFILES( \
- "\n -v Sort the listing by version") \
- USE_FEATURE_AUTOWIDTH( \
- "\n -w NUM Assume the terminal is NUM columns wide") \
- "\n -x List entries by lines instead of by columns" \
- USE_FEATURE_LS_SORTFILES( \
- "\n -X Sort the listing by extension") \
- USE_FEATURE_HUMAN_READABLE( \
- "\n -h Print sizes in human readable format (e.g., 1K 243M 2G)") \
- USE_SELINUX( \
- "\n -k Print security context") \
- USE_SELINUX( \
- "\n -K Print security context in long format") \
- USE_SELINUX( \
- "\n -Z Print security context and permission") \
-
-#define lsattr_trivial_usage \
- "[-Radlv] [files...]"
-#define lsattr_full_usage \
- "List file attributes on an ext2 fs\n" \
- "\nOptions:" \
- "\n -R Recursively list subdirectories" \
- "\n -a Do not hide entries starting with ." \
- "\n -d List directory entries instead of contents" \
- "\n -l Print long flag names" \
- "\n -v List the file's version/generation number" \
-
-#define lsmod_trivial_usage \
- ""
-#define lsmod_full_usage \
- "List the currently loaded kernel modules"
-
-#if ENABLE_FEATURE_MAKEDEVS_LEAF
-#define makedevs_trivial_usage \
- "NAME TYPE MAJOR MINOR FIRST LAST [s]"
-#define makedevs_full_usage \
- "Create a range of block or character special files\n\n" \
- "TYPEs include:\n" \
- " b: Make a block (buffered) device\n" \
- " c or u: Make a character (un-buffered) device\n" \
- " p: Make a named pipe. MAJOR and MINOR are ignored for named pipes\n" \
- "\n" \
- "FIRST specifies the number appended to NAME to create the first device.\n" \
- "LAST specifies the number of the last item that should be created\n" \
- "If 's' is the last argument, the base device is created as well.\n\n" \
- "For example:\n" \
- " makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63\n" \
- " makedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8"
-#define makedevs_example_usage \
- "# makedevs /dev/ttyS c 4 66 2 63\n" \
- "[creates ttyS2-ttyS63]\n" \
- "# makedevs /dev/hda b 3 0 0 8 s\n" \
- "[creates hda,hda1-hda8]\n"
-#endif
-
-#if ENABLE_FEATURE_MAKEDEVS_TABLE
-#define makedevs_trivial_usage \
- "[-d device_table] rootdir"
-#define makedevs_full_usage \
- "Create a range of special files as specified in a device table.\n" \
- "Device table entries take the form of:\n" \
- "<type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>\n" \
- "Where name is the file name, type can be one of:\n" \
- " f A regular file\n" \
- " d Directory\n" \
- " c Character special device file\n" \
- " b Block special device file\n" \
- " p Fifo (named pipe)\n" \
- "uid is the user id for the target file, gid is the group id for the\n" \
- "target file. The rest of the entries (major, minor, etc) apply to\n" \
- "to device special files. A '-' may be used for blank entries."
-#define makedevs_example_usage \
- "For example:\n" \
- "<name> <type> <mode><uid><gid><major><minor><start><inc><count>\n" \
- "/dev d 755 0 0 - - - - -\n" \
- "/dev/console c 666 0 0 5 1 - - -\n" \
- "/dev/null c 666 0 0 1 3 0 0 -\n" \
- "/dev/zero c 666 0 0 1 5 0 0 -\n" \
- "/dev/hda b 640 0 0 3 0 0 0 -\n" \
- "/dev/hda b 640 0 0 3 1 1 1 15\n\n" \
- "Will Produce:\n" \
- "/dev\n" \
- "/dev/console\n" \
- "/dev/null\n" \
- "/dev/zero\n" \
- "/dev/hda\n" \
- "/dev/hda[0-15]\n"
-#endif
-
-#define matchpathcon_trivial_usage \
- "[-n] [-N] [-f file_contexts_file] [-p prefix] [-V]"
-#define matchpathcon_full_usage \
- " -n Do not display path" \
- "\n -N Do not use translations" \
- "\n -f Use alternate file_context file" \
- "\n -p Use prefix to speed translations" \
- "\n -V Verify file context on disk matches defaults" \
-
-#define md5sum_trivial_usage \
- "[OPTION] [FILEs...]" \
- USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum [OPTION] -c [FILE]")
-#define md5sum_full_usage \
- "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \
- USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
- "\nOptions:" \
- "\n -c Check MD5 sums against given list" \
- "\n -s Don't output anything, status code shows success" \
- "\n -w Warn about improperly formatted MD5 checksum lines") \
-
-#define md5sum_example_usage \
- "$ md5sum < busybox\n" \
- "6fd11e98b98a58f64ff3398d7b324003\n" \
- "$ md5sum busybox\n" \
- "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
- "$ md5sum -c -\n" \
- "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
- "busybox: OK\n" \
- "^D\n"
-
-#define mdev_trivial_usage \
- "[-s]"
-#define mdev_full_usage \
- " -s Scan /sys and populate /dev during system boot\n" \
- "\n" \
- "Called with no options (via hotplug) it uses environment variables\n" \
- "to determine which device to add/remove."
-
-#define mdev_notes_usage "" \
- USE_FEATURE_MDEV_CONFIG( \
- "The mdev config file contains lines that look like:\n" \
- " hd[a-z][0-9]* 0:3 660\n\n" \
- "That's device name (with regex match), uid:gid, and permissions.\n\n" \
- USE_FEATURE_MDEV_EXEC( \
- "Optionally, that can be followed (on the same line) by a special character\n" \
- "and a command line to run after creating/before deleting the corresponding\n" \
- "device(s). The environment variable $MDEV indicates the active device node\n" \
- "(which is useful if it's a regex match). For example:\n\n" \
- " hdc root:cdrom 660 *ln -s $MDEV cdrom\n\n" \
- "The special characters are @ (run after creating), $ (run before deleting),\n" \
- "and * (run both after creating and before deleting). The commands run in\n" \
- "the /dev directory, and use system() which calls /bin/sh.\n\n" \
- ) \
- "Config file parsing stops on the first matching line. If no config\n" \
- "entry is matched, devices are created with default 0:0 660. (Make\n" \
- "the last line match .* to override this.)\n\n" \
- )
-
-#define mesg_trivial_usage \
- "[y|n]"
-#define mesg_full_usage \
- "Control write access to your terminal\n" \
- " y Allow write access to your terminal\n" \
- " n Disallow write access to your terminal"
-
-#define microcom_trivial_usage \
- "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY"
-#define microcom_full_usage \
- "Copy bytes for stdin to TTY and from TTY to stdout\n" \
- "\nOptions:" \
- "\n -d Wait up to DELAY ms for TTY output before sending every" \
- "\n next byte to it" \
- "\n -t Exit if both stdin and TTY are silent for TIMEOUT ms" \
- "\n -s Set serial line to SPEED" \
- "\n -X Disable special meaning of NUL and Ctrl-X from stdin" \
-
-#define mkdir_trivial_usage \
- "[OPTION] DIRECTORY..."
-#define mkdir_full_usage \
- "Create DIRECTORY\n" \
- "\nOptions:" \
- "\n -m Set permission mode (as in chmod), not rwxrwxrwx - umask" \
- "\n -p No error if existing, make parent directories as needed" \
- USE_SELINUX( \
- "\n -Z Set security context" \
- )
-
-#define mkdir_example_usage \
- "$ mkdir /tmp/foo\n" \
- "$ mkdir /tmp/foo\n" \
- "/tmp/foo: File exists\n" \
- "$ mkdir /tmp/foo/bar/baz\n" \
- "/tmp/foo/bar/baz: No such file or directory\n" \
- "$ mkdir -p /tmp/foo/bar/baz\n"
-
-#define mke2fs_trivial_usage \
- "[-c|-l filename] [-b block-size] [-f fragment-size] [-g blocks-per-group] " \
- "[-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes] [-n] " \
- "[-m reserved-blocks-percentage] [-o creator-os] [-O feature[,...]] [-q] " \
- "[r fs-revision-level] [-E extended-options] [-v] [-F] [-L volume-label] " \
- "[-M last-mounted-directory] [-S] [-T filesystem-type] " \
- "device [blocks-count]"
-#define mke2fs_full_usage \
- " -b size Block size in bytes" \
- "\n -c Check for bad blocks before creating" \
- "\n -E opts Set extended options" \
- "\n -f size Fragment size in bytes" \
- "\n -F Force (ignore sanity checks)" \
- "\n -g num Number of blocks in a block group" \
- "\n -i ratio The bytes/inode ratio" \
- "\n -j Create a journal (ext3)" \
- "\n -J opts Set journal options (size/device)" \
- "\n -l file Read bad blocks list from file" \
- "\n -L lbl Set the volume label" \
- "\n -m percent Percent of fs blocks to reserve for admin" \
- "\n -M dir Set last mounted directory" \
- "\n -n Do not actually create anything" \
- "\n -N num Number of inodes to create" \
- "\n -o os Set the 'creator os' field" \
- "\n -O features Dir_index/filetype/has_journal/journal_dev/sparse_super" \
- "\n -q Quiet" \
- "\n -r rev Set filesystem revision" \
- "\n -S Write superblock and group descriptors only" \
- "\n -T fs-type Set usage type (news/largefile/largefile4)" \
- "\n -v Verbose" \
-
-#define mkfifo_trivial_usage \
- "[OPTIONS] name"
-#define mkfifo_full_usage \
- "Create named pipe (identical to 'mknod name p')\n" \
- "\nOptions:" \
- "\n -m MODE Mode (default a=rw)" \
- USE_SELINUX( \
- "\n -Z Set security context" \
- )
-
-#define mkfs_minix_trivial_usage \
- "[-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]"
-#define mkfs_minix_full_usage \
- "Make a MINIX filesystem\n" \
- "\nOptions:" \
- "\n -c Check device for bad blocks" \
- "\n -n [14|30] Maximum length of filenames" \
- "\n -i INODES Number of inodes for the filesystem" \
- "\n -l FILENAME Read bad blocks list from FILENAME" \
- "\n -v Make version 2 filesystem" \
-
-#define mknod_trivial_usage \
- "[OPTIONS] NAME TYPE MAJOR MINOR"
-#define mknod_full_usage \
- "Create a special file (block, character, or pipe)\n" \
- "\nOptions:" \
- "\n -m Create the special file using the specified mode (default a=rw)" \
- "\nTYPEs include:" \
- "\n b: Make a block device" \
- "\n c or u: Make a character device" \
- "\n p: Make a named pipe (MAJOR and MINOR are ignored)" \
- USE_SELINUX( \
- "\n -Z Set security context" \
- )
-
-#define mknod_example_usage \
- "$ mknod /dev/fd0 b 2 0\n" \
- "$ mknod -m 644 /tmp/pipe p\n"
-
-#define mkswap_trivial_usage \
- "DEVICE"
-#define mkswap_full_usage \
- "Prepare block device to be used as swap partition"
-#if 0
- "[-c] [-v0|-v1] DEVICE [BLOCKS]"
- "\nOptions:"
- "\n -c Check for readability"
- "\n -v0 Make swap version 0 (max 128M)"
- "\n -v1 Make swap version 1 (default for kernels > 2.1.117)"
- "\n BLOCKS Number of blocks to use (default is entire partition)"
-#endif
-
-#define mktemp_trivial_usage \
- "[-dt] [-p DIR] TEMPLATE"
-#define mktemp_full_usage \
- "Create a temporary file with its name based on TEMPLATE.\n" \
- "TEMPLATE is any name with six 'Xs' (i.e., /tmp/temp.XXXXXX).\n" \
- "\nOptions:" \
- "\n -d Make a directory instead of a file" \
-/* "\n -q Fail silently if an error occurs" - we ignore it */ \
- "\n -t Generate a path rooted in temporary directory" \
- "\n -p DIR Use DIR as a temporary directory (implies -t)" \
- "\n" \
- "\n" \
- "For -t or -p, directory is chosen as follows:\n" \
- "$TMPDIR if set, else -p DIR, else /tmp" \
-
-#define mktemp_example_usage \
- "$ mktemp /tmp/temp.XXXXXX\n" \
- "/tmp/temp.mWiLjM\n" \
- "$ ls -la /tmp/temp.mWiLjM\n" \
- "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
-
-#define modprobe_trivial_usage \
- "[-knqrsv] MODULE [symbol=value...]"
-#define modprobe_full_usage \
- "Options:" \
- "\n -k Make module autoclean-able" \
- "\n -n Dry run" \
- "\n -q Quiet" \
- "\n -r Remove module (stacks) or do autoclean" \
- "\n -s Report via syslog instead of stderr" \
- "\n -v Verbose" \
-
-#define modprobe_notes_usage \
-"modprobe can (un)load a stack of modules, passing each module options (when\n" \
-"loading). modprobe uses a configuration file to determine what option(s) to\n" \
-"pass each module it loads.\n" \
-"\n" \
-"The configuration file is searched (in order) amongst:\n" \
-"\n" \
-" /etc/modprobe.conf (2.6 only)\n" \
-" /etc/modules.conf\n" \
-" /etc/conf.modules (deprecated)\n" \
-"\n" \
-"They all have the same syntax (see below). If none is present, it is\n" \
-"_not_ an error; each loaded module is then expected to load without\n" \
-"options. Once a file is found, the others are tested for.\n" \
-"\n" \
-"/etc/modules.conf entry format:\n" \
-"\n" \
-" alias <alias_name> <mod_name>\n" \
-" Makes it possible to modprobe alias_name, when there is no such module.\n" \
-" It makes sense if your mod_name is long, or you want a more representative\n" \
-" name for that module (eg. 'scsi' in place of 'aha7xxx').\n" \
-" This makes it also possible to use a different set of options (below) for\n" \
-" the module and the alias.\n" \
-" A module can be aliased more than once.\n" \
-"\n" \
-" options <mod_name|alias_name> <symbol=value...>\n" \
-" When loading module mod_name (or the module aliased by alias_name), pass\n" \
-" the \"symbol=value\" pairs as option to that module.\n" \
-"\n" \
-"Sample /etc/modules.conf file:\n" \
-"\n" \
-" options tulip irq=3\n" \
-" alias tulip tulip2\n" \
-" options tulip2 irq=4 io=0x308\n" \
-"\n" \
-"Other functionality offered by 'classic' modprobe is not available in\n" \
-"this implementation.\n" \
-"\n" \
-"If module options are present both in the config file, and on the command line,\n" \
-"then the options from the command line will be passed to the module _after_\n" \
-"the options from the config file. That way, you can have defaults in the config\n" \
-"file, and override them for a specific usage from the command line.\n"
-#define modprobe_example_usage \
- "(with the above /etc/modules.conf):\n\n" \
- "$ modprobe tulip\n" \
- " will load the module 'tulip' with default option 'irq=3'\n\n" \
- "$ modprobe tulip irq=5\n" \
- " will load the module 'tulip' with option 'irq=5', thus overriding the default\n\n" \
- "$ modprobe tulip2\n" \
- " will load the module 'tulip' with default options 'irq=4 io=0x308',\n" \
- " which are the default for alias 'tulip2'\n\n" \
- "$ modprobe tulip2 irq=8\n" \
- " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=8',\n" \
- " which are the default for alias 'tulip2' overridden by the option 'irq=8'\n\n" \
- " from the command line\n\n" \
- "$ modprobe tulip2 irq=2 io=0x210\n" \
- " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=4 io=0x210',\n" \
- " which are the default for alias 'tulip2' overridden by the options 'irq=2 io=0x210'\n\n" \
- " from the command line\n"
-
-#define more_trivial_usage \
- "[FILE...]"
-#define more_full_usage \
- "View FILE or standard input one screenful at a time"
-
-#define more_example_usage \
- "$ dmesg | more\n"
-
-#define mount_trivial_usage \
- "[flags] DEVICE NODE [-o options,more-options]"
-#define mount_full_usage \
- "Mount a filesystem. Filesystem autodetection requires /proc be mounted.\n" \
- "\nOptions:" \
- "\n -a Mount all filesystems in fstab" \
- USE_FEATURE_MOUNT_FAKE( \
- "\n -f "USE_FEATURE_MTAB_SUPPORT("Update /etc/mtab, but ")"don't mount" \
- ) \
- USE_FEATURE_MTAB_SUPPORT( \
- "\n -n Don't update /etc/mtab" \
- ) \
- "\n -r Read-only mount" \
- "\n -t fs-type Filesystem type" \
- "\n -w Read-write mount (default)" \
- "\n" \
- "-o option:\n" \
- USE_FEATURE_MOUNT_LOOP( \
- " loop Ignored (loop devices are autodetected)\n" \
- ) \
- USE_FEATURE_MOUNT_FLAGS( \
- " [a]sync Writes are asynchronous / synchronous\n" \
- " [no]atime Disable / enable updates to inode access times\n" \
- " [no]diratime Disable / enable atime updates to directories\n" \
- " [no]dev Allow use of special device files / disallow them\n" \
- " [no]exec Allow use of executable files / disallow them\n" \
- " [no]suid Allow set-user-id-root programs / disallow them\n" \
- " [r]shared Convert [recursively] to a shared subtree\n" \
- " [r]slave Convert [recursively] to a slave subtree\n" \
- " [r]private Convert [recursively] to a private subtree\n" \
- " [un]bindable Make mount point [un]able to be bind mounted\n" \
- " bind Bind a directory to an additional location\n" \
- " move Relocate an existing mount point\n" \
- ) \
- " remount Remount a mounted filesystem, changing its flags\n" \
- " ro/rw Mount for read-only / read-write\n" \
- "\n" \
- "There are EVEN MORE flags that are specific to each filesystem\n" \
- "You'll have to see the written documentation for those filesystems" \
-
-#define mount_example_usage \
- "$ mount\n" \
- "/dev/hda3 on / type minix (rw)\n" \
- "proc on /proc type proc (rw)\n" \
- "devpts on /dev/pts type devpts (rw)\n" \
- "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \
- "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" \
- "$ mount cd_image.iso mydir\n"
-#define mount_notes_usage \
- "Returns 0 for success, number of failed mounts for -a, or errno for one mount."
-
-#define mountpoint_trivial_usage \
- "[-q] <[-d] DIR | -x DEVICE>"
-#define mountpoint_full_usage \
- "mountpoint checks if the directory is a mountpoint\n" \
- "\nOptions:" \
- "\n -q Quiet" \
- "\n -d Print major/minor device number of the filesystem" \
- "\n -x Print major/minor device number of the blockdevice" \
-
-#define mountpoint_example_usage \
- "$ mountpoint /proc\n" \
- "/proc is not a mountpoint\n" \
- "$ mountpoint /sys\n" \
- "/sys is a mountpoint\n"
-
-#define mt_trivial_usage \
- "[-f device] opcode value"
-#define mt_full_usage \
- "Control magnetic tape drive operation\n" \
- "\n" \
- "Available Opcodes:\n" \
- "\n" \
- "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \
- "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \
- "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \
- "setpart tell unload unlock weof wset" \
-
-#define mv_trivial_usage \
- "[OPTION]... SOURCE DEST\n" \
- "or: mv [OPTION]... SOURCE... DIRECTORY"
-#define mv_full_usage \
- "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY\n" \
- "\nOptions:" \
- "\n -f Don't prompt before overwriting" \
- "\n -i Interactive, prompt before overwrite" \
-
-#define mv_example_usage \
- "$ mv /tmp/foo /bin/bar\n"
-
-#define nameif_trivial_usage \
- "[-s] [-c FILE] [{IFNAME MACADDR}]"
-#define nameif_full_usage \
- "Rename network interface while it in the down state\n" \
- "\nOptions:" \
- "\n -c FILE Use configuration file (default is /etc/mactab)" \
- "\n -s Use syslog (LOCAL0 facility)" \
- "\n IFNAME MACADDR new_interface_name interface_mac_address" \
-
-#define nameif_example_usage \
- "$ nameif -s dmz0 00:A0:C9:8C:F6:3F\n" \
- " or\n" \
- "$ nameif -c /etc/my_mactab_file\n" \
-
-#if !ENABLE_DESKTOP
-
-#if ENABLE_NC_SERVER || ENABLE_NC_EXTRA
-#define NC_OPTIONS_STR "\n\nOptions:"
-#else
-#define NC_OPTIONS_STR
-#endif
-
-#define nc_trivial_usage \
- USE_NC_EXTRA("[-iN] [-wN] ")USE_NC_SERVER("[-l] [-p PORT] ") \
- "["USE_NC_EXTRA("-f FILENAME|")"IPADDR PORTNUM]"USE_NC_EXTRA(" [-e COMMAND]")
-#define nc_full_usage \
- "Open a pipe to IP:port" USE_NC_EXTRA(" or file") \
- NC_OPTIONS_STR \
- USE_NC_EXTRA( \
- "\n -e Exec rest of command line after connect" \
- "\n -i SECS Delay interval for lines sent" \
- "\n -w SECS Timeout for connect" \
- "\n -f FILE Use file (ala /dev/ttyS0) instead of network" \
- ) \
- USE_NC_SERVER( \
- "\n -l Listen mode, for inbound connects" \
- USE_NC_EXTRA( \
- "\n (use -l twice with -e for persistent server)") \
- "\n -p PORT Local port number" \
- )
-
-#define nc_notes_usage "" \
- USE_NC_EXTRA( \
- "To use netcat as a terminal emulator on a serial port:\n\n" \
- "$ stty 115200 -F /dev/ttyS0\n" \
- "$ stty raw -echo -ctlecho && nc -f /dev/ttyS0\n" \
- )
-
-#define nc_example_usage \
- "$ nc foobar.somedomain.com 25\n" \
- "220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600\n" \
- "help\n" \
- "214-Commands supported:\n" \
- "214- HELO EHLO MAIL RCPT DATA AUTH\n" \
- "214 NOOP QUIT RSET HELP\n" \
- "quit\n" \
- "221 foobar closing connection\n"
-
-#else /* DESKTOP nc - much more compatible with nc 1.10 */
-
-#define nc_trivial_usage \
- "[-options] hostname port - connect" \
- USE_NC_SERVER("\n" \
- "nc [-options] -l -p port [hostname] [port] - listen")
-#define nc_full_usage \
- "Options:" \
- "\n -e prog [args] Program to exec after connect (must be last)" \
- USE_NC_SERVER( \
- "\n -l Listen mode, for inbound connects" \
- ) \
- "\n -n Don't do DNS resolution" \
- "\n -s addr Local address" \
- "\n -p port Local port" \
- "\n -u UDP mode" \
- "\n -v Verbose (cumulative: -vv)" \
- "\n -w secs Timeout for connects and final net reads" \
- USE_NC_EXTRA( \
- "\n -i sec Delay interval for lines sent" /* ", ports scanned" */ \
- "\n -o file Hex dump of traffic" \
- "\n -z Zero-I/O mode (scanning)" \
- ) \
-/* "\n -r Randomize local and remote ports" */
-/* "\n -g gateway Source-routing hop point[s], up to 8" */
-/* "\n -G num Source-routing pointer: 4, 8, 12, ..." */
-/* "\nport numbers can be individual or ranges: lo-hi [inclusive]" */
-
-#endif
-
-#define netstat_trivial_usage \
- "[-laentuwxr"USE_FEATURE_NETSTAT_WIDE("W")"]"
-#define netstat_full_usage \
- "Display networking information\n" \
- "\nOptions:" \
- "\n -l Display listening server sockets" \
- "\n -a Display all sockets (default: connected)" \
- "\n -e Display other/more information" \
- "\n -n Don't resolve names" \
- "\n -t Tcp sockets" \
- "\n -u Udp sockets" \
- "\n -w Raw sockets" \
- "\n -x Unix sockets" \
- "\n -r Display routing table" \
- USE_FEATURE_NETSTAT_WIDE( \
- "\n -W Display with no column truncation" \
- )
-
-#define nice_trivial_usage \
- "[-n ADJUST] [COMMAND [ARG]...]"
-#define nice_full_usage \
- "Run a program with modified scheduling priority\n" \
- "\nOptions:" \
- "\n -n ADJUST Adjust the scheduling priority by ADJUST" \
-
-#define nmeter_trivial_usage \
- "format_string"
-#define nmeter_full_usage \
- "Monitor system in real time\n\n" \
- "Format specifiers:\n" \
- "%Nc or %[cN] Monitor CPU. N - bar size, default 10\n" \
- " (displays: S:system U:user N:niced D:iowait I:irq i:softirq)\n" \
- "%[niface] Monitor network interface 'iface'\n" \
- "%m Monitor allocated memory\n" \
- "%[mf] Monitor free memory\n" \
- "%[mt] Monitor total memory\n" \
- "%s Monitor allocated swap\n" \
- "%f Monitor number of used file descriptors\n" \
- "%Ni Monitor total/specific IRQ rate\n" \
- "%x Monitor context switch rate\n" \
- "%p Monitor forks\n" \
- "%[pn] Monitor # of processes\n" \
- "%b Monitor block io\n" \
- "%Nt Show time (with N decimal points)\n" \
- "%Nd Milliseconds between updates (default=1000)\n" \
- "%r Print <cr> instead of <lf> at EOL" \
-
-#define nmeter_example_usage \
- "nmeter '%250d%t %20c int %i bio %b mem %m forks%p'"
-
-#define nohup_trivial_usage \
- "COMMAND [ARGS]"
-#define nohup_full_usage \
- "Run a command immune to hangups, with output to a non-tty"
-#define nohup_example_usage \
- "$ nohup make &"
-
-#define nslookup_trivial_usage \
- "[HOST] [SERVER]"
-#define nslookup_full_usage \
- "Query the nameserver for the IP address of the given HOST\n" \
- "optionally using a specified DNS server"
-#define nslookup_example_usage \
- "$ nslookup localhost\n" \
- "Server: default\n" \
- "Address: default\n" \
- "\n" \
- "Name: debian\n" \
- "Address: 127.0.0.1\n"
-
-#define od_trivial_usage \
- "[-aBbcDdeFfHhIiLlOovXx] " USE_DESKTOP("[-t TYPE] ") "[FILE]"
-#define od_full_usage \
- "Write an unambiguous representation, octal bytes by default, of FILE\n" \
- "to standard output. With no FILE or when FILE is -, read standard input."
-
-#define openvt_trivial_usage \
- "VTNUM COMMAND [ARGS...]"
-#define openvt_full_usage \
- "Start a command on a new virtual terminal"
-#define openvt_example_usage \
- "openvt 2 /bin/ash\n"
-
-#define passwd_trivial_usage \
- "[OPTION] [name]"
-#define passwd_full_usage \
- "Change user's password. If no name is specified,\n" \
- "changes the password for the current user.\n" \
- "\nOptions:" \
- "\n -a Algorithm to use for password (choices: des, md5)" /* ", sha1)" */ \
- "\n -d Delete password for the account" \
- "\n -l Lock (disable) account" \
- "\n -u Unlock (re-enable) account" \
-
-#define chpasswd_trivial_usage \
- USE_GETOPT_LONG("[--md5|--encrypt]") SKIP_GETOPT_LONG("[-m|-e]")
-#define chpasswd_full_usage \
- "Read user:password information from stdin\n" \
- "and update /etc/passwd accordingly.\n" \
- "\nOptions:" \
- USE_GETOPT_LONG( \
- "\n -e,--encrypt Supplied passwords are in encrypted form" \
- "\n -m,--md5 Use MD5 encryption instead of DES" \
- ) \
- SKIP_GETOPT_LONG( \
- "\n -e Supplied passwords are in encrypted form" \
- "\n -m Use MD5 encryption instead of DES" \
- )
-
-#define patch_trivial_usage \
- "[-p NUM] [-i DIFF]"
-#define patch_full_usage \
- " -p NUM Strip NUM leading components from file names" \
- "\n -i DIFF Read DIFF instead of stdin" \
-
-#define patch_example_usage \
- "$ patch -p1 < example.diff\n" \
- "$ patch -p0 -i example.diff"
-
-#define pgrep_trivial_usage \
- "[-flnovx] pattern"
-#define pgrep_full_usage \
- "Display process(es) selected by regex pattern\n" \
- "\nOptions:" \
- "\n -l Show command name too" \
- "\n -f Match against entire command line" \
- "\n -n Show the newest process only" \
- "\n -o Show the oldest process only" \
- "\n -v Negate the matching" \
- "\n -x Match whole name (not substring)" \
-
-#if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
-#define pidof_trivial_usage \
- "[OPTION] [NAME...]"
-#define USAGE_PIDOF "\n\nOptions:"
-#else
-#define pidof_trivial_usage \
- "[NAME...]"
-#define USAGE_PIDOF /* none */
-#endif
-#define pidof_full_usage \
- "List PIDs of all processes with names that match NAMEs" \
- USAGE_PIDOF \
- USE_FEATURE_PIDOF_SINGLE( \
- "\n -s Show only one PID") \
- USE_FEATURE_PIDOF_OMIT( \
- "\n -o PID Omit given pid" \
- "\n Use %PPID to omit pid of pidof's parent") \
-
-#define pidof_example_usage \
- "$ pidof init\n" \
- "1\n" \
- USE_FEATURE_PIDOF_OMIT( \
- "$ pidof /bin/sh\n20351 5973 5950\n") \
- USE_FEATURE_PIDOF_OMIT( \
- "$ pidof /bin/sh -o %PPID\n20351 5950")
-
-#if !ENABLE_FEATURE_FANCY_PING
-#define ping_trivial_usage \
- "host"
-#define ping_full_usage \
- "Send ICMP ECHO_REQUEST packets to network hosts"
-#define ping6_trivial_usage \
- "host"
-#define ping6_full_usage \
- "Send ICMP ECHO_REQUEST packets to network hosts"
-#else
-#define ping_trivial_usage \
- "[OPTION]... host"
-#define ping_full_usage \
- "Send ICMP ECHO_REQUEST packets to network hosts\n" \
- "\nOptions:" \
- "\n -4, -6 Force IPv4 or IPv6 hostname resolution" \
- "\n -c CNT Send only CNT pings" \
- "\n -s SIZE Send SIZE data bytes in packets (default=56)" \
- "\n -I iface/IP Use interface or IP address as source" \
- "\n -q Quiet, only displays output at start" \
- "\n and when finished" \
-
-#define ping6_trivial_usage \
- "[OPTION]... host"
-#define ping6_full_usage \
- "Send ICMP ECHO_REQUEST packets to network hosts\n" \
- "\nOptions:" \
- "\n -c CNT Send only CNT pings" \
- "\n -s SIZE Send SIZE data bytes in packets (default=56)" \
- "\n -I iface/IP Use interface or IP address as source" \
- "\n -q Quiet, only displays output at start" \
- "\n and when finished" \
-
-#endif
-#define ping_example_usage \
- "$ ping localhost\n" \
- "PING slag (127.0.0.1): 56 data bytes\n" \
- "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \
- "\n" \
- "--- debian ping statistics ---\n" \
- "1 packets transmitted, 1 packets received, 0% packet loss\n" \
- "round-trip min/avg/max = 20.1/20.1/20.1 ms\n"
-#define ping6_example_usage \
- "$ ping6 ip6-localhost\n" \
- "PING ip6-localhost (::1): 56 data bytes\n" \
- "64 bytes from ::1: icmp6_seq=0 ttl=64 time=20.1 ms\n" \
- "\n" \
- "--- ip6-localhost ping statistics ---\n" \
- "1 packets transmitted, 1 packets received, 0% packet loss\n" \
- "round-trip min/avg/max = 20.1/20.1/20.1 ms\n"
-
-#define pivot_root_trivial_usage \
- "NEW_ROOT PUT_OLD"
-#define pivot_root_full_usage \
- "Move the current root file system to PUT_OLD and make NEW_ROOT\n" \
- "the new root file system"
-
-#define pkill_trivial_usage \
- "[-l] | [-fnovx] [-signal] pattern"
-#define pkill_full_usage \
- "Send a signal to process(es) selected by regex pattern\n" \
- "\nOptions:" \
- "\n -l List all signals" \
- "\n -f Match against entire command line" \
- "\n -n Signal the newest process only" \
- "\n -o Signal the oldest process only" \
- "\n -v Negate the matching" \
- "\n -x Match whole name (not substring)" \
-
-#define poweroff_trivial_usage \
- "[-d delay] [-n] [-f]"
-#define poweroff_full_usage \
- "Halt and shut off power\n" \
- "\nOptions:" \
- "\n -d Delay interval for halting" \
- "\n -n No call to sync()" \
- "\n -f Force power off (don't go through init)" \
-
-#define printenv_trivial_usage \
- "[VARIABLES...]"
-#define printenv_full_usage \
- "Print all or part of environment.\n" \
- "If no environment VARIABLE specified, print them all."
-
-#define printf_trivial_usage \
- "FORMAT [ARGUMENT...]"
-#define printf_full_usage \
- "Format and print ARGUMENT(s) according to FORMAT,\n" \
- "where FORMAT controls the output exactly as in C printf"
-#define printf_example_usage \
- "$ printf \"Val=%d\\n\" 5\n" \
- "Val=5\n"
-
-
-#if ENABLE_DESKTOP
-
-#define ps_trivial_usage \
- ""
-#define ps_full_usage \
- "Report process status\n" \
- "\nOptions:" \
- "\n -o col1,col2=header Select columns for display" \
-
-#else /* !ENABLE_DESKTOP */
-
-#if !ENABLE_SELINUX && !ENABLE_FEATURE_PS_WIDE
-#define USAGE_PS "\nThis version of ps accepts no options"
-#else
-#define USAGE_PS "\nOptions:"
-#endif
-
-#define ps_trivial_usage \
- ""
-#define ps_full_usage \
- "Report process status\n" \
- USAGE_PS \
- USE_SELINUX( \
- "\n -Z Show SE Linux context" \
- ) \
- USE_FEATURE_PS_WIDE( \
- "\n w Wide output" \
- )
-
-#endif /* ENABLE_DESKTOP */
-
-#define ps_example_usage \
- "$ ps\n" \
- " PID Uid Gid State Command\n" \
- " 1 root root S init\n" \
- " 2 root root S [kflushd]\n" \
- " 3 root root S [kupdate]\n" \
- " 4 root root S [kpiod]\n" \
- " 5 root root S [kswapd]\n" \
- " 742 andersen andersen S [bash]\n" \
- " 743 andersen andersen S -bash\n" \
- " 745 root root S [getty]\n" \
- " 2990 andersen andersen R ps\n"
-
-#define pscan_trivial_usage \
- "[-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST"
-#define pscan_full_usage \
- "Scan a host, print all open ports\n" \
- "\nOptions:" \
- "\n -p Scan from this port (default 1)" \
- "\n -P Scan up to this port (default 1024)" \
- "\n -t Timeout (default 5000 ms)" \
- "\n -T Minimum rtt (default 5 ms, increase for congested hosts)" \
-
-#define pwd_trivial_usage \
- ""
-#define pwd_full_usage \
- "Print the full filename of the current working directory"
-#define pwd_example_usage \
- "$ pwd\n" \
- "/root\n"
-
-#define raidautorun_trivial_usage \
- "DEVICE"
-#define raidautorun_full_usage \
- "Tell the kernel to automatically search and start RAID arrays"
-#define raidautorun_example_usage \
- "$ raidautorun /dev/md0"
-
-#define rdate_trivial_usage \
- "[-sp] HOST"
-#define rdate_full_usage \
- "Get and possibly set the system date and time from a remote HOST\n" \
- "\nOptions:" \
- "\n -s Set the system date and time (default)" \
- "\n -p Print the date and time" \
-
-#define readahead_trivial_usage \
- "[FILE]..."
-#define readahead_full_usage \
- "Preload FILE(s) in RAM cache so that subsequent reads for those" \
- "files do not block on disk I/O"
-
-#define readlink_trivial_usage \
- USE_FEATURE_READLINK_FOLLOW("[-f] ") "FILE"
-#define readlink_full_usage \
- "Display the value of a symlink" \
- USE_FEATURE_READLINK_FOLLOW( "\n" \
- "\nOptions:" \
- "\n -f Canonicalize by following all symlinks") \
-
-#define readprofile_trivial_usage \
- "[OPTIONS]..."
-#define readprofile_full_usage \
- "Options:" \
- "\n -m mapfile (Default: /boot/System.map)" \
- "\n -p profile (Default: /proc/profile)" \
- "\n -M mult Set the profiling multiplier to mult" \
- "\n -i Print only info about the sampling step" \
- "\n -v Verbose" \
- "\n -a Print all symbols, even if count is 0" \
- "\n -b Print individual histogram-bin counts" \
- "\n -s Print individual counters within functions" \
- "\n -r Reset all the counters (root only)" \
- "\n -n Disable byte order auto-detection" \
-
-#define realpath_trivial_usage \
- "pathname..."
-#define realpath_full_usage \
- "Return the absolute pathnames of given argument"
-
-#define reboot_trivial_usage \
- "[-d delay] [-n] [-f]"
-#define reboot_full_usage \
- "Reboot the system\n" \
- "\nOptions:" \
- "\n -d Delay interval for rebooting" \
- "\n -n No call to sync()" \
- "\n -f Force reboot (don't go through init)" \
-
-#define renice_trivial_usage \
- "{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]"
-#define renice_full_usage \
- "Change priority of running processes\n" \
- "\nOptions:" \
- "\n -n Adjust current nice value (smaller is faster)" \
- "\n -p Process id(s) (default)" \
- "\n -g Process group id(s)" \
- "\n -u Process user name(s) and/or id(s)" \
-
-#define reset_trivial_usage \
- ""
-#define reset_full_usage \
- "Reset the screen"
-
-#define resize_trivial_usage \
- ""
-#define resize_full_usage \
- "Resize the screen"
-
-#define restorecon_trivial_usage \
- "[-iFnrRv] [-e excludedir]... [-o filename] [-f filename | pathname]"
-#define restorecon_full_usage \
- "Reset security contexts of files in pathname\n" \
- "\n -i Ignore files that do not exist" \
- "\n -f file File with list of files to process. Use - for stdin" \
- "\n -e directory Directory to exclude" \
- "\n -R,-r Recurse directories" \
- "\n -n Don't change any file labels" \
- "\n -o file Save list of files with incorrect context" \
- "\n -v Verbose" \
- "\n -vv Show changed labels" \
- "\n -F Force reset of context to match file_context" \
- "\n for customizable files, or the user section," \
- "\n if it has changed" \
-
-#define rm_trivial_usage \
- "[OPTION]... FILE..."
-#define rm_full_usage \
- "Remove (unlink) the FILE(s). Use '--' to\n" \
- "indicate that all following arguments are non-options.\n" \
- "\nOptions:" \
- "\n -i Always prompt before removing" \
- "\n -f Never prompt" \
- "\n -r,-R Remove directories recursively" \
-
-#define rm_example_usage \
- "$ rm -rf /tmp/foo\n"
-
-#define rmdir_trivial_usage \
- "[OPTION]... DIRECTORY..."
-#define rmdir_full_usage \
- "Remove the DIRECTORY, if it is empty"
-#define rmdir_example_usage \
- "# rmdir /tmp/foo\n"
-
-#define rmmod_trivial_usage \
- "[OPTION]... [MODULE]..."
-#define rmmod_full_usage \
- "Unload the specified kernel modules from the kernel\n" \
- "\nOptions:" \
- "\n -a Remove all unused modules (recursively)" \
-
-#define rmmod_example_usage \
- "$ rmmod tulip\n"
-
-#define route_trivial_usage \
- "[{add|del|delete}]"
-#define route_full_usage \
- "Edit the kernel's routing tables\n" \
- "\nOptions:" \
- "\n -n Dont resolve names" \
- "\n -e Display other/more information" \
- "\n -A inet" USE_FEATURE_IPV6("{6}") " Select address family" \
-
-#define rpm_trivial_usage \
- "-i -q[ildc]p package.rpm"
-#define rpm_full_usage \
- "Manipulate RPM packages\n" \
- "\nOptions:" \
- "\n -i Install package" \
- "\n -q Query package" \
- "\n -p Query uninstalled package" \
- "\n -i Show information" \
- "\n -l List contents" \
- "\n -d List documents" \
- "\n -c List config files" \
-
-#define rpm2cpio_trivial_usage \
- "package.rpm"
-#define rpm2cpio_full_usage \
- "Output a cpio archive of the rpm file"
-
-#define rtcwake_trivial_usage \
- "[-a | -l | -u] [-d DEV] [-m MODE] [-s SECS | -t TIME]"
-#define rtcwake_full_usage \
- "Enter a system sleep state until specified wakeup time\n" \
- USE_GETOPT_LONG( \
- "\n -a,--auto Read clock mode from adjtime" \
- "\n -l,--local Clock is set to local time" \
- "\n -u,--utc Clock is set to UTC time" \
- "\n -d,--device=DEV Specify the RTC device" \
- "\n -m,--mode=MODE Set the sleep state (default: standby)" \
- "\n -s,--seconds=SEC Set the timeout in SEC seconds from now" \
- "\n -t,--time=TIME Set the timeout to TIME seconds from epoch" \
- ) \
- SKIP_GETOPT_LONG( \
- "\n -a Read clock mode from adjtime" \
- "\n -l Clock is set to local time" \
- "\n -u Clock is set to UTC time" \
- "\n -d DEV Specify the RTC device" \
- "\n -m MODE Set the sleep state (default: standby)" \
- "\n -s SEC Set the timeout in SEC seconds from now" \
- "\n -t TIME Set the timeout to TIME seconds from epoch" \
- )
-
-#define runcon_trivial_usage \
- "[-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n" \
- " runcon CONTEXT COMMAND [args]"
-#define runcon_full_usage \
- "Run a program in a different security context\n" \
- "\n CONTEXT Complete security context\n" \
- USE_GETOPT_LONG( \
- "\n -c,--compute Compute process transition context before modifying" \
- "\n -t,--type=TYPE Type (for same role as parent)" \
- "\n -u,--user=USER User identity" \
- "\n -r,--role=ROLE Role" \
- "\n -l,--range=RNG Levelrange" \
- ) \
- SKIP_GETOPT_LONG( \
- "\n -c Compute process transition context before modifying" \
- "\n -t TYPE Type (for same role as parent)" \
- "\n -u USER User identity" \
- "\n -r ROLE Role" \
- "\n -l RNG Levelrange" \
- )
-
-#define run_parts_trivial_usage \
- "[-t] "USE_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY"
-#define run_parts_full_usage \
- "Run a bunch of scripts in a directory\n" \
- "\nOptions:" \
- "\n -t Print what would be run, but don't actually run anything" \
- "\n -a ARG Pass ARG as argument for every program" \
- "\n -u MASK Set the umask to MASK before running every program" \
- USE_FEATURE_RUN_PARTS_FANCY( \
- "\n -l Print names of all matching files even if they are not executable" \
- )
-
-#define run_parts_example_usage \
- "$ run-parts -a start /etc/init.d\n" \
- "$ run-parts -a stop=now /etc/init.d\n\n" \
- "Let's assume you have a script foo/dosomething:\n" \
- "#!/bin/sh\n" \
- "for i in $*; do eval $i; done; unset i\n" \
- "case \"$1\" in\n" \
- "start*) echo starting something;;\n" \
- "stop*) set -x; shutdown -h $stop;;\n" \
- "esac\n\n" \
- "Running this yields:\n" \
- "$run-parts -a stop=+4m foo/\n" \
- "+ shutdown -h +4m"
-
-#define runlevel_trivial_usage \
- "[utmp]"
-#define runlevel_full_usage \
- "Find the current and previous system runlevel.\n\n" \
- "If no utmp file exists or if no runlevel record can be found,\n" \
- "print \"unknown\""
-#define runlevel_example_usage \
- "$ runlevel /var/run/utmp\n" \
- "N 2"
-
-#define runsv_trivial_usage \
- "dir"
-#define runsv_full_usage \
- "Start and monitor a service and optionally an appendant log service"
-
-#define runsvdir_trivial_usage \
- "[-P] dir"
-#define runsvdir_full_usage \
- "Start a runsv process for each subdirectory"
-
-#define rx_trivial_usage \
- "FILE"
-#define rx_full_usage \
- "Receive a file using the xmodem protocol"
-#define rx_example_usage \
- "$ rx /tmp/foo\n"
-
-#define script_trivial_usage \
- "[-afq] [-c COMMAND] [OUTFILE]"
-#define script_full_usage \
- "Options:" \
- "\n -a Append output" \
- "\n -c Run COMMAND, not shell" \
- "\n -f Flush output after each write" \
- "\n -q Quiet" \
-
-#define sed_trivial_usage \
- "[-efinr] pattern [files...]"
-#define sed_full_usage \
- "Options:" \
- "\n -e script Add the script to the commands to be executed" \
- "\n -f scriptfile Add scriptfile contents to the" \
- "\n commands to be executed" \
- "\n -i Edit files in-place" \
- "\n -n Suppress automatic printing of pattern space" \
- "\n -r Use extended regular expression syntax" \
- "\n" \
- "\nIf no -e or -f is given, the first non-option argument is taken as the sed" \
- "\nscript to interpret. All remaining arguments are names of input files; if no" \
- "\ninput files are specified, then the standard input is read. Source files" \
- "\nwill not be modified unless -i option is given." \
-
-#define sed_example_usage \
- "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \
- "bar\n"
-
-#define selinuxenabled_trivial_usage
-#define selinuxenabled_full_usage
-
-#define sendmail_trivial_usage \
- "[-w timeout] [-U user] [-P password] [-X]\n" \
- "-t to [-t to]... [-n] [-s subject] [-c charset] server[:port] from [body] [attachment ...]"
-#define sendmail_full_usage \
- "Send an email.\n" \
- "\nOptions:" \
- "\n -w timeout Set timeout on network operations" \
- "\n -U username Authenticate with specified username/password" \
- "\n -P password" \
- "\n -t address Recipient(s). May be repeated" \
- "\n -X Use openssl connection helper for secured servers" \
- "\n -n Request delivery notification to sender" \
- "\n -s subject Subject" \
- "\n -c charset Assumed charset for body and subject [utf-8]" \
-
-#define seq_trivial_usage \
- "[first [increment]] last"
-#define seq_full_usage \
- "Print numbers from FIRST to LAST, in steps of INCREMENT.\n" \
- "FIRST, INCREMENT default to 1" \
- "\n\nArguments:\n" \
- " LAST\n" \
- " FIRST LAST\n" \
- " FIRST INCREMENT LAST"
-
-#define sestatus_trivial_usage \
- "[-vb]"
-#define sestatus_full_usage \
- " -v Verbose" \
- "\n -b Display current state of booleans" \
-
-#define setconsole_trivial_usage \
- "[-r" USE_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]"
-#define setconsole_full_usage \
- "Redirect system console output to DEVICE (default: /dev/tty)\n" \
- "\nOptions:" \
- "\n -r Reset output to /dev/console" \
-
-#define setenforce_trivial_usage \
- "[Enforcing | Permissive | 1 | 0]"
-#define setenforce_full_usage
-
-#define setfiles_trivial_usage \
- "[-dnpqsvW] [-e dir]... [-o file] [-r alt_root_path]" \
- USE_FEATURE_SETFILES_CHECK_OPTION( \
- " [-c policyfile] spec_file" \
- ) \
- " pathname"
-#define setfiles_full_usage \
- "Reset file contexts under pathname according to spec_file\n" \
- USE_FEATURE_SETFILES_CHECK_OPTION( \
- "\n -c file Check the validity of the contexts against the specified binary policy" \
- ) \
- "\n -d Show which specification matched each file" \
- "\n -l Log changes in file labels to syslog" \
- "\n -n Don't change any file labels" \
- "\n -q Suppress warnings" \
- "\n -r dir Use an altenate root path" \
- "\n -e dir Exclude directory" \
- "\n -F Force reset of context to match file_context for customizable files" \
- "\n -o file Save list of files with incorrect context" \
- "\n -s Take a list of files from standard input (instead of command line)" \
- "\n -v Show changes in file labels, if type or role are changing" \
- "\n -vv Show changes in file labels, if type, role, or user are changing" \
- "\n -W Display warnings about entries that had no matching files" \
-
-#define setkeycodes_trivial_usage \
- "SCANCODE KEYCODE..."
-#define setkeycodes_full_usage \
- "Set entries into the kernel's scancode-to-keycode map,\n" \
- "allowing unusual keyboards to generate usable keycodes.\n\n" \
- "SCANCODE may be either xx or e0xx (hexadecimal),\n" \
- "and KEYCODE is given in decimal" \
-
-#define setkeycodes_example_usage \
- "$ setkeycodes e030 127\n"
-
-#define setlogcons_trivial_usage \
- "N"
-#define setlogcons_full_usage \
- "Redirect the kernel output to console N (0 for current)"
-
-#define setsebool_trivial_usage \
- "boolean value"
-
-#define setsebool_full_usage \
- "Change boolean setting"
-
-#define setsid_trivial_usage \
- "PROG [ARG...]"
-#define setsid_full_usage \
- "Run PROG in a new session. PROG will have no controlling terminal\n" \
- "and will not be affected by keyboard signals (Ctrl-C etc).\n" \
- "See setsid(2) for details." \
-
-#define lash_trivial_usage \
- "[FILE]...\n" \
- "or: sh -c command [args]..."
-#define lash_full_usage \
- "lash is deprecated, please use hush"
-
-#define last_trivial_usage \
- ""
-#define last_full_usage \
- "Show listing of the last users that logged into the system"
-
-#define sha1sum_trivial_usage \
- "[OPTION] [FILEs...]" \
- USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTION] -c [FILE]")
-#define sha1sum_full_usage \
- "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
- USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
- "\nOptions:" \
- "\n -c Check SHA1 sums against given list" \
- "\n -s Don't output anything, status code shows success" \
- "\n -w Warn about improperly formatted SHA1 checksum lines" \
- )
-
-#define slattach_trivial_usage \
- "[-cehmLF] [-s speed] [-p protocol] DEVICEs"
-#define slattach_full_usage \
- "Attach network interface(s) to serial line(s)\n" \
- "\nOptions:" \
- "\n -p Set protocol (slip, cslip, slip6, clisp6 or adaptive)" \
- "\n -s Set line speed" \
- "\n -e Exit after initializing device" \
- "\n -h Exit when the carrier is lost" \
- "\n -c Execute a command when the line is hung up" \
- "\n -m Do NOT initialize the line in raw 8 bits mode" \
- "\n -L Enable 3-wire operation" \
- "\n -F Disable RTS/CTS flow control" \
-
-#define sleep_trivial_usage \
- USE_FEATURE_FANCY_SLEEP("[") "N" USE_FEATURE_FANCY_SLEEP("]...")
-#define sleep_full_usage \
- SKIP_FEATURE_FANCY_SLEEP("Pause for N seconds") \
- USE_FEATURE_FANCY_SLEEP( \
- "Pause for a time equal to the total of the args given, where each arg can\n" \
- "have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays")
-#define sleep_example_usage \
- "$ sleep 2\n" \
- "[2 second delay results]\n" \
- USE_FEATURE_FANCY_SLEEP( \
- "$ sleep 1d 3h 22m 8s\n" \
- "[98528 second delay results]\n")
-
-#define sort_trivial_usage \
- "[-nru" \
- USE_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") \
- "] [FILE]..."
-#define sort_full_usage \
- "Sort lines of text\n" \
- "\nOptions:" \
- USE_FEATURE_SORT_BIG( \
- "\n -b Ignore leading blanks" \
- "\n -c Check whether input is sorted" \
- "\n -d Dictionary order (blank or alphanumeric only)" \
- "\n -f Ignore case" \
- "\n -g General numerical sort" \
- "\n -i Ignore unprintable characters" \
- "\n -k Sort key" \
- "\n -M Sort month" \
- ) \
- "\n -n Sort numbers" \
- USE_FEATURE_SORT_BIG( \
- "\n -o Output to file" \
- "\n -k Sort by key" \
- "\n -t CHAR Key separator" \
- ) \
- "\n -r Reverse sort order" \
- USE_FEATURE_SORT_BIG( \
- "\n -s Stable (don't sort ties alphabetically)" \
- ) \
- "\n -u Suppress duplicate lines" \
- USE_FEATURE_SORT_BIG( \
- "\n -z Lines are terminated by NUL, not newline" \
- "\n -mST Ignored for GNU compatibility") \
-
-#define sort_example_usage \
- "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \
- "a\n" \
- "b\n" \
- "c\n" \
- "d\n" \
- "e\n" \
- "f\n" \
- USE_FEATURE_SORT_BIG( \
- "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \
- "d 2\n" \
- "b 2\n" \
- "c 3\n" \
- ) \
- ""
-
-#define split_trivial_usage \
- "[OPTION] [INPUT [PREFIX]]"
-#define split_full_usage \
- "Options:" \
- "\n -b n[k|m] Split by bytes" \
- "\n -l n Split by lines" \
- "\n -a n Use n letters as suffix" \
-
-#define split_example_usage \
- "$ split TODO foo\n" \
- "$ cat TODO | split -a 2 -l 2 TODO_\n"
-
-#define start_stop_daemon_trivial_usage \
- "[OPTIONS] [" \
- USE_GETOPT_LONG("--start|--stop") SKIP_GETOPT_LONG("-S|-K") \
- "] ... [-- arguments...]"
-#define start_stop_daemon_full_usage \
- "Start and stop services\n" \
- "\nOptions:" \
- USE_GETOPT_LONG( \
- "\n -S,--start Start" \
- "\n -K,--stop Stop" \
- "\n -a,--startas pathname Start process specified by pathname" \
- "\n -b,--background Put process into background" \
- "\n -u,--user username|uid Stop this user's processes" \
- "\n -x,--exec executable Program to either start or check" \
- "\n -n,--name process-name Stop processes with this name" \
- "\n -p,--pidfile pid-file Save or load pid using a pid-file" \
- "\n -m,--make-pidfile Create the -p file and enter pid in it" \
- "\n -q,--quiet Quiet" \
- USE_FEATURE_START_STOP_DAEMON_FANCY( \
- "\n -o,--oknodo Exit status 0 if nothing done" \
- "\n -v,--verbose Verbose" \
- "\n -N,--nicelevel N Add N to process's nice level" \
- ) \
- "\n -s,--signal signal Signal to send (default TERM)" \
- "\n -c,--chuid user[:[grp]] Change to specified user/group" \
- ) \
- SKIP_GETOPT_LONG( \
- "\n -S Start" \
- "\n -K Stop" \
- "\n -a pathname Start process specified by pathname" \
- "\n -b Put process into background" \
- "\n -u username|uid Stop this user's processes" \
- "\n -x executable Program to either start or check" \
- "\n -n process-name Stop processes with this name" \
- "\n -p pid-file Save or load pid using a pid-file" \
- "\n -m Create the -p file and enter pid in it" \
- "\n -q Quiet" \
- USE_FEATURE_START_STOP_DAEMON_FANCY( \
- "\n -o Exit status 0 if nothing done" \
- "\n -v Verbose" \
- "\n -N N Add N to process's nice level" \
- ) \
- "\n -s signal Signal to send (default TERM)" \
- "\n -c user[:[grp]] Change to specified user/group" \
- )
-
-#define stat_trivial_usage \
- "[OPTION] FILE..."
-#define stat_full_usage \
- "Display file (default) or filesystem status\n" \
- "\nOptions:" \
- USE_FEATURE_STAT_FORMAT( \
- "\n -c fmt Use the specified format" \
- ) \
- "\n -f Display filesystem status" \
- "\n -L Dereference links" \
- "\n -t Display info in terse form" \
- USE_SELINUX( \
- "\n -Z Print security context" \
- ) \
- USE_FEATURE_STAT_FORMAT( \
- "\n\nValid format sequences for files:\n" \
- " %a Access rights in octal\n" \
- " %A Access rights in human readable form\n" \
- " %b Number of blocks allocated (see %B)\n" \
- " %B The size in bytes of each block reported by %b\n" \
- " %d Device number in decimal\n" \
- " %D Device number in hex\n" \
- " %f Raw mode in hex\n" \
- " %F File type\n" \
- " %g Group ID of owner\n" \
- " %G Group name of owner\n" \
- " %h Number of hard links\n" \
- " %i Inode number\n" \
- " %n File name\n" \
- " %N Quoted file name with dereference if symlink\n" \
- " %o I/O block size\n" \
- " %s Total size, in bytes\n" \
- " %t Major device type in hex\n" \
- " %T Minor device type in hex\n" \
- " %u User ID of owner\n" \
- " %U User name of owner\n" \
- " %x Time of last access\n" \
- " %X Time of last access as seconds since Epoch\n" \
- " %y Time of last modification\n" \
- " %Y Time of last modification as seconds since Epoch\n" \
- " %z Time of last change\n" \
- " %Z Time of last change as seconds since Epoch\n" \
- "\nValid format sequences for file systems:\n" \
- " %a Free blocks available to non-superuser\n" \
- " %b Total data blocks in file system\n" \
- " %c Total file nodes in file system\n" \
- " %d Free file nodes in file system\n" \
- " %f Free blocks in file system\n" \
- USE_SELINUX( \
- " %C Security context in SELinux\n" \
- ) \
- " %i File System ID in hex\n" \
- " %l Maximum length of filenames\n" \
- " %n File name\n" \
- " %s Block size (for faster transfer)\n" \
- " %S Fundamental block size (for block counts)\n" \
- " %t Type in hex\n" \
- " %T Type in human readable form" \
- )
-
-#define strings_trivial_usage \
- "[-afo] [-n length] [file...]"
-#define strings_full_usage \
- "Display printable strings in a binary file\n" \
- "\nOptions:" \
- "\n -a Scan whole file (default)" \
- "\n -f Precede strings with filenames" \
- "\n -n N At least N characters form a string (default 4)" \
- "\n -o Precede strings with decimal offsets" \
-
-#define stty_trivial_usage \
- "[-a|g] [-F DEVICE] [SETTING]..."
-#define stty_full_usage \
- "Without arguments, prints baud rate, line discipline,\n" \
- "and deviations from stty sane\n" \
- "\nOptions:" \
- "\n -F DEVICE Open device instead of stdin" \
- "\n -a Print all current settings in human-readable form" \
- "\n -g Print in stty-readable form" \
- "\n [SETTING] See manpage" \
-
-#define su_trivial_usage \
- "[OPTION]... [-] [username]"
-#define su_full_usage \
- "Change user id or become root\n" \
- "\nOptions:" \
- "\n -p, -m Preserve environment" \
- "\n -c Command to pass to 'sh -c'" \
- "\n -s Shell to use instead of default shell" \
-
-#define sulogin_trivial_usage \
- "[OPTION]... [tty-device]"
-#define sulogin_full_usage \
- "Single user login\n" \
- "\nOptions:" \
- "\n -t Timeout" \
-
-#define sum_trivial_usage \
- "[rs] [files...]"
-#define sum_full_usage \
- "Checksum and count the blocks in a file\n" \
- "\nOptions:" \
- "\n -r Use BSD sum algorithm (1K blocks)" \
- "\n -s Use System V sum algorithm (512byte blocks)" \
-
-#define sv_trivial_usage \
- "[-v] [-w sec] command service..."
-#define sv_full_usage \
- "Control services monitored by runsv supervisor.\n" \
- "Commands (only first character is enough):\n" \
- "\n" \
- "status: query service status\n" \
- "up: if service isn't running, start it. If service stops, restart it\n" \
- "once: like 'up', but if service stops, don't restart it\n" \
- "down: send TERM and CONT signals. If ./run exits, start ./finish\n" \
- " if it exists. After it stops, do not restart service\n" \
- "exit: send TERM and CONT signals to service and log service. If they exit,\n" \
- " runsv exits too\n" \
- "pause, cont, hup, alarm, interrupt, quit, 1, 2, term, kill: send\n" \
- "STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, KILL signal to service" \
-
-#define svlogd_trivial_usage \
- "[-ttv] [-r c] [-R abc] [-l len] [-b buflen] dir..."
-#define svlogd_full_usage \
- "Continuously read log data from standard input, optionally " \
- "filter log messages, and write the data to one or more automatically " \
- "rotated logs" \
-
-#define swapoff_trivial_usage \
- "[-a] [DEVICE]"
-#define swapoff_full_usage \
- "Stop swapping on DEVICE\n" \
- "\nOptions:" \
- "\n -a Stop swapping on all swap devices" \
-
-#define swapon_trivial_usage \
- "[-a] [DEVICE]"
-#define swapon_full_usage \
- "Start swapping on DEVICE\n" \
- "\nOptions:" \
- "\n -a Start swapping on all swap devices" \
-
-#define switch_root_trivial_usage \
- "[-c /dev/console] NEW_ROOT NEW_INIT [ARGUMENTS_TO_INIT]"
-#define switch_root_full_usage \
- "Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT,\n" \
- "and exec NEW_INIT\n" \
- "\nOptions:" \
- "\n -c Redirect console to device on new root" \
-
-#define sync_trivial_usage \
- ""
-#define sync_full_usage \
- "Write all buffered filesystem blocks to disk"
-
-#define sysctl_trivial_usage \
- "[OPTIONS]... [VALUE]..."
-#define sysctl_full_usage \
- "Configure kernel parameters at runtime\n" \
- "\nOptions:" \
- "\n -n Disable printing of key names" \
- "\n -e Don't warn about unknown keys" \
- "\n -w Change sysctl setting" \
- "\n -p FILE Load sysctl settings from FILE (default /etc/sysctl.conf)" \
- "\n -a Display all values" \
- "\n -A Display all values in table form" \
-
-#define sysctl_example_usage \
- "sysctl [-n] [-e] variable...\n" \
- "sysctl [-n] [-e] -w variable=value...\n" \
- "sysctl [-n] [-e] -a\n" \
- "sysctl [-n] [-e] -p file (default /etc/sysctl.conf)\n" \
- "sysctl [-n] [-e] -A\n"
-
-#define syslogd_trivial_usage \
- "[OPTION]..."
-#define syslogd_full_usage \
- "System logging utility.\n" \
- "Note that this version of syslogd ignores /etc/syslog.conf.\n" \
- "\nOptions:" \
- "\n -n Run in foreground" \
- "\n -O FILE Log to given file (default=/var/log/messages)" \
- "\n -l n Set local log level" \
- "\n -S Smaller logging output" \
- USE_FEATURE_ROTATE_LOGFILE( \
- "\n -s SIZE Max size (KB) before rotate (default=200KB, 0=off)" \
- "\n -b NUM Number of rotated logs to keep (default=1, max=99, 0=purge)") \
- USE_FEATURE_REMOTE_LOG( \
- "\n -R HOST[:PORT] Log to IP or hostname on PORT (default PORT=514/UDP)" \
- "\n -L Log locally and via network (default is network only if -R)") \
- USE_FEATURE_SYSLOGD_DUP( \
- "\n -D Drop duplicates") \
- USE_FEATURE_IPC_SYSLOG( \
- "\n -C[size(KiB)] Log to shared mem buffer (read it using logread)") \
- /* NB: -Csize shouldn't have space (because size is optional) */
-/* "\n -m MIN Minutes between MARK lines (default=20, 0=off)" */
-
-#define syslogd_example_usage \
- "$ syslogd -R masterlog:514\n" \
- "$ syslogd -R 192.168.1.1:601\n"
-
-#define tac_trivial_usage \
- "[FILE]..."
-#define tac_full_usage \
- "Concatenate FILE(s) and print them in reverse"
-
-#define tail_trivial_usage \
- "[OPTION]... [FILE]..."
-#define tail_full_usage \
- "Print last 10 lines of each FILE to standard output.\n" \
- "With more than one FILE, precede each with a header giving the\n" \
- "file name. With no FILE, or when FILE is -, read standard input.\n" \
- "\nOptions:" \
- USE_FEATURE_FANCY_TAIL( \
- "\n -c N[kbm] Output the last N bytes") \
- "\n -n N[kbm] Print last N lines instead of last 10" \
- "\n -f Output data as the file grows" \
- USE_FEATURE_FANCY_TAIL( \
- "\n -q Never output headers giving file names" \
- "\n -s SEC Wait SEC seconds between reads with -f" \
- "\n -v Always output headers giving file names" \
- "\n\n" \
- "If the first character of N (bytes or lines) is a '+', output begins with\n" \
- "the Nth item from the start of each file, otherwise, print the last N items\n" \
- "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." ) \
-
-#define tail_example_usage \
- "$ tail -n 1 /etc/resolv.conf\n" \
- "nameserver 10.0.0.1\n"
-
-#define tar_trivial_usage \
- "-[" USE_FEATURE_TAR_CREATE("c") USE_FEATURE_TAR_GZIP("z") \
- USE_FEATURE_TAR_BZIP2("j") USE_FEATURE_TAR_LZMA("a") \
- USE_FEATURE_TAR_COMPRESS("Z") "xtvO] " \
- USE_FEATURE_TAR_FROM("[-X FILE] ") \
- "[-f TARFILE] [-C DIR] [FILE(s)]..."
-#define tar_full_usage \
- "Create, extract, or list files from a tar file\n" \
- "\nOptions:" \
- USE_FEATURE_TAR_CREATE( \
- "\n c Create") \
- "\n x Extract" \
- "\n t List" \
- "\nArchive format selection:" \
- USE_FEATURE_TAR_GZIP( \
- "\n z Filter the archive through gzip" \
- ) \
- USE_FEATURE_TAR_BZIP2( \
- "\n j Filter the archive through bzip2" \
- ) \
- USE_FEATURE_TAR_LZMA( \
- "\n a Filter the archive through lzma" \
- ) \
- USE_FEATURE_TAR_COMPRESS( \
- "\n Z Filter the archive through compress" \
- ) \
- "\nFile selection:" \
- "\n f Name of TARFILE or \"-\" for stdin" \
- "\n O Extract to stdout" \
- USE_FEATURE_TAR_FROM( \
- "\n exclude File to exclude" \
- "\n X File with names to exclude" \
- ) \
- "\n C Change to directory DIR before operation" \
- "\n v Verbose" \
-
-#define tar_example_usage \
- "$ zcat /tmp/tarball.tar.gz | tar -xf -\n" \
- "$ tar -cf /tmp/tarball.tar /usr/local\n"
-
-#define taskset_trivial_usage \
- "[-p] [mask] [pid | command [arg]...]"
-#define taskset_full_usage \
- "Set or get CPU affinity\n" \
- "\nOptions:" \
- "\n -p Operate on an existing PID" \
-
-#define taskset_example_usage \
- "$ taskset 0x7 ./dgemm_test&\n" \
- "$ taskset -p 0x1 $!\n" \
- "pid 4790's current affinity mask: 7\n" \
- "pid 4790's new affinity mask: 1\n" \
- "$ taskset 0x7 /bin/sh -c './taskset -p 0x1 $$'\n" \
- "pid 6671's current affinity mask: 1\n" \
- "pid 6671's new affinity mask: 1\n" \
- "$ taskset -p 1\n" \
- "pid 1's current affinity mask: 3\n"
-
-#define tee_trivial_usage \
- "[OPTION]... [FILE]..."
-#define tee_full_usage \
- "Copy standard input to each FILE, and also to standard output\n" \
- "\nOptions:" \
- "\n -a Append to the given FILEs, do not overwrite" \
- "\n -i Ignore interrupt signals (SIGINT)" \
-
-#define tee_example_usage \
- "$ echo \"Hello\" | tee /tmp/foo\n" \
- "$ cat /tmp/foo\n" \
- "Hello\n"
-
-#if ENABLE_FEATURE_TELNET_AUTOLOGIN
-#define telnet_trivial_usage \
- "[-a] [-l USER] HOST [PORT]"
-#define telnet_full_usage \
- "Connect to telnet server\n" \
- "\nOptions:" \
- "\n -a Attempt an automatic login with USER variable" \
- "\n -l USER Attempt an automatic login with USER argument" \
-
-#else
-#define telnet_trivial_usage \
- "HOST [PORT]"
-#define telnet_full_usage \
- "Connect to telnet server"
-#endif
-
-#define telnetd_trivial_usage \
- "[OPTION]"
-#define telnetd_full_usage \
- "Handle incoming telnet connections" \
- SKIP_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" \
- "\nOptions:" \
- "\n -l LOGIN Exec LOGIN on connect" \
- "\n -f issue_file Display issue_file instead of /etc/issue" \
- "\n -K Close connection as soon as login exits" \
- "\n (normally wait until all programs close slave pty)" \
- USE_FEATURE_TELNETD_STANDALONE( \
- "\n -p PORT Port to listen on" \
- "\n -b ADDR Address to bind to" \
- "\n -F Run in foreground" \
- "\n -i Run as inetd subservice" \
- )
-
-#define test_trivial_usage \
- "EXPRESSION\n" \
- " or [ EXPRESSION ]"
-#define test_full_usage \
- "Check file types and compares values returning an exit code\n" \
- "determined by the value of EXPRESSION"
-#define test_example_usage \
- "$ test 1 -eq 2\n" \
- "$ echo $?\n" \
- "1\n" \
- "$ test 1 -eq 1\n" \
- "$ echo $?\n" \
- "0\n" \
- "$ [ -d /etc ]\n" \
- "$ echo $?\n" \
- "0\n" \
- "$ [ -d /junk ]\n" \
- "$ echo $?\n" \
- "1\n"
-
-#define tcpsvd_trivial_usage \
- "[-hEv] [-c n] [-C n:msg] [-b n] [-u user] [-l name] ip port prog..."
-/* with not-implemented options: */
-/* "[-hpEvv] [-c n] [-C n:msg] [-b n] [-u user] [-l name] [-i dir|-x cdb] [-t sec] ip port prog..." */
-#define tcpsvd_full_usage \
- "Create TCP socket, bind it to ip:port and listen\n" \
- "for incoming connection. Run PROG for each connection.\n" \
- "\nip IP to listen on. '0' = all" \
- "\nport Port to listen on" \
- "\nprog [arg] Program to run" \
- "\n-l name Local hostname (else looks up local hostname in DNS)" \
- "\n-u user[:group] Change to user/group after bind" \
- "\n-c n Handle up to n connections simultaneously" \
- "\n-b n Allow a backlog of approximately n TCP SYNs" \
- "\n-C n[:msg] Allow only up to n connections from the same IP" \
- "\n New connections from this IP address are closed" \
- "\n immediately. 'msg' is written to the peer before close" \
- "\n-h Look up peer's hostname" \
- "\n-E Do not set up environment variables" \
- "\n-v Verbose" \
-
-#define udpsvd_trivial_usage \
- "[-hEv] [-c n] [-u user] [-l name] ip port prog"
-#define udpsvd_full_usage \
- "Create UDP socket, bind it to ip:port and wait\n" \
- "for incoming packets. Run PROG for each packet,\n" \
- "redirecting all further packets with same peer ip:port to it\n" \
- "\nip IP to listen on. '0' = all" \
- "\nport Port to listen on" \
- "\nprog [arg] Program to run" \
- "\n-l name Local hostname (else looks up local hostname in DNS)" \
- "\n-u user[:group] Change to user/group after bind" \
- "\n-c n Handle up to n connections simultaneously" \
- "\n-h Look up peer's hostname" \
- "\n-E Do not set up environment variables" \
- "\n-v Verbose" \
-
-#define tftp_trivial_usage \
- "[OPTION]... HOST [PORT]"
-#define tftp_full_usage \
- "Transfer a file from/to tftp server\n" \
- "\nOptions:" \
- "\n -l FILE Local FILE" \
- "\n -r FILE Remote FILE" \
- USE_FEATURE_TFTP_GET( \
- "\n -g Get file" \
- ) \
- USE_FEATURE_TFTP_PUT( \
- "\n -p Put file" \
- ) \
- USE_FEATURE_TFTP_BLOCKSIZE( \
- "\n -b SIZE Transfer blocks of SIZE octets" \
- )
-
-#define tftpd_trivial_usage \
- "[-cr] [-u USER] [DIR]"
-#define tftpd_full_usage \
- "Transfer a file on tftp client's request.\n" \
- "\nOptions:" \
- "\n -r Prohibit upload" \
- "\n -c Allow file creation via upload" \
- "\n -u Access files as USER" \
-
-#define time_trivial_usage \
- "[OPTION]... COMMAND [ARGS...]"
-#define time_full_usage \
- "Run the program COMMAND with arguments ARGS. When COMMAND finishes,\n" \
- "COMMAND's resource usage information is displayed.\n" \
- "\nOptions:" \
- "\n -v Verbose" \
-
-#define top_trivial_usage \
- "[-b] [-n COUNT] [-d SECONDS]"
-#define top_full_usage \
- "Provide a view of process activity in real time.\n" \
- "Read the status of all processes from /proc each SECONDS\n" \
- "and show the status for however many processes will fit on the screen." \
-
-#define touch_trivial_usage \
- "[-c] FILE [FILE...]"
-#define touch_full_usage \
- "Update the last-modified date on the given FILE[s]\n" \
- "\nOptions:" \
- "\n -c Do not create any files" \
-
-#define touch_example_usage \
- "$ ls -l /tmp/foo\n" \
- "/bin/ls: /tmp/foo: No such file or directory\n" \
- "$ touch /tmp/foo\n" \
- "$ ls -l /tmp/foo\n" \
- "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n"
-
-#define tr_trivial_usage \
- "[-cds] STRING1 [STRING2]"
-#define tr_full_usage \
- "Translate, squeeze, and/or delete characters from\n" \
- "standard input, writing to standard output\n" \
- "\nOptions:" \
- "\n -c Take complement of STRING1" \
- "\n -d Delete input characters coded STRING1" \
- "\n -s Squeeze multiple output characters of STRING2 into one character" \
-
-#define tr_example_usage \
- "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" \
- "hello world\n"
-
-#define traceroute_trivial_usage \
- "[-FIldnrv] [-f 1st_ttl] [-m max_ttl] [-p port#] [-q nqueries]\n" \
- " [-s src_addr] [-t tos] [-w wait] [-g gateway] [-i iface]\n" \
- " [-z pausemsecs] HOST [data size]"
-#define traceroute_full_usage \
- "Trace the route to HOST\n" \
- "\nOptions:" \
- "\n -F Set the don't fragment bit" \
- "\n -I Use ICMP ECHO instead of UDP datagrams" \
- "\n -l Display the ttl value of the returned packet" \
- "\n -d Set SO_DEBUG options to socket" \
- "\n -n Print hop addresses numerically rather than symbolically" \
- "\n -r Bypass the normal routing tables and send directly to a host" \
- "\n -v Verbose" \
- "\n -m max_ttl Max time-to-live (max number of hops)" \
- "\n -p port# Base UDP port number used in probes" \
- "\n (default is 33434)" \
- "\n -q nqueries Number of probes per 'ttl' (default 3)" \
- "\n -s src_addr IP address to use as the source address" \
- "\n -t tos Type-of-service in probe packets (default 0)" \
- "\n -w wait Time in seconds to wait for a response" \
- "\n (default 3 sec)" \
- "\n -g Loose source route gateway (8 max)" \
-
-#define true_trivial_usage \
- ""
-#define true_full_usage \
- "Return an exit code of TRUE (0)"
-#define true_example_usage \
- "$ true\n" \
- "$ echo $?\n" \
- "0\n"
-
-#define tty_trivial_usage \
- ""
-#define tty_full_usage \
- "Print file name of standard input's terminal" \
- USE_INCLUDE_SUSv2( "\n" \
- "\nOptions:" \
- "\n -s Print nothing, only return exit status" \
- )
-#define tty_example_usage \
- "$ tty\n" \
- "/dev/tty2\n"
-
-#define ttysize_trivial_usage \
- "[w] [h]"
-#define ttysize_full_usage \
- "Print dimension(s) of standard input's terminal, on error return 80x25"
-
-#define tune2fs_trivial_usage \
- "[-c max-mounts-count] [-e errors-behavior] [-g group] " \
- "[-i interval[d|m|w]] [-j] [-J journal-options] [-l] [-s sparse-flag] " \
- "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] " \
- "[-r reserved-blocks-count] [-u user] [-C mount-count] " \
- "[-L volume-label] [-M last-mounted-dir] [-O [^]feature[,...]] " \
- "[-T last-check-time] [-U UUID] device"
-#define tune2fs_full_usage \
- "Adjust filesystem options on ext[23] filesystems"
-
-#define udhcpc_trivial_usage \
- "[-Cfbnqtv] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]\n" \
- " [-p pidfile] [-r IP] [-s script] [-O dhcp-option]..." USE_FEATURE_UDHCP_PORT(" [-P N]")
-#define udhcpc_full_usage \
- USE_GETOPT_LONG( \
- " -V,--vendorclass=CLASSID Vendor class identifier" \
- "\n -i,--interface=INTERFACE Interface to use (default eth0)" \
- "\n -H,-h,--hostname=HOSTNAME Client hostname" \
- "\n -c,--clientid=CLIENTID Client identifier" \
- "\n -C,--clientid-none Suppress default client identifier" \
- "\n -p,--pidfile=file Create pidfile" \
- "\n -r,--request=IP IP address to request" \
- "\n -s,--script=file Run file at dhcp events (default /usr/share/udhcpc/default.script)" \
- "\n -t,--retries=N Send up to N request packets" \
- "\n -T,--timeout=N Try to get a lease for N seconds (default 3)" \
- "\n -A,--tryagain=N Wait N seconds (default 20) after failure" \
- "\n -f,--foreground Run in foreground" \
- "\n -b,--background Background if lease is not immediately obtained" \
- "\n -S,--syslog Log to syslog too" \
- "\n -n,--now Exit with failure if lease is not immediately obtained" \
- "\n -q,--quit Quit after obtaining lease" \
- "\n -R,--release Release IP on quit" \
- "\n -O,--request-option=OPT Request DHCP option OPT from server" \
- USE_FEATURE_UDHCP_PORT( \
- "\n -P,--client-port N Use port N instead of default 68" \
- ) \
- USE_FEATURE_UDHCPC_ARPING( \
- "\n -a,--arping Use arping to validate offered address" \
- ) \
- ) \
- SKIP_GETOPT_LONG( \
- " -V CLASSID Vendor class identifier" \
- "\n -i INTERFACE Interface to use (default: eth0)" \
- "\n -H,-h HOSTNAME Client hostname" \
- "\n -c CLIENTID Client identifier" \
- "\n -C Suppress default client identifier" \
- "\n -p file Create pidfile" \
- "\n -r IP IP address to request" \
- "\n -s file Run file at dhcp events (default /usr/share/udhcpc/default.script)" \
- "\n -t N Send up to N request packets" \
- "\n -T N Try to get a lease for N seconds (default 3)" \
- "\n -A N Wait N seconds (default 20) after failure" \
- "\n -f Run in foreground" \
- "\n -b Background if lease is not immediately obtained" \
- "\n -S Log to syslog too" \
- "\n -n Exit with failure if lease is not immediately obtained" \
- "\n -q Quit after obtaining lease" \
- "\n -R Release IP on quit" \
- "\n -O OPT Request DHCP option OPT from server" \
- USE_FEATURE_UDHCP_PORT( \
- "\n -P N Use port N instead of default 68" \
- ) \
- USE_FEATURE_UDHCPC_ARPING( \
- "\n -a Use arping to validate offered address" \
- ) \
- )
-
-#define udhcpd_trivial_usage \
- "[-fS]" USE_FEATURE_UDHCP_PORT(" [-P N]") " [configfile]" \
-
-#define udhcpd_full_usage \
- "DHCP server\n" \
- "\n -f Run in foreground" \
- "\n -S Log to syslog too" \
- USE_FEATURE_UDHCP_PORT( \
- "\n -P N Use port N instead of default 67" \
- )
-
-#define umount_trivial_usage \
- "[flags] FILESYSTEM|DIRECTORY"
-#define umount_full_usage \
- "Unmount file systems\n" \
- "\nOptions:" \
- USE_FEATURE_UMOUNT_ALL( \
- "\n -a Unmount all file systems" USE_FEATURE_MTAB_SUPPORT(" in /etc/mtab") \
- ) \
- USE_FEATURE_MTAB_SUPPORT( \
- "\n -n Don't erase /etc/mtab entries" \
- ) \
- "\n -r Try to remount devices as read-only if mount is busy" \
- "\n -l Lazy umount (detach filesystem)" \
- "\n -f Force umount (i.e., unreachable NFS server)" \
- USE_FEATURE_MOUNT_LOOP( \
- "\n -d Free loop device if it has been used" \
- )
-
-#define umount_example_usage \
- "$ umount /dev/hdc1\n"
-
-#define uname_trivial_usage \
- "[-amnrspv]"
-#define uname_full_usage \
- "Print system information.\n" \
- "\nOptions:" \
- "\n -a Print all" \
- "\n -m The machine (hardware) type" \
- "\n -n Hostname" \
- "\n -r OS release" \
- "\n -s OS name (default)" \
- "\n -p Processor type" \
- "\n -v OS version" \
-
-#define uname_example_usage \
- "$ uname -a\n" \
- "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n"
-
-#define uncompress_trivial_usage \
- "[-c] [-f] [name...]"
-#define uncompress_full_usage \
- "Uncompress .Z file[s]\n" \
- "\nOptions:" \
- "\n -c Extract to stdout" \
- "\n -f Overwrite an existing file" \
-
-#define unexpand_trivial_usage \
- "[-f][-a][-t NUM] [FILE|-]"
-#define unexpand_full_usage \
- "Convert spaces to tabs, writing to standard output.\n" \
- "\nOptions:" \
- USE_FEATURE_UNEXPAND_LONG_OPTIONS( \
- "\n -a,--all Convert all blanks" \
- "\n -f,--first-only Convert only leading blanks" \
- "\n -t,--tabs=N Tabstops every N chars" \
- ) \
- SKIP_FEATURE_UNEXPAND_LONG_OPTIONS( \
- "\n -a Convert all blanks" \
- "\n -f Convert only leading blanks" \
- "\n -t N Tabstops every N chars" \
- )
-
-#define uniq_trivial_usage \
- "[-fscdu]... [INPUT [OUTPUT]]"
-#define uniq_full_usage \
- "Discard all but one of successive identical lines from INPUT\n" \
- "(or standard input), writing to OUTPUT (or standard output)\n" \
- "\nOptions:" \
- "\n -c Prefix lines by the number of occurrences" \
- "\n -d Only print duplicate lines" \
- "\n -u Only print unique lines" \
- "\n -f N Skip the first N fields" \
- "\n -s N Skip the first N chars (after any skipped fields)" \
-
-#define uniq_example_usage \
- "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \
- "a\n" \
- "b\n" \
- "c\n"
-
-#define unix2dos_trivial_usage \
- "[option] [FILE]"
-#define unix2dos_full_usage \
- "Convert FILE from unix to dos format.\n" \
- "When no file is given, use stdin/stdout.\n" \
- "\nOptions:" \
- "\n -u dos2unix" \
- "\n -d unix2dos" \
-
-#define unzip_trivial_usage \
- "[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]"
-#define unzip_full_usage \
- "Extract files from ZIP archives\n" \
- "\nOptions:" \
- "\n -l List archive contents (with -q for short form)" \
- "\n -n Never overwrite existing files (default)" \
- "\n -o Overwrite files without prompting" \
- "\n -p Send output to stdout" \
- "\n -q Quiet" \
- "\n -x Exclude these files" \
- "\n -d Extract files into this directory" \
-
-#define uptime_trivial_usage \
- ""
-#define uptime_full_usage \
- "Display the time since the last boot"
-
-#define uptime_example_usage \
- "$ uptime\n" \
- " 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n"
-
-#define usleep_trivial_usage \
- "N"
-#define usleep_full_usage \
- "Pause for N microseconds"
-
-#define usleep_example_usage \
- "$ usleep 1000000\n" \
- "[pauses for 1 second]\n"
-
-#define uudecode_trivial_usage \
- "[-o outfile] [infile]"
-#define uudecode_full_usage \
- "Uudecode a file\n" \
- "Finds outfile name in uuencoded source unless -o is given"
-
-#define uudecode_example_usage \
- "$ uudecode -o busybox busybox.uu\n" \
- "$ ls -l busybox\n" \
- "-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox\n"
-
-#define uuencode_trivial_usage \
- "[-m] [infile] stored_filename"
-#define uuencode_full_usage \
- "Uuencode a file to stdout\n" \
- "\nOptions:" \
- "\n -m Use base64 encoding per RFC1521" \
-
-#define uuencode_example_usage \
- "$ uuencode busybox busybox\n" \
- "begin 755 busybox\n" \
- "<encoded file snipped>\n" \
- "$ uudecode busybox busybox > busybox.uu\n" \
- "$\n"
-
-#define vconfig_trivial_usage \
- "COMMAND [OPTIONS]..."
-#define vconfig_full_usage \
- "Create and remove virtual ethernet devices\n" \
- "\nOptions:" \
- "\n add [interface-name] [vlan_id]" \
- "\n rem [vlan-name]" \
- "\n set_flag [interface-name] [flag-num] [0 | 1]" \
- "\n set_egress_map [vlan-name] [skb_priority] [vlan_qos]" \
- "\n set_ingress_map [vlan-name] [skb_priority] [vlan_qos]" \
- "\n set_name_type [name-type]" \
-
-#define vi_trivial_usage \
- "[OPTION] [FILE]..."
-#define vi_full_usage \
- "Edit FILE\n" \
- "\nOptions:" \
- USE_FEATURE_VI_COLON( \
- "\n -c Initial command to run ($EXINIT also available)") \
- USE_FEATURE_VI_READONLY( \
- "\n -R Read-only - do not write to the file") \
- "\n -H Short help regarding available features" \
-
-#define vlock_trivial_usage \
- "[OPTIONS]"
-#define vlock_full_usage \
- "Lock a virtual terminal. A password is required to unlock.\n" \
- "\nOptions:" \
- "\n -a Lock all VTs" \
-
-#define watch_trivial_usage \
- "[-n seconds] [-t] COMMAND..."
-#define watch_full_usage \
- "Execute a program periodically\n" \
- "\nOptions:" \
- "\n -n Loop period in seconds (default 2)" \
- "\n -t Don't print header" \
-
-#define watch_example_usage \
- "$ watch date\n" \
- "Mon Dec 17 10:31:40 GMT 2000\n" \
- "Mon Dec 17 10:31:42 GMT 2000\n" \
- "Mon Dec 17 10:31:44 GMT 2000"
-
-#define watchdog_trivial_usage \
- "[-t N[ms]] [-F] DEV"
-#define watchdog_full_usage \
- "Periodically write to watchdog device DEV\n" \
- "\nOptions:" \
- "\n -t N Timer period (default 30)" \
- "\n -F Run in foreground" \
- "\n" \
- "\nUse -t 500ms to specify period in milliseconds" \
-
-#define wc_trivial_usage \
- "[OPTION]... [FILE]..."
-#define wc_full_usage \
- "Print line, word, and byte counts for each FILE, and a total line if\n" \
- "more than one FILE is specified. With no FILE, read standard input.\n" \
- "\nOptions:" \
- "\n -c Print the byte counts" \
- "\n -l Print the newline counts" \
- "\n -L Print the length of the longest line" \
- "\n -w Print the word counts" \
-
-#define wc_example_usage \
- "$ wc /etc/passwd\n" \
- " 31 46 1365 /etc/passwd\n"
-
-#define wget_trivial_usage \
- USE_GETOPT_LONG( \
- "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document file]\n" \
- " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \
- " [-U|--user-agent agent] url" \
- ) \
- SKIP_GETOPT_LONG( \
- "[-csq] [-O file] [-Y on/off] [-P DIR] [-U agent] url" \
- )
-#define wget_full_usage \
- "Retrieve files via HTTP or FTP\n" \
- "\nOptions:" \
- "\n -s Spider mode - only check file existence" \
- "\n -c Continue retrieval of aborted transfer" \
- "\n -q Quiet" \
- "\n -P Set directory prefix to DIR" \
- "\n -O Save to filename ('-' for stdout)" \
- "\n -U Adjust 'User-Agent' field" \
- "\n -Y Use proxy ('on' or 'off')" \
-
-#define which_trivial_usage \
- "[COMMAND...]"
-#define which_full_usage \
- "Locate a COMMAND"
-#define which_example_usage \
- "$ which login\n" \
- "/bin/login\n"
-
-#define who_trivial_usage \
- "[-a]"
-#define who_full_usage \
- "Show who is logged on\n" \
- "\nOptions:" \
- "\n -a show all" \
-
-#define whoami_trivial_usage \
- ""
-#define whoami_full_usage \
- "Print the user name associated with the current effective user id"
-
-#define xargs_trivial_usage \
- "[OPTIONS] [COMMAND] [ARGS...]"
-#define xargs_full_usage \
- "Execute COMMAND on every item given by standard input\n" \
- "\nOptions:" \
- USE_FEATURE_XARGS_SUPPORT_CONFIRMATION( \
- "\n -p Prompt the user about whether to run each command") \
- "\n -r Do not run command for empty read lines" \
- USE_FEATURE_XARGS_SUPPORT_TERMOPT( \
- "\n -x Exit if the size is exceeded") \
- USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( \
- "\n -0 Input filenames are terminated by a null character") \
- "\n -t Print the command line on stderr before executing it" \
-
-#define xargs_example_usage \
- "$ ls | xargs gzip\n" \
- "$ find . -name '*.c' -print | xargs rm\n"
-
-#define yes_trivial_usage \
- "[OPTION]... [STRING]..."
-#define yes_full_usage \
- "Repeatedly output a line with all specified STRING(s), or 'y'"
-
-#define zcat_trivial_usage \
- "FILE"
-#define zcat_full_usage \
- "Uncompress to stdout"
-
-#define zcip_trivial_usage \
- "[OPTIONS] ifname script"
-#define zcip_full_usage \
- "Manage a ZeroConf IPv4 link-local address\n" \
- "\nOptions:" \
- "\n -f Run in foreground" \
- "\n -q Quit after address (no daemon)" \
- "\n -r 169.254.x.x Request this address first" \
- "\n -v Verbose" \
-
-#endif /* __BB_USAGE_H__ */
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Init Utilities"
-
-config INIT
- bool "init"
- default n
- select FEATURE_SYSLOG
- help
- init is the first program run when the system boots.
-
-config DEBUG_INIT
- bool "Debugging aid"
- default n
- depends on INIT
- help
- Turn this on to disable all the dangerous
- rebooting stuff when debugging.
-
-config FEATURE_USE_INITTAB
- bool "Support reading an inittab file"
- default y
- depends on INIT
- help
- Allow init to read an inittab file when the system boot.
-
-config FEATURE_KILL_REMOVED
- bool "Support killing processes that have been removed from inittab"
- default y
- depends on FEATURE_USE_INITTAB
- help
- When respawn entries are removed from inittab and a SIGHUP is
- sent to init, this feature will kill the processes that have
- been removed.
-
-config FEATURE_KILL_DELAY
- int "How long to wait between TERM and KILL (0 - send TERM only)" if FEATURE_KILL_REMOVED
- range 0 1024
- default 0
- help
- With nonzero setting, init sends TERM, forks, child waits N
- seconds, sends KILL and exits. Setting it too high is unwise
- (child will hang around for too long and can actually kill
- wrong process!)
-
-config FEATURE_INIT_SCTTY
- bool "Run commands with leading dash with controlling tty"
- default n
- depends on INIT
- help
- If this option is enabled, init will try to give a controlling
- tty to any command which has leading hyphen (often it's "-/bin/sh").
- More precisely, init will do "ioctl(STDIN_FILENO, TIOCSCTTY, 0)".
- If device attached to STDIN_FILENO can be a ctty but is not yet
- a ctty for other session, it will become this process' ctty.
- 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.
- NB: using cttyhack applet may work better.
-
-config FEATURE_INIT_SYSLOG
- bool "Enable init to write to syslog"
- default n
- depends on INIT
-
-config FEATURE_EXTRA_QUIET
- bool "Be _extra_ quiet on boot"
- default y
- depends on INIT
- help
- Prevent init from logging some messages to the console during boot.
-
-config FEATURE_INIT_COREDUMPS
- bool "Support dumping core for child processes (debugging only)"
- default n
- depends on INIT
- help
- If this option is enabled and the file /.init_enable_core
- exists, then init will call setrlimit() to allow unlimited
- core file sizes. If this option is disabled, processes
- will not generate any core files.
-
-
-
-config FEATURE_INITRD
- bool "Support running init from within an initrd (not initramfs)"
- default y
- depends on INIT
- help
- 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 HALT
- bool "poweroff, halt, and reboot"
- default y
- help
- Stop all processes and either halt, reboot, or power off the system.
-
-config MESG
- bool "mesg"
- default y
- help
- Mesg controls access to your terminal by others. It is typically
- used to allow or disallow other users to write to your terminal
-
-endmenu
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_HALT) += halt.o
-lib-$(CONFIG_INIT) += init.o
-lib-$(CONFIG_MESG) += mesg.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Busybox Library Tuning"
-
-config PASSWORD_MINLEN
- int "Minimum password length"
- default 6
- range 5 32
- help
- Minimum allowable password length.
-
-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
-
-config FEATURE_FAST_TOP
- bool "Faster /proc scanning code (+100 bytes)"
- default n
- help
- This option makes top (and ps) ~20% faster (or 20% less CPU hungry),
- but code size is slightly bigger.
-
-config FEATURE_ETC_NETWORKS
- bool "Support for /etc/networks"
- default n
- help
- Enable support for network names in /etc/networks. This is
- a rarely used feature which allows you to use names
- instead of IP/mask pairs in route command.
-
-config FEATURE_EDITING
- bool "Command line editing"
- default n
- help
- Enable line editing (mainly for shell command line).
-
-config FEATURE_EDITING_MAX_LEN
- int "Maximum length of input"
- range 128 8192
- default 1024
- depends on FEATURE_EDITING
- help
- Line editing code uses on-stack buffers for storage.
- You may want to decrease this parameter if your target machine
- benefits from smaller stack usage.
-
-config FEATURE_EDITING_VI
- bool "vi-style line editing commands"
- default n
- depends on FEATURE_EDITING
- help
- Enable vi-style line editing. In shells, this mode can be
- turned on and off with "set -o vi" and "set +o vi".
-
-config FEATURE_EDITING_HISTORY
- int "History size"
- range 0 99999
- default 15
- depends on FEATURE_EDITING
- help
- Specify command history size.
-
-config FEATURE_EDITING_SAVEHISTORY
- bool "History saving"
- default n
- depends on ASH && FEATURE_EDITING
- help
- Enable history saving in ash shell.
-
-config FEATURE_TAB_COMPLETION
- bool "Tab completion"
- default n
- depends on FEATURE_EDITING
- help
- Enable tab completion.
-
-config FEATURE_USERNAME_COMPLETION
- bool "Username completion"
- default n
- depends on FEATURE_TAB_COMPLETION
- help
- Enable username completion.
-
-config FEATURE_EDITING_FANCY_PROMPT
- bool "Fancy shell prompts"
- default n
- depends on FEATURE_EDITING
- help
- Setting this option allows for prompts to use things like \w and
- \$ and escape codes.
-
-config FEATURE_VERBOSE_CP_MESSAGE
- bool "Give more precise messages when copy fails (cp, mv etc)"
- default n
- help
- Error messages with this feature enabled:
- $ cp file /does_not_exist/file
- cp: cannot create '/does_not_exist/file': Path does not exist
- $ cp file /vmlinuz/file
- cp: cannot stat '/vmlinuz/file': Path has non-directory component
- If this feature is not enabled, they will be, respectively:
- cp: cannot remove '/does_not_exist/file': No such file or directory
- cp: cannot stat '/vmlinuz/file': Not a directory
- respectively.
- This will cost you ~60 bytes.
-
-config FEATURE_COPYBUF_KB
- int "Copy buffer size, in kilobytes"
- range 1 1024
- default 4
- help
- Size of buffer used by cp, mv, install etc.
- Buffers which are 4 kb or less will be allocated on stack.
- Bigger buffers will be allocated with mmap, with fallback to 4 kb
- stack buffer if mmap fails.
-
-config MONOTONIC_SYSCALL
- bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
- default y
- help
- Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring
- time intervals (time, ping, traceroute etc need this).
- Probably requires Linux 2.6+. If not selected, gettimeofday
- will be used instead (which gives wrong results if date/time
- is reset).
-
-config IOCTL_HEX2STR_ERROR
- bool "Use ioctl names rather than hex values in error messages"
- default y
- help
- Use ioctl names rather than hex values in error messages
- (e.g. VT_DISALLOCATE rather than 0x5608). If disabled this
- saves about 1400 bytes.
-endmenu
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-
-lib-y += appletlib.o
-lib-y += ask_confirmation.o
-lib-y += bb_askpass.o
-lib-y += bb_basename.o
-lib-y += bb_do_delay.o
-lib-y += bb_pwd.o
-lib-y += bb_qsort.o
-lib-y += bb_strtonum.o
-lib-y += change_identity.o
-lib-y += chomp.o
-lib-y += compare_string_array.o
-lib-y += concat_path_file.o
-lib-y += concat_subpath_file.o
-lib-y += copy_file.o
-lib-y += copyfd.o
-lib-y += crc32.o
-lib-y += create_icmp6_socket.o
-lib-y += create_icmp_socket.o
-lib-y += default_error_retval.o
-lib-y += device_open.o
-lib-y += dump.o
-lib-y += error_msg.o
-lib-y += error_msg_and_die.o
-lib-y += execable.o
-lib-y += fclose_nonstdin.o
-lib-y += fflush_stdout_and_exit.o
-lib-y += fgets_str.o
-lib-y += find_pid_by_name.o
-lib-y += find_root_device.o
-lib-y += full_write.o
-lib-y += get_console.o
-lib-y += get_last_path_component.o
-lib-y += get_line_from_file.o
-lib-y += getopt32.o
-lib-y += getpty.o
-lib-y += herror_msg.o
-lib-y += herror_msg_and_die.o
-lib-y += human_readable.o
-lib-y += inet_common.o
-lib-y += info_msg.o
-lib-y += inode_hash.o
-lib-y += isdirectory.o
-lib-y += kernel_version.o
-lib-y += last_char_is.o
-lib-y += lineedit.o
-lib-y += llist.o
-lib-y += login.o
-lib-y += make_directory.o
-lib-y += makedev.o
-lib-y += match_fstype.o
-lib-y += md5.o
-lib-y += messages.o
-lib-y += mode_string.o
-lib-y += mtab_file.o
-lib-y += obscure.o
-lib-y += parse_mode.o
-lib-y += perror_msg.o
-lib-y += perror_msg_and_die.o
-lib-y += perror_nomsg.o
-lib-y += perror_nomsg_and_die.o
-lib-y += pidfile.o
-lib-y += printable.o
-lib-y += process_escape_sequence.o
-lib-y += procps.o
-lib-y += ptr_to_globals.o
-lib-y += read.o
-lib-y += recursive_action.o
-lib-y += remove_file.o
-lib-y += restricted_shell.o
-lib-y += run_shell.o
-lib-y += safe_gethostname.o
-lib-y += safe_poll.o
-lib-y += safe_strncpy.o
-lib-y += safe_write.o
-lib-y += setup_environment.o
-lib-y += sha1.o
-lib-y += signals.o
-lib-y += simplify_path.o
-lib-y += skip_whitespace.o
-lib-y += speed_table.o
-lib-y += str_tolower.o
-lib-y += time.o
-lib-y += trim.o
-lib-y += u_signal_names.o
-lib-y += udp_io.o
-lib-y += uuencode.o
-lib-y += vdprintf.o
-lib-y += verror_msg.o
-lib-y += vfork_daemon_rexec.o
-lib-y += warn_ignoring_args.o
-lib-y += wfopen.o
-lib-y += wfopen_input.o
-lib-y += xatonum.o
-lib-y += xconnect.o
-lib-y += xfuncs.o
-lib-y += xgetcwd.o
-lib-y += xgethostbyname.o
-lib-y += xreadlink.o
-
-# conditionally compiled objects:
-lib-$(CONFIG_FEATURE_MOUNT_LOOP) += loop.o
-lib-$(CONFIG_LOSETUP) += loop.o
-lib-$(CONFIG_FEATURE_MTAB_SUPPORT) += mtab.o
-lib-$(CONFIG_PASSWD) += pw_encrypt.o crypt_make_salt.o update_passwd.o
-lib-$(CONFIG_CHPASSWD) += pw_encrypt.o crypt_make_salt.o update_passwd.o
-lib-$(CONFIG_CRYPTPW) += pw_encrypt.o crypt_make_salt.o
-lib-$(CONFIG_SULOGIN) += pw_encrypt.o
-lib-$(CONFIG_FEATURE_HTTPD_AUTH_MD5) += pw_encrypt.o
-lib-$(CONFIG_VLOCK) += correct_password.o
-lib-$(CONFIG_SU) += correct_password.o
-lib-$(CONFIG_LOGIN) += correct_password.o
-lib-$(CONFIG_DF) += find_mount_point.o
-lib-$(CONFIG_MKFS_MINIX) += find_mount_point.o
-lib-$(CONFIG_SELINUX) += selinux_common.o
-lib-$(CONFIG_HWCLOCK) += rtc.o
-lib-$(CONFIG_RTCWAKE) += rtc.o
-lib-$(CONFIG_FEATURE_CHECK_NAMES) += die_if_bad_username.o
-
-# We shouldn't build xregcomp.c if we don't need it - this ensures we don't
-# require regex.h to be in the include dir even if we don't need it thereby
-# allowing us to build busybox even if uclibc regex support is disabled.
-
-lib-$(CONFIG_AWK) += xregcomp.o
-lib-$(CONFIG_SED) += xregcomp.o
-lib-$(CONFIG_GREP) += xregcomp.o
-lib-$(CONFIG_EXPR) += xregcomp.o
-lib-$(CONFIG_MDEV) += xregcomp.o
-lib-$(CONFIG_LESS) += xregcomp.o
-lib-$(CONFIG_PGREP) += xregcomp.o
-lib-$(CONFIG_PKILL) += xregcomp.o
-lib-$(CONFIG_DEVFSD) += xregcomp.o
-lib-$(CONFIG_FEATURE_FIND_REGEX) += xregcomp.o
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * crypt_make_salt
- *
- * i64c was also put here, this is the only function that uses it.
- *
- * Lifted from loginutils/passwd.c by Thomas Lundquist <thomasez@zelow.no>
- *
- */
-
-#include "libbb.h"
-
-static int i64c(int i)
-{
- i &= 0x3f;
- if (i == 0)
- return '.';
- if (i == 1)
- return '/';
- if (i < 12)
- return ('0' - 2 + i);
- if (i < 38)
- return ('A' - 12 + i);
- return ('a' - 38 + i);
-}
-
-int crypt_make_salt(char *p, int cnt, int x)
-{
- x += getpid() + time(NULL);
- do {
- /* x = (x*1664525 + 1013904223) % 2^32 generator is lame
- * (low-order bit is not "random", etc...),
- * but for our purposes it is good enough */
- x = x*1664525 + 1013904223;
- /* BTW, Park and Miller's "minimal standard generator" is
- * x = x*16807 % ((2^31)-1)
- * It has no problem with visibly alternating lowest bit
- * but is also weak in cryptographic sense + needs div,
- * which needs more code (and slower) on many CPUs */
- *p++ = i64c(x >> 16);
- *p++ = i64c(x >> 22);
- } while (--cnt);
- *p = '\0';
- return x;
-}
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * Utility routines.
- *
- * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "libbb.h"
-
-void bb_error_msg(const char *s, ...)
-{
- va_list p;
-
- va_start(p, s);
- bb_verror_msg(s, p, NULL);
- va_end(p);
-}
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * Utility routines.
- *
- * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "libbb.h"
-
-int die_sleep;
-#if ENABLE_FEATURE_PREFER_APPLETS || ENABLE_HUSH
-jmp_buf die_jmp;
-#endif
-
-void xfunc_die(void)
-{
- if (die_sleep) {
- if ((ENABLE_FEATURE_PREFER_APPLETS || ENABLE_HUSH)
- && die_sleep < 0
- ) {
- /* Special case. We arrive here if NOFORK applet
- * calls xfunc, which then decides to die.
- * We don't die, but jump instead back to caller.
- * NOFORK applets still cannot carelessly call xfuncs:
- * p = xmalloc(10);
- * q = xmalloc(10); // BUG! if this dies, we leak p!
- */
- /* -2222 means "zero" (longjmp can't pass 0)
- * run_nofork_applet() catches -2222. */
- longjmp(die_jmp, xfunc_error_retval ? xfunc_error_retval : -2222);
- }
- sleep(die_sleep);
- }
- exit(xfunc_error_retval);
-}
-
-void bb_error_msg_and_die(const char *s, ...)
-{
- va_list p;
-
- va_start(p, s);
- bb_verror_msg(s, p, NULL);
- va_end(p);
- xfunc_die();
-}
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * Utility routines.
- *
- * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "libbb.h"
-
-void bb_herror_msg_and_die(const char *s, ...)
-{
- va_list p;
-
- va_start(p, s);
- bb_verror_msg(s, p, hstrerror(h_errno));
- va_end(p);
- xfunc_die();
-}
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * Utility routines.
- *
- * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "libbb.h"
-
-void bb_perror_msg_and_die(const char *s, ...)
-{
- va_list p;
-
- va_start(p, s);
- /* Guard against "<error message>: Success" */
- bb_verror_msg(s, p, errno ? strerror(errno) : NULL);
- va_end(p);
- xfunc_die();
-}
-
-void bb_simple_perror_msg_and_die(const char *s)
-{
- bb_perror_msg_and_die("%s", s);
-}
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * Copyright 1989 - 1991, Julianne Frances Haugh <jockgrrl@austin.rr.com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Julianne F. Haugh nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JULIE HAUGH AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL JULIE HAUGH OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include "libbb.h"
-
-/* Return 1 if SHELL is a restricted shell (one not returned by
- getusershell), else 0, meaning it is a standard shell. */
-int restricted_shell(const char *shell)
-{
- char *line;
-
- setusershell();
- while ((line = getusershell())) {
- if (*line != '#' && strcmp(line, shell) == 0)
- return 0;
- }
- endusershell();
- return 1;
-}
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y := uidgid_get.o
-
-lib-$(CONFIG_USE_BB_PWD_GRP) += pwd_grp.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Login/Password Management Utilities"
-
-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 USE_BB_SHADOW
- bool "Use busybox shadow password functions"
- default y
- depends on USE_BB_PWD_GRP && 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 USE_BB_PWD_GRP
- bool "Use internal password and group functions rather than system functions"
- default n
- help
- If you leave this disabled, busybox will use the system's password
- and group 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 password and group 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/password, /etc/group files (and your system will be
- 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 remote LDAP password servers and whatnot. And if you
- want hostname resolution to work with glibc, you still need the
- /lib/libnss_* libraries.
-
- If you enable this option, it will add about 1.5k to busybox.
-
-config ADDGROUP
- bool "addgroup"
- default n
- help
- Utility for creating a new group account.
-
-config FEATURE_ADDUSER_TO_GROUP
- bool "Support for adding users to groups"
- default n
- depends on ADDGROUP
- help
- If called with two non-option arguments,
- addgroup will add an existing user to an
- existing group.
-
-config DELGROUP
- bool "delgroup"
- default n
- help
- Utility for deleting a group account.
-
-config FEATURE_DEL_USER_FROM_GROUP
- bool "Support for removing users from groups."
- default n
- depends on DELGROUP
- help
- If called with two non-option arguments, deluser
- or delgroup will remove an user from a specified group.
-
-config FEATURE_CHECK_NAMES
- bool "Enable sanity check on user/group names in adduser and addgroup"
- default n
- depends on ADDUSER || ADDGROUP
- help
- Enable sanity check on user and group names in adduser and addgroup.
- To avoid problems, the user or group name should consist only of
- letters, digits, underscores, periods, at signs and dashes,
- and not start with a dash (as defined by IEEE Std 1003.1-2001).
- For compatibility with Samba machine accounts "$" is also supported
- at the end of the user or group name.
-
-config ADDUSER
- bool "adduser"
- default n
- help
- Utility for creating a new user account.
-
-config FEATURE_ADDUSER_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on ADDUSER && GETOPT_LONG
- help
- Support long options for the adduser applet.
-
-config DELUSER
- bool "deluser"
- default n
- help
- Utility for deleting a user account.
-
-config GETTY
- bool "getty"
- default n
- select FEATURE_SYSLOG
- help
- getty lets you log in on a tty, it is normally invoked by init.
-
-config FEATURE_UTMP
- bool "Support utmp file"
- depends on GETTY || LOGIN || SU || WHO
- default n
- help
- The file /var/run/utmp is used to track who is currently logged in.
-
-config FEATURE_WTMP
- bool "Support wtmp file"
- depends on GETTY || LOGIN || SU || LAST
- default n
- select 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 LOGIN
- bool "login"
- default n
- select FEATURE_SUID
- select FEATURE_SYSLOG
- help
- login is used when signing onto a system.
-
- Note that Busybox binary must be setuid root for this applet to
- work properly.
-
-config PAM
- bool "Support for PAM (Pluggable Authentication Modules)"
- default n
- depends on LOGIN
- help
- Use PAM in login(1) instead of direct access to password database.
-
-config LOGIN_SCRIPTS
- bool "Support for login scripts"
- depends on LOGIN
- default n
- help
- Enable this if you want login to execute $LOGIN_PRE_SUID_SCRIPT
- just prior to switching from root to logged-in user.
-
-config FEATURE_NOLOGIN
- bool "Support for /etc/nologin"
- default y
- depends on LOGIN
- help
- The file /etc/nologin is used by (some versions of) login(1).
- If it exists, non-root logins are prohibited.
-
-config FEATURE_SECURETTY
- bool "Support for /etc/securetty"
- default y
- depends on LOGIN
- help
- The file /etc/securetty is used by (some versions of) login(1).
- The file contains the device names of tty lines (one per line,
- without leading /dev/) on which root is allowed to login.
-
-config PASSWD
- bool "passwd"
- default n
- select FEATURE_SUID
- select FEATURE_SYSLOG
- help
- passwd changes passwords for user and group accounts. A normal user
- may only change the password for his/her own account, the super user
- may change the password for any account. The administrator of a group
- may change the password for the group.
-
- Note that Busybox binary must be setuid root for this applet to
- work properly.
-
-config FEATURE_PASSWD_WEAK_CHECK
- bool "Check new passwords for weakness"
- default y
- depends on PASSWD
- help
- With this option passwd will refuse new passwords which are "weak".
-
-config CRYPTPW
- bool "cryptpw"
- default n
- help
- Applet for crypting a string.
-
-config CHPASSWD
- bool "chpasswd"
- default n
- help
- chpasswd reads a file of user name and password pairs from
- standard input and uses this information to update a group of
- existing users.
-
-config SU
- bool "su"
- default n
- select FEATURE_SUID
- select FEATURE_SYSLOG
- help
- su is used to become another user during a login session.
- Invoked without a username, su defaults to becoming the super user.
-
- Note that Busybox binary must be setuid root for this applet to
- work properly.
-
-config FEATURE_SU_SYSLOG
- bool "Enable su to write to syslog"
- default y
- depends on SU
-
-config FEATURE_SU_CHECKS_SHELLS
- bool "Enable su to check user's shell to be listed in /etc/shells"
- depends on SU
- default y
-
-config SULOGIN
- bool "sulogin"
- default n
- select FEATURE_SYSLOG
- help
- sulogin is invoked when the system goes into single user
- mode (this is done through an entry in inittab).
-
-config VLOCK
- bool "vlock"
- default n
- select FEATURE_SUID
- help
- Build the "vlock" applet which allows you to lock (virtual) terminals.
-
- Note that Busybox binary must be setuid root for this applet to
- work properly.
-
-endmenu
-
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_ADDGROUP) += addgroup.o
-lib-$(CONFIG_ADDUSER) += adduser.o
-lib-$(CONFIG_CRYPTPW) += cryptpw.o
-lib-$(CONFIG_CHPASSWD) += chpasswd.o
-lib-$(CONFIG_GETTY) += getty.o
-lib-$(CONFIG_LOGIN) += login.o
-lib-$(CONFIG_PASSWD) += passwd.o
-lib-$(CONFIG_SU) += su.o
-lib-$(CONFIG_SULOGIN) += sulogin.o
-lib-$(CONFIG_VLOCK) += vlock.o
-lib-$(CONFIG_DELUSER) += deluser.o
-lib-$(CONFIG_DELGROUP) += deluser.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Miscellaneous Utilities"
-
-config ADJTIMEX
- bool "adjtimex"
- default n
- help
- Adjtimex reads and optionally sets adjustment parameters for
- the Linux clock adjustment algorithm.
-
-config BBCONFIG
- bool "bbconfig"
- default n
- help
- The bbconfig applet will print the config file with which
- busybox was built.
-
-config CHAT
- bool "chat"
- default n
- help
- Simple chat utility.
-
-config FEATURE_CHAT_NOFAIL
- bool "Enable NOFAIL expect strings"
- depends on CHAT
- default y
- help
- When enabled expect strings which are started with a dash trigger
- no-fail mode. That is when expectation is not met within timeout
- the script is not terminated but sends next SEND string and waits
- for next EXPECT string. This allows to compose far more flexible
- scripts.
-
-config FEATURE_CHAT_TTY_HIFI
- bool "Force STDIN to be a TTY"
- depends on CHAT
- default n
- help
- Original chat always treats STDIN as a TTY device and sets for it
- so-called raw mode. This option turns on such behaviour.
-
-config FEATURE_CHAT_IMPLICIT_CR
- bool "Enable implicit Carriage Return"
- depends on CHAT
- default y
- help
- When enabled make chat to terminate all SEND strings with a "\r"
- unless "\c" is met anywhere in the string.
-
-config FEATURE_CHAT_SWALLOW_OPTS
- bool "Swallow options"
- depends on CHAT
- default n
- help
- Busybox chat require no options. To make it not fail when used
- in place of original chat (which has a bunch of options) turn
- this on.
-
-config FEATURE_CHAT_SEND_ESCAPES
- bool "Support weird SEND escapes"
- depends on CHAT
- default n
- help
- Original chat uses some escape sequences in SEND arguments which
- are not sent to device but rather performs special actions.
- E.g. "\K" means to send a break sequence to device.
- "\d" delays execution for a second, "\p" -- for a 1/100 of second.
- Before turning this option on think twice: do you really need them?
-
-config FEATURE_CHAT_VAR_ABORT_LEN
- bool "Support variable-length ABORT conditions"
- depends on CHAT
- default n
- help
- Original chat uses fixed 50-bytes length ABORT conditions. Say N here.
-
-config FEATURE_CHAT_CLR_ABORT
- bool "Support revoking of ABORT conditions"
- depends on CHAT
- default n
- help
- Support CLR_ABORT directive.
-
-config CHRT
- bool "chrt"
- default n
- help
- manipulate real-time attributes of a process.
- This requires sched_{g,s}etparam support in your libc.
-
-config CROND
- bool "crond"
- default n
- select FEATURE_SUID
- select FEATURE_SYSLOG
- help
- Crond is a background daemon that parses individual crontab
- files and executes commands on behalf of the users in question.
- This is a port of dcron from slackware. It uses files of the
- format /var/spool/cron/crontabs/<username> files, for example:
- $ cat /var/spool/cron/crontabs/root
- # Run daily cron jobs at 4:40 every day:
- 40 4 * * * /etc/cron/daily > /dev/null 2>&1
-
-config DEBUG_CROND_OPTION
- bool "Support option -d to redirect output to stderr"
- depends on CROND
- default n
- help
- -d sets loglevel to 0 (most verbose) and directs all output to stderr.
-
-config FEATURE_CROND_CALL_SENDMAIL
- bool "Using /usr/sbin/sendmail?"
- default n
- depends on CROND
- help
- Support calling /usr/sbin/sendmail for send cmd outputs.
-
-config CRONTAB
- bool "crontab"
- default n
- select FEATURE_SUID
- help
- Crontab manipulates the crontab for a particular user. Only
- the superuser may specify a different user and/or crontab directory.
- Note that Busybox binary must be setuid root for this applet to
- work properly.
-
-config DC
- bool "dc"
- default n
- help
- Dc is a reverse-polish desk calculator which supports unlimited
- precision arithmetic.
-
-config DEVFSD
- bool "devfsd (obsolete)"
- default n
- select FEATURE_SYSLOG
- help
- This is deprecated, and will be removed at the end of 2008.
-
- 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:
- "CLEAR_CONFIG", "INCLUDE", "OPTIONAL_INCLUDE", "RESTORE",
- "PERMISSIONS", "EXECUTE", "COPY", "IGNORE",
- "MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT".
-
- But only if they are written UPPERCASE!!!!!!!!
-
-config DEVFSD_MODLOAD
- bool "Adds support for MODLOAD keyword in devsfd.conf"
- default n
- depends on DEVFSD
- help
- This actually doesn't work with busybox modutils but needs
- the external modutils.
-
-config DEVFSD_FG_NP
- bool "Enables the -fg and -np options"
- default n
- depends on DEVFSD
- help
- -fg Run the daemon in the foreground.
- -np Exit after parsing the configuration file. Do not poll for events.
-
-config DEVFSD_VERBOSE
- bool "Increases logging (and size)"
- default n
- depends on DEVFSD
- help
- Increases logging to stderr or syslog.
-
-config FEATURE_DEVFS
- bool "Use devfs names for all devices (obsolete)"
- default n
- help
- This is obsolete and will be going away at the end of 2008..
-
- 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.
-
-config EJECT
- bool "eject"
- default n
- help
- Used to eject cdroms. (defaults to /dev/cdrom)
-
-config FEATURE_EJECT_SCSI
- bool "SCSI support"
- default n
- depends on EJECT
- help
- Add the -s option to eject, this allows to eject SCSI-Devices and
- usb-storage devices.
-
-config LAST
- bool "last"
- default n
- select FEATURE_WTMP
- help
- 'last' displays a list of the last users that logged into the system.
-
-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 FEATURE_LESS_MAXLINES
- int "Max number of input lines less will try to eat"
- default 9999999
- depends on LESS
-
-config FEATURE_LESS_BRACKETS
- bool "Enable bracket searching"
- default y
- depends on LESS
- help
- This option adds the capability to search for matching left and right
- brackets, facilitating programming.
-
-config FEATURE_LESS_FLAGS
- bool "Enable extra flags"
- default y
- depends on 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 FEATURE_LESS_FLAGCS
- bool "Enable flag changes"
- default n
- depends on LESS
- help
- This enables the ability to change command-line flags within
- less itself.
-
-config FEATURE_LESS_MARKS
- bool "Enable marks"
- default n
- depends on LESS
- help
- Marks enable positions in a file to be stored for easy reference.
-
-config FEATURE_LESS_REGEXP
- bool "Enable regular expressions"
- default n
- depends on LESS
- help
- Enable regular expressions, allowing complex file searches.
-
-config HDPARM
- bool "hdparm"
- default n
- help
- Get/Set hard drive parameters. Primarily intended for ATA
- drives. Adds about 13k (or around 30k if you enable the
- FEATURE_HDPARM_GET_IDENTITY option)....
-
-config FEATURE_HDPARM_GET_IDENTITY
- bool "Support obtaining detailed information directly from drives"
- default y
- depends on HDPARM
- help
- Enables the -I and -i options to obtain detailed information
- directly from drives about their capabilities and supported ATA
- feature set. If no device name is specified, hdparm will read
- identify data from stdin. Enabling this option will add about 16k...
-
-config FEATURE_HDPARM_HDIO_SCAN_HWIF
- bool "Register an IDE interface (DANGEROUS)"
- default n
- depends on HDPARM
- help
- Enables the 'hdparm -R' option to register an IDE interface.
- This is dangerous stuff, so you should probably say N.
-
-config FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
- bool "Un-register an IDE interface (DANGEROUS)"
- default n
- depends on HDPARM
- help
- Enables the 'hdparm -U' option to un-register an IDE interface.
- This is dangerous stuff, so you should probably say N.
-
-config FEATURE_HDPARM_HDIO_DRIVE_RESET
- bool "perform device reset (DANGEROUS)"
- default n
- depends on HDPARM
- help
- Enables the 'hdparm -w' option to perform a device reset.
- This is dangerous stuff, so you should probably say N.
-
-config FEATURE_HDPARM_HDIO_TRISTATE_HWIF
- bool "tristate device for hotswap (DANGEROUS)"
- default n
- depends on HDPARM
- help
- Enables the 'hdparm -x' option to tristate device for hotswap,
- and the '-b' option to get/set bus state. This is dangerous
- stuff, so you should probably say N.
-
-config FEATURE_HDPARM_HDIO_GETSET_DMA
- bool "get/set using_dma flag (DANGEROUS)"
- default n
- depends on HDPARM
- help
- Enables the 'hdparm -d' option to get/set using_dma flag.
- This is dangerous stuff, so you should probably say N.
-
-config MAKEDEVS
- bool "makedevs"
- default n
- help
- '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 made with one command.
- User/group names are allowed as an alternative to uid/gid.
-
-choice
- prompt "Choose makedevs behaviour"
- depends on MAKEDEVS
- default FEATURE_MAKEDEVS_TABLE
-
-config FEATURE_MAKEDEVS_LEAF
- bool "leaf"
-
-config FEATURE_MAKEDEVS_TABLE
- bool "table"
-
-endchoice
-
-config MICROCOM
- bool "microcom"
- default n
- help
- The poor man's minicom utility for chatting with serial port devices.
-
-config MOUNTPOINT
- bool "mountpoint"
- default n
- help
- mountpoint checks if the directory is a mountpoint.
-
-config MT
- bool "mt"
- default n
- help
- mt is used to control tape devices. You can use the mt utility
- to advance or rewind a tape past a specified number of archive
- files on the tape.
-
-config RAIDAUTORUN
- bool "raidautorun"
- default n
- help
- raidautorun tells the kernel md driver to
- search and start RAID arrays.
-
-config READAHEAD
- bool "readahead"
- default n
- depends on LFS
- help
- Preload the files listed on the command line into RAM cache so that
- subsequent reads on these files will not block on disk I/O.
-
- This applet just calls the readahead(2) system call on each file.
- It is mainly useful in system startup scripts to preload files
- or executables before they are used. When used at the right time
- (in particular when a CPU boundprocess is running) it can
- significantly speed up system startup.
-
- As readahead(2) blocks until each file has been read, it is best to
- run this applet as a background job.
-
-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 RX
- bool "rx"
- default n
- help
- Receive files using the Xmodem protocol.
-
-config SCRIPT
- bool "script"
- default n
- help
- The script makes typescript of terminal session.
-
-config STRINGS
- bool "strings"
- default n
- help
- strings prints the printable character sequences for each file
- specified.
-
-config SETSID
- bool "setsid"
- default n
- help
- setsid runs a program in a new session
-
-config TASKSET
- bool "taskset"
- default n
- help
- Retrieve or set a processes's CPU affinity.
- This requires sched_{g,s}etaffinity support in your libc.
-
-config FEATURE_TASKSET_FANCY
- bool "Fancy output"
- default y
- depends on TASKSET
- help
- Add code for fancy output. This merely silences a compiler-warning
- and adds about 135 Bytes. May be needed for machines with alot
- of CPUs.
-
-config TIME
- bool "time"
- default n
- help
- The time command runs the specified program with the given arguments.
- When the command finishes, time writes a message to standard output
- giving timing statistics about this program run.
-
-config TTYSIZE
- bool "ttysize"
- default n
- help
- A replacement for "stty size". Unlike stty, can report only width,
- only height, or both, in any order. It also does not complain on error,
- but returns default 80x24. Usage in shell scripts: width=`ttysize w`.
-
-config WATCHDOG
- bool "watchdog"
- default n
- help
- The watchdog utility is used with hardware or software watchdog
- device drivers. It opens the specified watchdog device special file
- and periodically writes a magic character to the device. If the
- watchdog applet ever fails to write the magic character within a
- certain amount of time, the watchdog device assumes the system has
- hung, and will cause the hardware to reboot.
-
-endmenu
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_ADJTIMEX) += adjtimex.o
-lib-$(CONFIG_BBCONFIG) += bbconfig.o
-lib-$(CONFIG_CHAT) += chat.o
-lib-$(CONFIG_CHRT) += chrt.o
-lib-$(CONFIG_CROND) += crond.o
-lib-$(CONFIG_CRONTAB) += crontab.o
-lib-$(CONFIG_DC) += dc.o
-lib-$(CONFIG_DEVFSD) += devfsd.o
-lib-$(CONFIG_EJECT) += eject.o
-lib-$(CONFIG_HDPARM) += hdparm.o
-lib-$(CONFIG_LAST) += last.o
-lib-$(CONFIG_LESS) += less.o
-lib-$(CONFIG_MAKEDEVS) += makedevs.o
-lib-$(CONFIG_MICROCOM) += microcom.o
-lib-$(CONFIG_MOUNTPOINT) += mountpoint.o
-lib-$(CONFIG_MT) += mt.o
-lib-$(CONFIG_RAIDAUTORUN) += raidautorun.o
-lib-$(CONFIG_READAHEAD) += readahead.o
-lib-$(CONFIG_RUNLEVEL) += runlevel.o
-lib-$(CONFIG_RX) += rx.o
-lib-$(CONFIG_SETSID) += setsid.o
-lib-$(CONFIG_STRINGS) += strings.o
-lib-$(CONFIG_TASKSET) += taskset.o
-lib-$(CONFIG_TIME) += time.o
-lib-$(CONFIG_TTYSIZE) += ttysize.o
-lib-$(CONFIG_WATCHDOG) += watchdog.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Linux Module Utilities"
-
-config INSMOD
- bool "insmod"
- default n
- help
- insmod is used to load specified modules in the running kernel.
-
-config FEATURE_INSMOD_VERSION_CHECKING
- bool "Module version checking"
- default n
- depends on INSMOD && FEATURE_2_4_MODULES
- help
- Support checking of versions for modules. This is used to
- ensure that the kernel and module are made for each other.
-
-config FEATURE_INSMOD_KSYMOOPS_SYMBOLS
- bool "Add module symbols to kernel symbol table"
- default n
- depends on INSMOD && FEATURE_2_4_MODULES
- help
- By adding module symbols to the kernel symbol table, Oops messages
- occuring within kernel modules can be properly debugged. By enabling
- this feature, module symbols will always be added to the kernel symbol
- table for properly debugging support. If you are not interested in
- Oops messages from kernel modules, say N.
-
-config FEATURE_INSMOD_LOADINKMEM
- bool "In kernel memory optimization (uClinux only)"
- default n
- depends on INSMOD && FEATURE_2_4_MODULES
- help
- This is a special uClinux only memory optimization that lets insmod
- load the specified kernel module directly into kernel space, reducing
- memory usage by preventing the need for two copies of the module
- being loaded into memory.
-
-config FEATURE_INSMOD_LOAD_MAP
- bool "Enable load map (-m) option"
- default n
- depends on INSMOD && ( FEATURE_2_4_MODULES || FEATURE_2_6_MODULES )
- help
- Enabling this, one would be able to get a load map
- output on stdout. This makes kernel module debugging
- easier.
- If you don't plan to debug kernel modules, you
- don't need this option.
-
-config FEATURE_INSMOD_LOAD_MAP_FULL
- bool "Symbols in load map"
- default y
- depends on FEATURE_INSMOD_LOAD_MAP
- help
- Without this option, -m will only output section
- load map. With this option, -m will also output
- symbols load map.
-
-config RMMOD
- bool "rmmod"
- default n
- help
- rmmod is used to unload specified modules from the kernel.
-
-config LSMOD
- bool "lsmod"
- default n
- help
- lsmod is used to display a list of loaded modules.
-
-config FEATURE_LSMOD_PRETTY_2_6_OUTPUT
- bool "Pretty output for 2.6.x Linux kernels"
- default n
- depends on LSMOD
- help
- This option makes output format of lsmod adjusted to
- the format of module-init-tools for Linux kernel 2.6.
-
-config MODPROBE
- bool "modprobe"
- default n
- help
- Handle the loading of modules, and their dependencies on a high
- level.
-
- Note that in the state, modprobe does not understand multiple
- module options from the configuration file. See option below.
-
-config FEATURE_MODPROBE_MULTIPLE_OPTIONS
- bool
- prompt "Multiple options parsing" if NITPICK
- default y
- depends on MODPROBE
- help
- 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.
-
-config FEATURE_MODPROBE_FANCY_ALIAS
- bool
- prompt "Fancy alias parsing" if NITPICK
- default y
- depends on MODPROBE && FEATURE_2_6_MODULES
- help
- Say 'y' here to enable parsing of aliases with underscore/dash
- mismatch between module name and file name, along with bus-specific
- aliases (such as pci:... or usb:... aliases).
-
-comment "Options common to multiple modutils"
- depends on INSMOD || RMMOD || MODPROBE || LSMOD
-
-config FEATURE_CHECK_TAINTED_MODULE
- # Simulate indentation
- bool "Support tainted module checking with new kernels"
- default y
- depends on INSMOD || LSMOD
- help
- Support checking for tainted modules. These are usually binary
- only modules that will make the linux-kernel list ignore your
- support request.
- This option is required to support GPLONLY modules.
-
-config FEATURE_2_4_MODULES
- # Simulate indentation
- bool "Support version 2.2.x to 2.4.x Linux kernels"
- default y
- depends on INSMOD || RMMOD || MODPROBE
- help
- Support module loading for 2.2.x and 2.4.x Linux kernels.
-
-config FEATURE_2_6_MODULES
- # Simulate indentation
- bool "Support version 2.6.x Linux kernels"
- default y
- depends on INSMOD || RMMOD || MODPROBE
- help
- Support module loading for newer 2.6.x Linux kernels.
-
-
-config FEATURE_QUERY_MODULE_INTERFACE
- bool
- default y
- depends on FEATURE_2_4_MODULES && !FEATURE_2_6_MODULES
-
-
-endmenu
-
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_INSMOD) += insmod.o
-lib-$(CONFIG_LSMOD) += lsmod.o
-lib-$(CONFIG_MODPROBE) += modprobe.o
-lib-$(CONFIG_RMMOD) += rmmod.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Networking Utilities"
-
-config FEATURE_IPV6
- bool "Enable IPv6 support"
- default n
- help
- Enable IPv6 support in busybox.
- This adds IPv6 support in the networking applets.
-
-config FEATURE_PREFER_IPV4_ADDRESS
- bool "Preferentially use IPv4 addresses from DNS queries"
- default y
- depends on FEATURE_IPV6
- help
- Use IPv4 address of network host if it has one.
-
- If this option is off, the first returned address will be used.
- This may cause problems when your DNS server is IPv6-capable and
- is returning IPv6 host addresses too. If IPv6 address
- precedes IPv4 one in DNS reply, busybox network applets
- (e.g. wget) will use IPv6 address. On an IPv6-incapable host
- or network applets will fail to connect to the host
- using IPv6 address.
-
-config VERBOSE_RESOLUTION_ERRORS
- bool "Verbose resolution errors"
- default n
- help
- Enable if you are not satisfied with simplistic
- "can't resolve 'hostname.com'" and want to know more.
- This may increase size of your executable a bit.
-
-config ARP
- bool "arp"
- default n
- help
- Manipulate the system ARP cache.
-
-config ARPING
- bool "arping"
- default n
- help
- Ping hosts by ARP packets.
-
-config BRCTL
- bool "brctl"
- default n
- help
- Manage ethernet bridges.
- Supports addbr/delbr and addif/delif.
-
-#config FEATURE_BRCTL_SHOW
-# bool "Support show, showmac and showstp"
-# default n
-# depends on BRCTL
-# help
-# Add support for option which print the current config:
-# showmacs, showstp, show
-
-config FEATURE_BRCTL_FANCY
- bool "Fancy options"
- default n
- depends on BRCTL
- help
- Add support for extended option like:
- setageing, setfd, sethello, setmaxage,
- setpathcost, setportprio, setbridgeprio,
- stp
- This adds about 600 bytes.
-
-config DNSD
- bool "dnsd"
- default n
- help
- Small and static DNS server daemon.
-
-config ETHER_WAKE
- bool "ether-wake"
- default n
- help
- Send a magic packet to wake up sleeping machines.
-
-config FAKEIDENTD
- bool "fakeidentd"
- default n
- select FEATURE_SYSLOG
- help
- fakeidentd listens on the ident port and returns a predefined
- fake value on any query.
-
-config FTPGET
- bool "ftpget"
- default n
- help
- Retrieve a remote file via FTP.
-
-config FTPPUT
- bool "ftpput"
- default n
- help
- Store a remote file via FTP.
-
-config FEATURE_FTPGETPUT_LONG_OPTIONS
- bool "Enable long options in ftpget/ftpput"
- default n
- depends on GETOPT_LONG && (FTPGET || FTPPUT)
- help
- Support long options for the ftpget/ftpput applet.
-
-config HOSTNAME
- bool "hostname"
- default n
- help
- Show or set the system's host name.
-
-config HTTPD
- bool "httpd"
- default n
- help
- Serve web pages via an HTTP server.
-
-config FEATURE_HTTPD_RANGES
- bool "Support 'Ranges:' header"
- default n
- depends on HTTPD
- help
- Makes httpd emit "Accept-Ranges: bytes" header and understand
- "Range: bytes=NNN-[MMM]" header. Allows for resuming interrupted
- downloads, seeking in multimedia players etc.
-
-config FEATURE_HTTPD_USE_SENDFILE
- bool "Use sendfile system call"
- default n
- depends on HTTPD
- help
- When enabled, httpd will use the kernel sendfile() function
- instead of read/write loop.
-
-config FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP
- bool "Support reloading of global config file on HUP signal"
- default n
- depends on HTTPD
- help
- This option enables processing of SIGHUP to reload cached
- configuration settings.
-
-config FEATURE_HTTPD_SETUID
- bool "Enable -u <user> option"
- default n
- depends on 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.
-
-config FEATURE_HTTPD_BASIC_AUTH
- bool "Enable Basic http Authentication"
- default y
- depends on HTTPD
- help
- Utilizes password settings from /etc/httpd.conf for basic
- authentication on a per url basis.
-
-config FEATURE_HTTPD_AUTH_MD5
- bool "Support MD5 crypted passwords for http Authentication"
- default n
- depends on FEATURE_HTTPD_BASIC_AUTH
- help
- Enables basic per URL authentication from /etc/httpd.conf
- using md5 passwords.
-
-config FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES
- bool "Support loading additional MIME types at run-time"
- default n
- depends on HTTPD
- help
- This option enables support for additional MIME types at
- run-time to be specified in the configuration file.
-
-config FEATURE_HTTPD_CGI
- bool "Support Common Gateway Interface (CGI)"
- default y
- depends on HTTPD
- help
- This option allows scripts and executables to be invoked
- when specific URLs are requested.
-
-config FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
- bool "Support for running scripts through an interpreter"
- default n
- depends on 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 additional line in your httpd
- config file:
- *.php:/path/to/your/php
-
-config FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
- bool "Set REMOTE_PORT environment variable for CGI"
- default n
- depends on FEATURE_HTTPD_CGI
- help
- Use of this option can assist scripts in generating
- references that contain a unique port number.
-
-config FEATURE_HTTPD_ENCODE_URL_STR
- bool "Enable -e option (useful for CGIs written as shell scripts)"
- default y
- depends on HTTPD
- help
- This option allows html encoding of arbitrary strings for display
- by the browser. Output goes to stdout.
- For example, httpd -e "<Hello World>" produces
- "<Hello World>".
-
-config FEATURE_HTTPD_ERROR_PAGES
- bool "Support for custom error pages"
- default n
- depends on HTTPD
- help
- This option allows you to define custom error pages in
- the configuration file instead of the default HTTP status
- error pages. For instance, if you add the line:
- E404:/path/e404.html
- in the config file, the server will respond the specified
- '/path/e404.html' file instead of the terse '404 NOT FOUND'
- message.
-
-config FEATURE_HTTPD_PROXY
- bool "Support for reverse proxy"
- default n
- depends on HTTPD
- help
- This option allows you to define URLs that will be forwarded
- to another HTTP server. To setup add the following line to the
- configuration file
- P:/url/:http://hostname[:port]/new/path/
- Then a request to /url/myfile will be forwarded to
- http://hostname[:port]/new/path/myfile.
-
-config IFCONFIG
- bool "ifconfig"
- default n
- help
- Ifconfig is used to configure the kernel-resident network interfaces.
-
-config FEATURE_IFCONFIG_STATUS
- bool "Enable status reporting output (+7k)"
- default y
- depends on IFCONFIG
- help
- If ifconfig is called with no arguments it will display the status
- of the currently active interfaces.
-
-config FEATURE_IFCONFIG_SLIP
- bool "Enable slip-specific options \"keepalive\" and \"outfill\""
- default n
- depends on IFCONFIG
- help
- Allow "keepalive" and "outfill" support for SLIP. If you're not
- planning on using serial lines, leave this unchecked.
-
-config FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
- bool "Enable options \"mem_start\", \"io_addr\", and \"irq\""
- default n
- depends on 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 FEATURE_IFCONFIG_HW
- bool "Enable option \"hw\" (ether only)"
- default y
- depends on IFCONFIG
- help
- Set the hardware address of this interface, if the device driver
- supports this operation. Currently, we only support the 'ether'
- class.
-
-config FEATURE_IFCONFIG_BROADCAST_PLUS
- bool "Set the broadcast automatically"
- default n
- depends on IFCONFIG
- help
- Setting this will make ifconfig attempt to find the broadcast
- automatically if the value '+' is used.
-
-config IFENSLAVE
- bool "ifenslave"
- default n
- help
- Userspace application to bind several interfaces
- to a logical interface (use with kernel bonding driver).
-
-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 IFCONFIG and ROUTE, or enable
- FEATURE_IFUPDOWN_IP and the various 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", "route" and "run-parts" or the "ip" command, either
- via busybox or via standalone utilities.
-
-config IFUPDOWN_IFSTATE_PATH
- string "Absolute path to ifstate file"
- default "/var/run/ifstate"
- depends on IFUPDOWN
- help
- ifupdown keeps state information in a file called ifstate.
- Typically it is located in /var/run/ifstate, however
- some distributions tend to put it in other places
- (debian, for example, uses /etc/network/run/ifstate).
- This config option defines location of ifstate.
-
-config FEATURE_IFUPDOWN_IP
- bool "Use ip applet"
- default n
- depends on 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 FEATURE_IFUPDOWN_IP_BUILTIN
- bool "Use busybox ip applet"
- default y
- depends on FEATURE_IFUPDOWN_IP
- select IP
- select FEATURE_IP_ADDRESS
- select FEATURE_IP_LINK
- select FEATURE_IP_ROUTE
- help
- Use the busybox iproute "ip" applet to implement "ifupdown".
-
- If left disabled, you must install the full-blown iproute2
- utility or the "ifup" and "ifdown" applets will not work.
-
-config FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
- bool "Use busybox ifconfig and route applets"
- default y
- depends on IFUPDOWN && !FEATURE_IFUPDOWN_IP
- select IFCONFIG
- select ROUTE
- help
- Use the busybox iproute "ifconfig" and "route" applets to
- implement the "ifup" and "ifdown" utilities.
-
- If left disabled, you must install the full-blown ifconfig
- and route utilities, or the "ifup" and "ifdown" applets will not
- work.
-
-config FEATURE_IFUPDOWN_IPV4
- bool "Support for IPv4"
- default y
- depends on IFUPDOWN
- help
- If you want ifup/ifdown to talk IPv4, leave this on.
-
-config FEATURE_IFUPDOWN_IPV6
- bool "Support for IPv6"
- default n
- depends on IFUPDOWN && FEATURE_IPV6
- help
- If you need support for IPv6, turn this option on.
-
-### UNUSED
-###config FEATURE_IFUPDOWN_IPX
-### bool "Support for IPX"
-### default n
-### depends on IFUPDOWN
-### help
-### If this option is selected you can use busybox to work with IPX
-### networks.
-
-config FEATURE_IFUPDOWN_MAPPING
- bool "Enable mapping support"
- default n
- depends on IFUPDOWN
- help
- This enables support for the "mapping" stanza, unless you have
- a weird network setup you don't need it.
-
-config FEATURE_IFUPDOWN_EXTERNAL_DHCP
- bool "Support for external dhcp clients"
- default n
- depends on IFUPDOWN
- help
- This enables support for the external dhcp clients. Clients are
- tried in the following order: dhcpcd, dhclient, pump and udhcpc.
- Otherwise, if udhcpc applet is enabled, it is used.
- Otherwise, ifup/ifdown will have no support for DHCP.
-
-config INETD
- bool "inetd"
- default n
- select FEATURE_SYSLOG
- help
- Internet superserver daemon
-
-config FEATURE_INETD_SUPPORT_BUILTIN_ECHO
- bool "Support echo service"
- default y
- depends on INETD
- help
- Echo received data internal inetd service
-
-config FEATURE_INETD_SUPPORT_BUILTIN_DISCARD
- bool "Support discard service"
- default y
- depends on INETD
- help
- Internet /dev/null internal inetd service
-
-config FEATURE_INETD_SUPPORT_BUILTIN_TIME
- bool "Support time service"
- default y
- depends on INETD
- help
- Return 32 bit time since 1900 internal inetd service
-
-config FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME
- bool "Support daytime service"
- default y
- depends on INETD
- help
- Return human-readable time internal inetd service
-
-config FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN
- bool "Support chargen service"
- default y
- depends on INETD
- help
- Familiar character generator internal inetd service
-
-config FEATURE_INETD_RPC
- bool "Support RPC services"
- default n
- depends on INETD
- select FEATURE_HAVE_RPC
- help
- Support Sun-RPC based services
-
-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.
-
-config FEATURE_IP_ADDRESS
- bool "ip address"
- default y
- depends on IP
- help
- Address manipulation support for the "ip" applet.
-
-config FEATURE_IP_LINK
- bool "ip link"
- default y
- depends on IP
- help
- Configure network devices with "ip".
-
-config FEATURE_IP_ROUTE
- bool "ip route"
- default y
- depends on IP
- help
- Add support for routing table management to "ip".
-
-config FEATURE_IP_TUNNEL
- bool "ip tunnel"
- default n
- depends on IP
- help
- Add support for tunneling commands to "ip".
-
-config FEATURE_IP_RULE
- bool "ip rule"
- default n
- depends on IP
- help
- Add support for rule commands to "ip".
-
-config FEATURE_IP_SHORT_FORMS
- bool "Support short forms of ip commands"
- default n
- depends on IP
- help
- Also support short-form of ip <OBJECT> commands:
- ip addr -> ipaddr
- ip link -> iplink
- ip route -> iproute
- ip tunnel -> iptunnel
- ip rule -> iprule
-
- Say N unless you desparately need the short form of the ip
- object commands.
-
-config FEATURE_IP_RARE_PROTOCOLS
- bool "Support displaying rarely used link types"
- default n
- depends on IP
- help
- If you are not going to use links of type "frad", "econet",
- "bif" etc, you probably don't need to enable this.
- Ethernet, wireless, infrared, ppp/slip, ip tunnelling
- link types are supported without this option selected.
-
-config IPADDR
- bool
- default y
- depends on FEATURE_IP_SHORT_FORMS && FEATURE_IP_ADDRESS
-
-config IPLINK
- bool
- default y
- depends on FEATURE_IP_SHORT_FORMS && FEATURE_IP_LINK
-
-config IPROUTE
- bool
- default y
- depends on FEATURE_IP_SHORT_FORMS && FEATURE_IP_ROUTE
-
-config IPTUNNEL
- bool
- default y
- depends on FEATURE_IP_SHORT_FORMS && FEATURE_IP_TUNNEL
-
-config IPRULE
- bool
- default y
- depends on FEATURE_IP_SHORT_FORMS && FEATURE_IP_RULE
-
-config IPCALC
- bool "ipcalc"
- default n
- help
- ipcalc takes an IP address and netmask and calculates the
- resulting broadcast, network, and host range.
-
-config FEATURE_IPCALC_FANCY
- bool "Fancy IPCALC, more options, adds 1 kbyte"
- default y
- depends on IPCALC
- help
- Adds the options hostname, prefix and silent to the output of "ipcalc".
-
-config FEATURE_IPCALC_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on IPCALC && GETOPT_LONG
- help
- Support long options for the ipcalc applet.
-
-config NAMEIF
- bool "nameif"
- default n
- select FEATURE_SYSLOG
- 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 FEATURE_NAMEIF_EXTENDED
- bool "Extended nameif"
- default n
- depends on NAMEIF
- help
- This extends the nameif syntax to support the bus_info and driver
- checks. The syntax is compatible to the normal nameif.
- File format:
- new_interface_name driver=asix bus=usb-0000:00:08.2-3
- new_interface_name bus=usb-0000:00:08.2-3 00:80:C8:38:91:B5
- new_interface_name mac=00:80:C8:38:91:B5
- new_interface_name 00:80:C8:38:91:B5
-
-config NC
- bool "nc"
- default n
- help
- A simple Unix utility which reads and writes data across network
- connections.
-
-config NC_SERVER
- bool "Netcat server options (-l)"
- default n
- depends on NC
- help
- Allow netcat to act as a server.
-
-config NC_EXTRA
- bool "Netcat extensions (-eiw and filename)"
- default n
- depends on NC
- help
- Add -e (support for executing the rest of the command line after
- making or receiving a successful connection), -i (delay interval for
- lines sent), -w (timeout for initial connection).
-
-config NETSTAT
- bool "netstat"
- default n
- help
- netstat prints information about the Linux networking subsystem.
-
-config FEATURE_NETSTAT_WIDE
- bool "Enable wide netstat output"
- default n
- depends on NETSTAT
- help
- Add support for wide columns. Useful when displaying IPv6 addresses
- (-W option).
-
-config NSLOOKUP
- bool "nslookup"
- default n
- help
- nslookup is a tool to query Internet name servers.
-
-config PING
- bool "ping"
- default n
- help
- ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
- elicit an ICMP ECHO_RESPONSE from a host or gateway.
-
-config PING6
- bool "ping6"
- default n
- depends on FEATURE_IPV6 && PING
- help
- This will give you a ping that can talk IPv6.
-
-config FEATURE_FANCY_PING
- bool "Enable fancy ping output"
- default y
- depends on PING
- help
- Make the output from the ping applet include statistics, and at the
- same time provide full support for ICMP packets.
-
-config PSCAN
- bool "pscan"
- default n
- help
- Simple network port scanner.
-
-config ROUTE
- bool "route"
- default n
- help
- Route displays or manipulates the kernel's IP routing tables.
-
-config SENDMAIL
- bool "sendmail"
- default n
- help
- Barebones sendmail.
-
-config FETCHMAIL
- bool "fetchmail"
- default n
- help
- Barebones fetchmail.
-
-config SLATTACH
- bool "slattach"
- default n
- help
- slattach is a small utility to attach network interfaces to serial lines.
-
-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 FEATURE_TELNET_TTYPE
- bool "Pass TERM type to remote host"
- default y
- depends on 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 FEATURE_TELNET_AUTOLOGIN
- bool "Pass USER type to remote host"
- default y
- depends on 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 TELNETD
- bool "telnetd"
- default n
- select FEATURE_SYSLOG
- 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:
- UNIX98_PTYS=y
- 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 LOGIN and
- 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 FEATURE_TELNETD_STANDALONE
- bool "Support standalone telnetd (not inetd only)"
- default n
- depends on TELNETD
- help
- Selecting this will make telnetd able to run standalone.
-
-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 TFTPD
- bool "tftpd"
- default n
- help
- This enables the Trivial File Transfer Protocol server program.
- It expects that stdin is a datagram socket and a packet
- is already pending on it. It will exit after one transfer.
- In other words: it should be run from inetd in nowait mode,
- or from udpsvd. Example: "udpsvd -E 0 69 tftpd DIR"
-
-config FEATURE_TFTP_GET
- bool "Enable \"get\" command"
- default y
- depends on TFTP || TFTPD
- help
- Add support for the GET command within the TFTP client. This allows
- a client to retrieve a file from a TFTP server.
- Also enable upload support in tftpd, if tftpd is selected.
-
-config FEATURE_TFTP_PUT
- bool "Enable \"put\" command"
- default y
- depends on TFTP || TFTPD
- help
- Add support for the PUT command within the TFTP client. This allows
- a client to transfer a file to a TFTP server.
- Also enable download support in tftpd, if tftpd is selected.
-
-config FEATURE_TFTP_BLOCKSIZE
- bool "Enable \"blksize\" protocol option"
- default n
- depends on TFTP || TFTPD
- help
- Allow tftp to specify block size, and tftpd to understand
- "blksize" option.
-
-config DEBUG_TFTP
- bool "Enable debug"
- default n
- depends on 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 TRACEROUTE
- bool "traceroute"
- default n
- help
- Utility to trace the route of IP packets
-
-config FEATURE_TRACEROUTE_VERBOSE
- bool "Enable verbose output"
- default n
- depends on TRACEROUTE
- help
- Add some verbosity to traceroute. This includes amongst other things
- hostnames and ICMP response types.
-
-config FEATURE_TRACEROUTE_SOURCE_ROUTE
- bool "Enable loose source route"
- default n
- depends on TRACEROUTE
- help
- Add option to specify a loose source route gateway
- (8 maximum).
-
-config FEATURE_TRACEROUTE_USE_ICMP
- bool "Use ICMP instead of UDP"
- default n
- depends on TRACEROUTE
- help
- Add feature to allow for ICMP ECHO instead of UDP datagrams.
-
-source networking/udhcp/Config.in
-
-config VCONFIG
- bool "vconfig"
- default n
- help
- Creates, removes, and configures VLAN interfaces
-
-config WGET
- bool "wget"
- default n
- help
- wget is a utility for non-interactive download of files from HTTP,
- HTTPS, and FTP servers.
-
-config FEATURE_WGET_STATUSBAR
- bool "Enable a nifty process meter (+2k)"
- default y
- depends on WGET
- help
- Enable the transfer progress bar for wget transfers.
-
-config FEATURE_WGET_AUTHENTICATION
- bool "Enable HTTP authentication"
- default y
- depends on WGET
- help
- Support authenticated HTTP transfers.
-
-config FEATURE_WGET_LONG_OPTIONS
- bool "Enable long options"
- default n
- depends on WGET && GETOPT_LONG
- help
- Support long options for the wget applet.
-
-config ZCIP
- bool "zcip"
- default n
- select FEATURE_SYSLOG
- 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.
-
-config TCPSVD
- bool "tcpsvd"
- default n
- help
- tcpsvd listens on a TCP port and runs a program for each new connection
-
-config UDPSVD
- bool "udpsvd"
- default n
- help
- udpsvd listens on an UDP port and runs a program for each new connection
-
-endmenu
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_ARP) += arp.o interface.o
-lib-$(CONFIG_ARPING) += arping.o
-lib-$(CONFIG_BRCTL) += brctl.o
-lib-$(CONFIG_DNSD) += dnsd.o
-lib-$(CONFIG_ETHER_WAKE) += ether-wake.o
-lib-$(CONFIG_FAKEIDENTD) += isrv_identd.o isrv.o
-lib-$(CONFIG_FETCHMAIL) += sendmail.o
-lib-$(CONFIG_FTPGET) += ftpgetput.o
-lib-$(CONFIG_FTPPUT) += ftpgetput.o
-lib-$(CONFIG_HOSTNAME) += hostname.o
-lib-$(CONFIG_HTTPD) += httpd.o
-lib-$(CONFIG_IFCONFIG) += ifconfig.o interface.o
-lib-$(CONFIG_IFENSLAVE) += ifenslave.o interface.o
-lib-$(CONFIG_IFUPDOWN) += ifupdown.o
-lib-$(CONFIG_INETD) += inetd.o
-lib-$(CONFIG_IP) += ip.o
-lib-$(CONFIG_IPCALC) += ipcalc.o
-lib-$(CONFIG_NAMEIF) += nameif.o
-lib-$(CONFIG_NC) += nc.o
-lib-$(CONFIG_NETSTAT) += netstat.o
-lib-$(CONFIG_NSLOOKUP) += nslookup.o
-lib-$(CONFIG_PING) += ping.o
-lib-$(CONFIG_PING6) += ping.o
-lib-$(CONFIG_PSCAN) += pscan.o
-lib-$(CONFIG_ROUTE) += route.o
-lib-$(CONFIG_SENDMAIL) += sendmail.o
-lib-$(CONFIG_SLATTACH) += slattach.o
-lib-$(CONFIG_TELNET) += telnet.o
-lib-$(CONFIG_TELNETD) += telnetd.o
-lib-$(CONFIG_TFTP) += tftp.o
-lib-$(CONFIG_TFTPD) += tftp.o
-lib-$(CONFIG_TRACEROUTE) += traceroute.o
-lib-$(CONFIG_VCONFIG) += vconfig.o
-lib-$(CONFIG_WGET) += wget.o
-lib-$(CONFIG_ZCIP) += zcip.o
-
-lib-$(CONFIG_TCPSVD) += tcpudp.o tcpudp_perhost.o
-lib-$(CONFIG_UDPSVD) += tcpudp.o tcpudp_perhost.o
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
-#
-
-lib-y:=
-
-lib-$(CONFIG_SLATTACH) += \
- utils.o
-
-lib-$(CONFIG_IP) += \
- ip_parse_common_args.o \
- libnetlink.o \
- ll_addr.o \
- ll_map.o \
- ll_proto.o \
- ll_types.o \
- rt_names.o \
- rtm_map.o \
- utils.o
-
-lib-$(CONFIG_FEATURE_IP_ADDRESS) += \
- ip_parse_common_args.o \
- ipaddress.o \
- libnetlink.o \
- ll_addr.o \
- ll_map.o \
- ll_types.o \
- rt_names.o \
- utils.o
-
-lib-$(CONFIG_FEATURE_IP_LINK) += \
- ip_parse_common_args.o \
- ipaddress.o \
- iplink.o \
- libnetlink.o \
- ll_addr.o \
- ll_map.o \
- ll_types.o \
- rt_names.o \
- utils.o
-
-lib-$(CONFIG_FEATURE_IP_ROUTE) += \
- ip_parse_common_args.o \
- iproute.o \
- libnetlink.o \
- ll_map.o \
- rt_names.o \
- rtm_map.o \
- utils.o
-
-lib-$(CONFIG_FEATURE_IP_TUNNEL) += \
- ip_parse_common_args.o \
- iptunnel.o \
- rt_names.o \
- utils.o
-
-lib-$(CONFIG_FEATURE_IP_RULE) += \
- ip_parse_common_args.o \
- iprule.o \
- rt_names.o \
- utils.o
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * bare bones sendmail/fetchmail
- *
- * Copyright (C) 2008 by Vladimir Dronnikov <dronnikov@gmail.com>
- *
- * Licensed under GPLv2, see file LICENSE in this tarball for details.
- */
-#include "libbb.h"
-
-#define INITIAL_STDIN_FILENO 3
-
-static void uuencode(char *fname, const char *text)
-{
- enum {
- SRC_BUF_SIZE = 45, /* This *MUST* be a multiple of 3 */
- DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3),
- };
-
-#define src_buf text
- int fd;
-#define len fd
- char dst_buf[DST_BUF_SIZE + 1];
-
- if (fname) {
- fd = INITIAL_STDIN_FILENO;
- if (NOT_LONE_DASH(fname))
- fd = xopen(fname, O_RDONLY);
- src_buf = bb_common_bufsiz1;
- // N.B. strlen(NULL) segfaults!
- } else if (text) {
- // though we do not call uuencode(NULL, NULL) explicitly
- // still we do not want to break things suddenly
- len = strlen(text);
- } else
- return;
-
- fflush(stdout); // sync stdio and unistd output
- while (1) {
- size_t size;
- if (fname) {
- size = full_read(fd, (char *)src_buf, SRC_BUF_SIZE);
- if ((ssize_t)size < 0)
- bb_perror_msg_and_die(bb_msg_read_error);
- } else {
- size = len;
- if (len > SRC_BUF_SIZE)
- size = SRC_BUF_SIZE;
- }
- if (!size)
- break;
- // encode the buffer we just read in
- bb_uuencode(dst_buf, src_buf, size, bb_uuenc_tbl_base64);
- if (fname) {
- xwrite(STDOUT_FILENO, "\r\n", 2);
- } else {
- src_buf += size;
- len -= size;
- }
- xwrite(STDOUT_FILENO, dst_buf, 4 * ((size + 2) / 3));
- }
- if (fname)
- close(fd);
-}
-
-struct globals {
- pid_t helper_pid;
- unsigned timeout;
- // arguments for SSL connection helper
- const char *xargs[9];
- // arguments for postprocess helper
- const char *fargs[3];
-};
-#define G (*ptr_to_globals)
-#define helper_pid (G.helper_pid)
-#define timeout (G.timeout )
-#define xargs (G.xargs )
-#define fargs (G.fargs )
-#define INIT_G() do { \
- SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
- xargs[0] = "openssl"; \
- xargs[1] = "s_client"; \
- xargs[2] = "-quiet"; \
- xargs[3] = "-connect"; \
- /*xargs[4] = "server[:port]";*/ \
- xargs[5] = "-tls1"; \
- xargs[6] = "-starttls"; \
- xargs[7] = "smtp"; \
- fargs[0] = "utf-8"; \
-} while (0)
-
-#define opt_connect (xargs[4])
-#define opt_after_connect (xargs[5])
-#define opt_charset (fargs[0])
-#define opt_subject (fargs[1])
-
-static void kill_helper(void)
-{
- // TODO!!!: is there more elegant way to terminate child on program failure?
- if (helper_pid > 0)
- kill(helper_pid, SIGTERM);
-}
-
-// generic signal handler
-static void signal_handler(int signo)
-{
-#define err signo
-
- if (SIGALRM == signo) {
- kill_helper();
- bb_error_msg_and_die("timed out");
- }
-
- // SIGCHLD. reap zombies
- if (wait_any_nohang(&err) > 0)
- if (WIFEXITED(err) && WEXITSTATUS(err))
- bb_error_msg_and_die("child exited (%d)", WEXITSTATUS(err));
-}
-
-static void launch_helper(const char **argv)
-{
- // setup vanilla unidirectional pipes interchange
- int idx;
- int pipes[4];
- xpipe(pipes);
- xpipe(pipes+2);
- helper_pid = vfork();
- if (helper_pid < 0)
- bb_perror_msg_and_die("vfork");
- idx = (!helper_pid)*2;
- xdup2(pipes[idx], STDIN_FILENO);
- xdup2(pipes[3-idx], STDOUT_FILENO);
- if (ENABLE_FEATURE_CLEAN_UP)
- for (int i = 4; --i >= 0; )
- if (pipes[i] > STDOUT_FILENO)
- close(pipes[i]);
- if (!helper_pid) {
- // child: try to execute connection helper
- BB_EXECVP(*argv, (char **)argv);
- _exit(127);
- }
- // parent: check whether child is alive
- bb_signals(0
- + (1 << SIGCHLD)
- + (1 << SIGALRM)
- , signal_handler);
- signal_handler(SIGCHLD);
- // child seems OK -> parent goes on
-}
-
-static const char *command(const char *fmt, const char *param)
-{
- const char *msg = fmt;
- alarm(timeout);
- if (msg) {
- msg = xasprintf(fmt, param);
- printf("%s\r\n", msg);
- }
- fflush(stdout);
- return msg;
-}
-
-static int smtp_checkp(const char *fmt, const char *param, int code)
-{
- char *answer;
- const char *msg = command(fmt, param);
- // read stdin
- // if the string has a form \d\d\d- -- read next string. E.g. EHLO response
- // parse first bytes to a number
- // if code = -1 then just return this number
- // if code != -1 then checks whether the number equals the code
- // if not equal -> die saying msg
- while ((answer = xmalloc_getline(stdin)) != NULL)
- if (strlen(answer) <= 3 || '-' != answer[3])
- break;
- if (answer) {
- int n = atoi(answer);
- alarm(0);
- if (ENABLE_FEATURE_CLEAN_UP) {
- free(answer);
- }
- if (-1 == code || n == code) {
- return n;
- }
- }
- kill_helper();
- bb_error_msg_and_die("%s failed", msg);
-}
-
-static int inline smtp_check(const char *fmt, int code)
-{
- return smtp_checkp(fmt, NULL, code);
-}
-
-// strip argument of bad chars
-static char *sane(char *str)
-{
- char *s = str;
- char *p = s;
- while (*s) {
- if (isalnum(*s) || '_' == *s || '-' == *s || '.' == *s || '@' == *s) {
- *p++ = *s;
- }
- s++;
- }
- *p = '\0';
- return str;
-}
-
-#if ENABLE_FETCHMAIL
-static void pop3_checkr(const char *fmt, const char *param, char **ret)
-{
- const char *msg = command(fmt, param);
- char *answer = xmalloc_getline(stdin);
- if (answer && '+' == *answer) {
- alarm(0);
- if (ret)
- *ret = answer+4; // skip "+OK "
- else if (ENABLE_FEATURE_CLEAN_UP)
- free(answer);
- return;
- }
- kill_helper();
- bb_error_msg_and_die("%s failed", msg);
-}
-
-static void inline pop3_check(const char *fmt, const char *param)
-{
- pop3_checkr(fmt, param, NULL);
-}
-
-static void pop3_message(const char *filename)
-{
- int fd;
- char *answer;
- // create and open file filename
- // read stdin, copy to created file
- fd = xopen(filename, O_CREAT | O_WRONLY | O_TRUNC | O_EXCL);
- while ((answer = xmalloc_fgets_str(stdin, "\r\n")) != NULL) {
- char *s = answer;
- if ('.' == *answer) {
- if ('.' == answer[1])
- s++;
- else if ('\r' == answer[1] && '\n' == answer[2] && '\0' == answer[3])
- break;
- }
- xwrite(fd, s, strlen(s));
- free(answer);
- }
- close(fd);
-}
-#endif
-
-int sendgetmail_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int sendgetmail_main(int argc ATTRIBUTE_UNUSED, char **argv)
-{
- llist_t *opt_recipients = NULL;
-
- const char *opt_user;
- const char *opt_pass;
-
- enum {
- OPT_w = 1 << 0, // network timeout
- OPT_U = 1 << 1, // user
- OPT_P = 1 << 2, // password
- OPT_X = 1 << 3, // connect using openssl s_client helper
-
- OPTS_n = 1 << 4, // sendmail: request notification
- OPTF_t = 1 << 4, // fetchmail: use "TOP" not "RETR"
-
- OPTS_s = 1 << 5, // sendmail: subject
- OPTF_z = 1 << 5, // fetchmail: delete from server
-
- OPTS_c = 1 << 6, // sendmail: assumed charset
- OPTS_t = 1 << 7, // sendmail: recipient(s)
- };
-
- const char *options;
- unsigned opts;
-
- // init global variables
- INIT_G();
-
- // parse options, different option sets for sendmail and fetchmail
- // N.B. opt_after_connect hereafter is NULL if we are called as fetchmail
- // and is NOT NULL if we are called as sendmail
- if (!ENABLE_FETCHMAIL || 's' == applet_name[0]) {
- // SENDMAIL
- // save initial stdin (body or attachements can be piped!)
- xdup2(STDIN_FILENO, INITIAL_STDIN_FILENO);
- opt_complementary = "-2:w+:t:t::"; // count(-t) > 0
- options = "w:U:P:X" "ns:c:t:";
- } else {
- // FETCHMAIL
- opt_after_connect = NULL;
- opt_complementary = "-2:w+:P";
- options = "w:U:P:X" "tz";
- }
- opts = getopt32(argv, options,
- &timeout, &opt_user, &opt_pass,
- &opt_subject, &opt_charset, &opt_recipients
- );
- //argc -= optind;
- argv += optind;
-
- // first argument is remote server[:port]
- opt_connect = *argv++;
-
- // connect to server
- // SSL ordered? ->
- if (opts & OPT_X) {
- // ... use openssl helper
- launch_helper(xargs);
- // no SSL ordered? ->
- } else {
- // ... make plain connect
- int fd = create_and_connect_stream_or_die(opt_connect, 25);
- // make ourselves a simple IO filter
- // from now we know nothing about network :)
- xmove_fd(fd, STDIN_FILENO);
- xdup2(STDIN_FILENO, STDOUT_FILENO);
- }
-
-#if ENABLE_FETCHMAIL
- // we are sendmail?
- if (opt_after_connect)
-#endif
- {
-/***************************************************
- * SENDMAIL
- ***************************************************/
-
- char *opt_from;
- int code;
- char *boundary;
- const char *fmt;
- const char *p;
- char *q;
-
- // we didn't use SSL helper? ->
- if (!(opts & OPT_X)) {
- // ... wait for initial server OK
- smtp_check(NULL, 220);
- }
-
- // get the sender
- opt_from = sane(*argv++);
-
- // introduce to server
- // we should start with modern EHLO
- if (250 != smtp_checkp("EHLO %s", opt_from, -1)) {
- smtp_checkp("HELO %s", opt_from, 250);
- }
-
- // set sender
- // NOTE: if password has not been specified
- // then no authentication is possible
- code = (opts & OPT_P) ? -1 : 250;
- // first try softly without authentication
- while (250 != smtp_checkp("MAIL FROM:<%s>", opt_from, code)) {
- // MAIL FROM failed -> authentication needed
- // have we got username?
- if (!(opts & OPT_U)) {
- // no! fetch it from "from" option
- //opts |= OPT_U;
- opt_user = xstrdup(opt_from);
- *strchrnul(opt_user, '@') = '\0';
- }
- // now we've got username
- // so try to authenticate
- if (334 == smtp_check("AUTH LOGIN", -1)) {
- uuencode(NULL, opt_user);
- smtp_check("", 334);
- uuencode(NULL, opt_pass);
- smtp_check("", 235);
- }
- // authenticated OK? -> retry to set sender
- // but this time die on failure!
- code = 250;
- }
-
- // set recipients
- for (llist_t *to = opt_recipients; to; to = to->link) {
- smtp_checkp("RCPT TO:<%s>", sane(to->data), 250);
- }
-
- // enter "put message" mode
- smtp_check("DATA", 354);
-
- // put address headers
- printf("From: %s\r\n", opt_from);
- for (llist_t *to = opt_recipients; to; to = to->link) {
- printf("To: %s\r\n", to->data);
- }
-
- // put encoded subject
- if (opts & OPTS_c)
- sane((char *)opt_charset);
- if (opts & OPTS_s) {
- printf("Subject: =?%s?B?", opt_charset);
- uuencode(NULL, opt_subject);
- printf("?=\r\n");
- }
-
- // put notification
- if (opts & OPTS_n)
- printf("Disposition-Notification-To: %s\r\n", opt_from);
-
- // make a random string -- it will delimit message parts
- srand(monotonic_us());
- boundary = xasprintf("%d-%d-%d", rand(), rand(), rand());
-
- // put common headers and body start
- printf(
- "Message-ID: <%s>\r\n"
- "Mime-Version: 1.0\r\n"
- "%smultipart/mixed; boundary=\"%s\"\r\n"
- , boundary
- , "Content-Type: "
- , boundary
- );
-
- // put body + attachment(s)
- // N.B. all these weird things just to be tiny
- // by reusing string patterns!
- fmt =
- "\r\n--%s\r\n"
- "%stext/plain; charset=%s\r\n"
- "%s%s\r\n"
- "%s"
- ;
- p = opt_charset;
- q = (char *)"";
- while (*argv) {
- printf(
- fmt
- , boundary
- , "Content-Type: "
- , p
- , "Content-Disposition: inline"
- , q
- , "Content-Transfer-Encoding: base64\r\n"
- );
- p = "";
- fmt =
- "\r\n--%s\r\n"
- "%sapplication/octet-stream%s\r\n"
- "%s; filename=\"%s\"\r\n"
- "%s"
- ;
- uuencode(*argv, NULL);
- if (*(++argv))
- q = bb_get_last_path_component_strip(*argv);
- }
-
- // put message terminator
- printf("\r\n--%s--\r\n" "\r\n", boundary);
-
- // leave "put message" mode
- smtp_check(".", 250);
- // ... and say goodbye
- smtp_check("QUIT", 221);
-
-#if ENABLE_FETCHMAIL
- } else {
-/***************************************************
- * FETCHMAIL
- ***************************************************/
-
- char *buf;
- unsigned nmsg;
- char *hostname;
- pid_t pid;
-
- // cache fetch command:
- // TOP will return only the headers
- // RETR will dump the whole message
- const char *retr = (opts & OPTF_t) ? "TOP %u 0" : "RETR %u";
-
- // goto maildir
- xchdir(*argv++);
-
- // cache postprocess program
- *fargs = *argv;
-
- // authenticate
- if (!(opts & OPT_U)) {
- //opts |= OPT_U;
- // N.B. IMHO getenv("USER") can be way easily spoofed!
- opt_user = bb_getpwuid(NULL, -1, getuid());
- }
-
- // get server greeting
- pop3_checkr(NULL, NULL, &buf);
-
- // server supports APOP?
- if ('<' == *buf) {
- md5_ctx_t md5;
- // yes! compose <stamp><password>
- char *s = strchr(buf, '>');
- if (s)
- strcpy(s+1, opt_pass);
- s = buf;
- // get md5 sum of <stamp><password>
- md5_begin(&md5);
- md5_hash(s, strlen(s), &md5);
- md5_end(s, &md5);
- // NOTE: md5 struct contains enough space
- // so we reuse md5 space instead of xzalloc(16*2+1)
-#define md5_hex ((uint8_t *)&md5)
-// uint8_t *md5_hex = (uint8_t *)&md5;
- *bin2hex(md5_hex, s, 16) = '\0';
- // APOP
- s = xasprintf("%s %s", opt_user, md5_hex);
-#undef md5_hex
- pop3_check("APOP %s", s);
- if (ENABLE_FEATURE_CLEAN_UP) {
- free(s);
- free(buf-4); // buf is "+OK " away from malloc'ed string
- }
- // server ignores APOP -> use simple text authentication
- } else {
- // USER
- pop3_check("USER %s", opt_user);
- // PASS
- pop3_check("PASS %s", opt_pass);
- }
-
- // get mailbox statistics
- pop3_checkr("STAT", NULL, &buf);
-
- // prepare message filename suffix
- hostname = safe_gethostname();
- pid = getpid();
-
- // get messages counter
- // NOTE: we don't use xatou(buf) since buf is "nmsg nbytes"
- // we only need nmsg and atoi is just exactly what we need
- // if atoi fails to convert buf into number it returns 0
- // in this case the following loop simply will not be executed
- nmsg = atoi(buf);
- if (ENABLE_FEATURE_CLEAN_UP)
- free(buf-4); // buf is "+OK " away from malloc'ed string
-
- // loop through messages
- for (; nmsg; nmsg--) {
-
- // generate unique filename
- char *filename = xasprintf("tmp/%llu.%u.%s", monotonic_us(), pid, hostname);
- char *target;
- int rc;
-
- // retrieve message in ./tmp/
- pop3_check(retr, (const char *)(ptrdiff_t)nmsg);
- pop3_message(filename);
- // delete message from server
- if (opts & OPTF_z)
- pop3_check("DELE %u", (const char*)(ptrdiff_t)nmsg);
-
- // run postprocessing program
- if (*fargs) {
- fargs[1] = filename;
- rc = wait4pid(spawn((char **)fargs));
- if (99 == rc)
- break;
- if (1 == rc)
- goto skip;
- }
-
- // atomically move message to ./new/
- target = xstrdup(filename);
- strncpy(target, "new", 3);
- // ... or just stop receiving on error
- if (rename_or_warn(filename, target))
- break;
- free(target);
- skip:
- free(filename);
- }
-
- // Bye
- pop3_check("QUIT", NULL);
-#endif // ENABLE_FETCHMAIL
- }
-
- return 0;
-}
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-config APP_UDHCPD
- bool "udhcp Server (udhcpd)"
- default n
- help
- uDHCPd is a DHCP server geared primarily toward embedded systems,
- while striving to be fully functional and RFC compliant.
-
- See http://udhcp.busybox.net for further details.
-
-config APP_DHCPRELAY
- bool "dhcprelay"
- default n
- depends on APP_UDHCPD
- help
- dhcprelay listens for dhcp requests on one or more interfaces
- and forwards these requests to a different interface or dhcp
- server.
-
-config APP_DUMPLEASES
- bool "Lease display utility (dumpleases)"
- default n
- depends on 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
- by the absolute time that it expires in seconds from epoch.
-
- See http://udhcp.busybox.net for further details.
-
-config FEATURE_UDHCPD_WRITE_LEASES_EARLY
- bool "Rewrite the lease file at every new acknowledge"
- default n
- depends on APP_UDHCPD
- help
- If selected, udhcpd will write a new file with leases every
- time a new lease has been accepted, thus eleminating the need
- to send SIGUSR1 for the initial writing, or updating. Any timed
- rewriting remains undisturbed
-
-config DHCPD_LEASES_FILE
- string "Absolute path to lease file"
- default "/var/lib/misc/udhcpd.leases"
- depends on APP_UDHCPD
- help
- The udhcpd stores address in lease files. Normaly it is save
- to leave it untouched.
-
-
-config APP_UDHCPC
- bool "udhcp Client (udhcpc)"
- default n
- help
- uDHCPc is a DHCP client geared primarily toward embedded systems,
- while striving to be fully functional and RFC compliant.
-
- The udhcp client negotiates a lease with the DHCP server and
- notifies a set of scripts when a lease is obtained or lost.
-
- See http://udhcp.busybox.net for further details.
-
-config FEATURE_UDHCPC_ARPING
- bool "Ask udhcpc to verify that the offered address is free, using arpping"
- default y
- depends on APP_UDHCPC
- help
- If selected, udhcpc will use arpping to make sure the offered address
- is really available. The client will DHCPDECLINE the offer if the
- address is in use, and restart the discover process.
-
-config FEATURE_UDHCP_PORT
- bool "Enable '-P port' option for udhcpd and udhcpc"
- default n
- depends on APP_UDHCPD || APP_UDHCPC
- help
- At the cost of ~300 bytes, enables -P port option.
- This feature is typically not needed.
-
-config FEATURE_UDHCP_DEBUG
- bool "Compile udhcp with noisy debugging messages"
- default n
- depends on APP_UDHCPD || 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
- the background.
-
- See http://udhcp.busybox.net for further details.
-
-config FEATURE_RFC3397
- bool "Support for RFC3397 domain search (experimental)"
- default n
- depends on APP_UDHCPD || APP_UDHCPC
- help
- If selected, both client and server will support passing of domain
- search lists via option 119, specified in RFC3397.
-
-config DHCPC_DEFAULT_SCRIPT
- string "Absolute path to config script"
- default "/usr/share/udhcpc/default.script"
- depends on APP_UDHCPC
- help
- This script is called after udhcpc receives and answer. See
- examples/udhcp for a working example. Normaly it is save
- to leave this untouched.
-
-
-config UDHCPC_SLACK_FOR_BUGGY_SERVERS
- int "DHCP options slack buffer size"
- default 80
- range 0 924
- depends on APP_UDHCPD || APP_UDHCPC
- help
- Some buggy DHCP servers will send DHCP offer packets with option
- field larger than we expect (which might also be considered a
- buffer overflow attempt). These packets are normally discarded.
- If circumstances beyond your control force you to support such
- servers, this may help. The upper limit (924) makes dhcpc accept
- even 1500 byte packets (maximum-sized ethernet packets).
-
- This options does not make dhcp[cd] emit non-standard
- sized packets.
-
- Known buggy DHCP servers:
- 3Com OfficeConnect Remote 812 ADSL Router:
- seems to confuse maximum allowed UDP packet size with
- maximum size of entire IP packet, and sends packets which are
- 28 bytes too large.
- Seednet (ISP) VDSL: sends packets 2 bytes too big.
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
-#
-
-lib-y:=
-lib-$(CONFIG_APP_UDHCPC) += common.o options.o packet.o \
- signalpipe.o socket.o
-lib-$(CONFIG_APP_UDHCPD) += common.o options.o packet.o \
- signalpipe.o socket.o
-
-lib-$(CONFIG_APP_UDHCPC) += dhcpc.o clientpacket.o clientsocket.o \
- script.o
-
-UDHCPC_NEEDS_ARPING-$(CONFIG_FEATURE_UDHCPC_ARPING) = y
-lib-$(UDHCPC_NEEDS_ARPING-y) += arpping.o
-
-lib-$(CONFIG_APP_UDHCPD) += dhcpd.o arpping.o files.o leases.o \
- serverpacket.o static_leases.o
-
-lib-$(CONFIG_APP_DUMPLEASES) += dumpleases.o
-lib-$(CONFIG_APP_DHCPRELAY) += dhcprelay.o
-lib-$(CONFIG_FEATURE_RFC3397) += domain_codec.o
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/* clientpacket.c
- *
- * Packet generation and dispatching functions for the DHCP client.
- *
- * Russ Dill <Russ.Dill@asu.edu> July 2001
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include <features.h>
-#if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION
-#include <netpacket/packet.h>
-#include <net/ethernet.h>
-#else
-#include <asm/types.h>
-#include <linux/if_packet.h>
-#include <linux/if_ether.h>
-#endif
-
-#include "common.h"
-#include "dhcpd.h"
-#include "dhcpc.h"
-#include "options.h"
-
-
-/* Create a random xid */
-uint32_t random_xid(void)
-{
- static smallint initialized;
-
- if (!initialized) {
- srand(monotonic_us());
- initialized = 1;
- }
- return rand();
-}
-
-
-/* initialize a packet with the proper defaults */
-static void init_packet(struct dhcpMessage *packet, char type)
-{
- udhcp_init_header(packet, type);
- memcpy(packet->chaddr, client_config.arp, 6);
- if (client_config.clientid)
- add_option_string(packet->options, client_config.clientid);
- if (client_config.hostname)
- add_option_string(packet->options, client_config.hostname);
- if (client_config.fqdn)
- add_option_string(packet->options, client_config.fqdn);
- if ((type != DHCPDECLINE) && (type != DHCPRELEASE))
- add_option_string(packet->options, client_config.vendorclass);
-}
-
-
-/* Add a parameter request list for stubborn DHCP servers. Pull the data
- * from the struct in options.c. Don't do bounds checking here because it
- * goes towards the head of the packet. */
-static void add_param_req_option(struct dhcpMessage *packet)
-{
- uint8_t c;
- int end = end_option(packet->options);
- int i, len = 0;
-
- packet->options[end + OPT_CODE] = DHCP_PARAM_REQ;
- for (i = 0; (c = dhcp_options[i].code) != 0; i++) {
- if ((dhcp_options[i].flags & OPTION_REQ)
- || (client_config.opt_mask[c >> 3] & (1 << (c & 7)))
- ) {
- packet->options[end + OPT_DATA + len] = c;
- len++;
- }
- }
- packet->options[end + OPT_LEN] = len;
- packet->options[end + OPT_DATA + len] = DHCP_END;
-}
-
-
-#if ENABLE_FEATURE_UDHCPC_ARPING
-/* Unicast a DHCP decline message */
-int send_decline(uint32_t xid, uint32_t server, uint32_t requested)
-{
- struct dhcpMessage packet;
-
- init_packet(&packet, DHCPDECLINE);
- packet.xid = xid;
- add_simple_option(packet.options, DHCP_REQUESTED_IP, requested);
- add_simple_option(packet.options, DHCP_SERVER_ID, server);
-
- bb_info_msg("Sending decline...");
-
- return udhcp_send_raw_packet(&packet, INADDR_ANY, CLIENT_PORT, INADDR_BROADCAST,
- SERVER_PORT, MAC_BCAST_ADDR, client_config.ifindex);
-}
-#endif
-
-/* Broadcast a DHCP discover packet to the network, with an optionally requested IP */
-int send_discover(uint32_t xid, uint32_t requested)
-{
- struct dhcpMessage packet;
-
- init_packet(&packet, DHCPDISCOVER);
- packet.xid = xid;
- if (requested)
- add_simple_option(packet.options, DHCP_REQUESTED_IP, requested);
-
- /* Explicitly saying that we want RFC-compliant packets helps
- * some buggy DHCP servers to NOT send bigger packets */
- add_simple_option(packet.options, DHCP_MAX_SIZE, htons(576));
- add_param_req_option(&packet);
- bb_info_msg("Sending discover...");
- return udhcp_send_raw_packet(&packet, INADDR_ANY, CLIENT_PORT, INADDR_BROADCAST,
- SERVER_PORT, MAC_BCAST_ADDR, client_config.ifindex);
-}
-
-
-/* Broadcasts a DHCP request message */
-int send_selecting(uint32_t xid, uint32_t server, uint32_t requested)
-{
- struct dhcpMessage packet;
- struct in_addr addr;
-
- init_packet(&packet, DHCPREQUEST);
- packet.xid = xid;
-
- add_simple_option(packet.options, DHCP_REQUESTED_IP, requested);
- add_simple_option(packet.options, DHCP_SERVER_ID, server);
-
- add_param_req_option(&packet);
- addr.s_addr = requested;
- bb_info_msg("Sending select for %s...", inet_ntoa(addr));
- return udhcp_send_raw_packet(&packet, INADDR_ANY, CLIENT_PORT, INADDR_BROADCAST,
- SERVER_PORT, MAC_BCAST_ADDR, client_config.ifindex);
-}
-
-
-/* Unicasts or broadcasts a DHCP renew message */
-int send_renew(uint32_t xid, uint32_t server, uint32_t ciaddr)
-{
- struct dhcpMessage packet;
-
- init_packet(&packet, DHCPREQUEST);
- packet.xid = xid;
- packet.ciaddr = ciaddr;
-
- add_param_req_option(&packet);
- bb_info_msg("Sending renew...");
- if (server)
- return udhcp_send_kernel_packet(&packet, ciaddr, CLIENT_PORT, server, SERVER_PORT);
-
- return udhcp_send_raw_packet(&packet, INADDR_ANY, CLIENT_PORT, INADDR_BROADCAST,
- SERVER_PORT, MAC_BCAST_ADDR, client_config.ifindex);
-}
-
-
-/* Unicasts a DHCP release message */
-int send_release(uint32_t server, uint32_t ciaddr)
-{
- struct dhcpMessage packet;
-
- init_packet(&packet, DHCPRELEASE);
- packet.xid = random_xid();
- packet.ciaddr = ciaddr;
-
- add_simple_option(packet.options, DHCP_SERVER_ID, server);
-
- bb_info_msg("Sending release...");
- return udhcp_send_kernel_packet(&packet, ciaddr, CLIENT_PORT, server, SERVER_PORT);
-}
-
-
-/* Returns -1 on errors that are fatal for the socket, -2 for those that aren't */
-int get_raw_packet(struct dhcpMessage *payload, int fd)
-{
- int bytes;
- struct udp_dhcp_packet packet;
- uint16_t check;
-
- memset(&packet, 0, sizeof(packet));
- bytes = safe_read(fd, &packet, sizeof(packet));
- if (bytes < 0) {
- DEBUG("Cannot read on raw listening socket - ignoring");
- sleep(1); /* possible down interface, looping condition */
- return bytes; /* returns -1 */
- }
-
- if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp))) {
- DEBUG("Packet is too short, ignoring");
- return -2;
- }
-
- if (bytes < ntohs(packet.ip.tot_len)) {
- /* packet is bigger than sizeof(packet), we did partial read */
- DEBUG("Oversized packet, ignoring");
- return -2;
- }
-
- /* ignore any extra garbage bytes */
- bytes = ntohs(packet.ip.tot_len);
-
- /* make sure its the right packet for us, and that it passes sanity checks */
- if (packet.ip.protocol != IPPROTO_UDP || packet.ip.version != IPVERSION
- || packet.ip.ihl != (sizeof(packet.ip) >> 2)
- || packet.udp.dest != htons(CLIENT_PORT)
- /* || bytes > (int) sizeof(packet) - can't happen */
- || ntohs(packet.udp.len) != (uint16_t)(bytes - sizeof(packet.ip))
- ) {
- DEBUG("Unrelated/bogus packet");
- return -2;
- }
-
- /* verify IP checksum */
- check = packet.ip.check;
- packet.ip.check = 0;
- if (check != udhcp_checksum(&packet.ip, sizeof(packet.ip))) {
- DEBUG("Bad IP header checksum, ignoring");
- return -2;
- }
-
- /* verify UDP checksum. IP header has to be modified for this */
- memset(&packet.ip, 0, offsetof(struct iphdr, protocol));
- /* ip.xx fields which are not memset: protocol, check, saddr, daddr */
- packet.ip.tot_len = packet.udp.len; /* yes, this is needed */
- check = packet.udp.check;
- packet.udp.check = 0;
- if (check && check != udhcp_checksum(&packet, bytes)) {
- bb_error_msg("packet with bad UDP checksum received, ignoring");
- return -2;
- }
-
- memcpy(payload, &packet.data, bytes - (sizeof(packet.ip) + sizeof(packet.udp)));
-
- if (payload->cookie != htonl(DHCP_MAGIC)) {
- bb_error_msg("received bogus message (bad magic), ignoring");
- return -2;
- }
- DEBUG("Got valid DHCP packet");
- return bytes - (sizeof(packet.ip) + sizeof(packet.udp));
-}
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * clientsocket.c -- DHCP client socket creation
- *
- * udhcp client
- *
- * Russ Dill <Russ.Dill@asu.edu> July 2001
- *
- * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <features.h>
-#include <asm/types.h>
-#if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION)
-#include <netpacket/packet.h>
-#include <net/ethernet.h>
-#else
-#include <linux/if_packet.h>
-#include <linux/if_ether.h>
-#endif
-#include <linux/filter.h>
-
-#include "common.h"
-#include "dhcpd.h"
-#include "dhcpc.h"
-
-int raw_socket(int ifindex)
-{
- int fd;
- struct sockaddr_ll sock;
-
- /*
- * Comment:
- *
- * I've selected not to see LL header, so BPF doesn't see it, too.
- * The filter may also pass non-IP and non-ARP packets, but we do
- * a more complete check when receiving the message in userspace.
- *
- * and filter shamelessly stolen from:
- *
- * http://www.flamewarmaster.de/software/dhcpclient/
- *
- * There are a few other interesting ideas on that page (look under
- * "Motivation"). Use of netlink events is most interesting. Think
- * of various network servers listening for events and reconfiguring.
- * That would obsolete sending HUP signals and/or make use of restarts.
- *
- * Copyright: 2006, 2007 Stefan Rompf <sux@loplof.de>.
- * License: GPL v2.
- *
- * TODO: make conditional?
- */
-#define SERVER_AND_CLIENT_PORTS ((67 << 16) + 68)
- static const struct sock_filter filter_instr[] = {
- /* check for udp */
- BPF_STMT(BPF_LD|BPF_B|BPF_ABS, 9),
- BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, IPPROTO_UDP, 2, 0), /* L5, L1, is UDP? */
- /* ugly check for arp on ethernet-like and IPv4 */
- BPF_STMT(BPF_LD|BPF_W|BPF_ABS, 2), /* L1: */
- BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, 0x08000604, 3, 4), /* L3, L4 */
- /* skip IP header */
- BPF_STMT(BPF_LDX|BPF_B|BPF_MSH, 0), /* L5: */
- /* check udp source and destination ports */
- BPF_STMT(BPF_LD|BPF_W|BPF_IND, 0),
- BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, SERVER_AND_CLIENT_PORTS, 0, 1), /* L3, L4 */
- /* returns */
- BPF_STMT(BPF_RET|BPF_K, (~(uint32_t)0) ), /* L3: pass */
- BPF_STMT(BPF_RET|BPF_K, 0), /* L4: reject */
- };
- static const struct sock_fprog filter_prog = {
- .len = sizeof(filter_instr) / sizeof(filter_instr[0]),
- /* casting const away: */
- .filter = (struct sock_filter *) filter_instr,
- };
-
- DEBUG("opening raw socket on ifindex %d", ifindex);
-
- fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
- DEBUG("got raw socket fd %d", fd);
-
- if (SERVER_PORT == 67 && CLIENT_PORT == 68) {
- /* Use only if standard ports are in use */
- /* Ignoring error (kernel may lack support for this) */
- if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter_prog,
- sizeof(filter_prog)) >= 0)
- DEBUG("attached filter to raw socket fd %d", fd);
- }
-
- sock.sll_family = AF_PACKET;
- sock.sll_protocol = htons(ETH_P_IP);
- sock.sll_ifindex = ifindex;
- xbind(fd, (struct sockaddr *) &sock, sizeof(sock));
- DEBUG("bound to raw socket fd %d", fd);
-
- return fd;
-}
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * options.c -- DHCP server option packet tools
- * Rewrite by Russ Dill <Russ.Dill@asu.edu> July 2001
- */
-
-#include "common.h"
-#include "dhcpd.h"
-#include "options.h"
-
-
-/* Supported options are easily added here */
-const struct dhcp_option dhcp_options[] = {
- /* flags code */
- { OPTION_IP | OPTION_REQ, 0x01 }, /* DHCP_SUBNET */
- { OPTION_S32 , 0x02 }, /* DHCP_TIME_OFFSET */
- { OPTION_IP | OPTION_LIST | OPTION_REQ, 0x03 }, /* DHCP_ROUTER */
- { OPTION_IP | OPTION_LIST , 0x04 }, /* DHCP_TIME_SERVER */
- { OPTION_IP | OPTION_LIST , 0x05 }, /* DHCP_NAME_SERVER */
- { OPTION_IP | OPTION_LIST | OPTION_REQ, 0x06 }, /* DHCP_DNS_SERVER */
- { OPTION_IP | OPTION_LIST , 0x07 }, /* DHCP_LOG_SERVER */
- { OPTION_IP | OPTION_LIST , 0x08 }, /* DHCP_COOKIE_SERVER */
- { OPTION_IP | OPTION_LIST , 0x09 }, /* DHCP_LPR_SERVER */
- { OPTION_STRING | OPTION_REQ, 0x0c }, /* DHCP_HOST_NAME */
- { OPTION_U16 , 0x0d }, /* DHCP_BOOT_SIZE */
- { OPTION_STRING | OPTION_LIST | OPTION_REQ, 0x0f }, /* DHCP_DOMAIN_NAME */
- { OPTION_IP , 0x10 }, /* DHCP_SWAP_SERVER */
- { OPTION_STRING , 0x11 }, /* DHCP_ROOT_PATH */
- { OPTION_U8 , 0x17 }, /* DHCP_IP_TTL */
- { OPTION_U16 , 0x1a }, /* DHCP_MTU */
- { OPTION_IP | OPTION_REQ, 0x1c }, /* DHCP_BROADCAST */
- { OPTION_STRING , 0x28 }, /* nisdomain */
- { OPTION_IP | OPTION_LIST , 0x29 }, /* nissrv */
- { OPTION_IP | OPTION_LIST | OPTION_REQ, 0x2a }, /* DHCP_NTP_SERVER */
- { OPTION_IP | OPTION_LIST , 0x2c }, /* DHCP_WINS_SERVER */
- { OPTION_IP , 0x32 }, /* DHCP_REQUESTED_IP */
- { OPTION_U32 , 0x33 }, /* DHCP_LEASE_TIME */
- { OPTION_U8 , 0x35 }, /* dhcptype */
- { OPTION_IP , 0x36 }, /* DHCP_SERVER_ID */
- { OPTION_STRING , 0x38 }, /* DHCP_MESSAGE */
- { OPTION_STRING , 0x3C }, /* DHCP_VENDOR */
- { OPTION_STRING , 0x3D }, /* DHCP_CLIENT_ID */
- { OPTION_STRING , 0x42 }, /* tftp */
- { OPTION_STRING , 0x43 }, /* bootfile */
- { OPTION_STRING , 0x4D }, /* userclass */
-#if ENABLE_FEATURE_RFC3397
- { OPTION_STR1035 | OPTION_LIST , 0x77 }, /* search */
-#endif
- /* MSIE's "Web Proxy Autodiscovery Protocol" support */
- { OPTION_STRING , 0xfc }, /* wpad */
-
- /* Options below have no match in dhcp_option_strings[],
- * are not passed to dhcpc scripts, and cannot be specified
- * with "option XXX YYY" syntax in dhcpd config file. */
-
- { OPTION_U16 , 0x39 }, /* DHCP_MAX_SIZE */
- { } /* zeroed terminating entry */
-};
-
-/* Used for converting options from incoming packets to env variables
- * for udhcpc stript */
-/* Must match dhcp_options[] order */
-const char dhcp_option_strings[] ALIGN1 =
- "subnet" "\0" /* DHCP_SUBNET */
- "timezone" "\0" /* DHCP_TIME_OFFSET */
- "router" "\0" /* DHCP_ROUTER */
- "timesrv" "\0" /* DHCP_TIME_SERVER */
- "namesrv" "\0" /* DHCP_NAME_SERVER */
- "dns" "\0" /* DHCP_DNS_SERVER */
- "logsrv" "\0" /* DHCP_LOG_SERVER */
- "cookiesrv" "\0" /* DHCP_COOKIE_SERVER */
- "lprsrv" "\0" /* DHCP_LPR_SERVER */
- "hostname" "\0" /* DHCP_HOST_NAME */
- "bootsize" "\0" /* DHCP_BOOT_SIZE */
- "domain" "\0" /* DHCP_DOMAIN_NAME */
- "swapsrv" "\0" /* DHCP_SWAP_SERVER */
- "rootpath" "\0" /* DHCP_ROOT_PATH */
- "ipttl" "\0" /* DHCP_IP_TTL */
- "mtu" "\0" /* DHCP_MTU */
- "broadcast" "\0" /* DHCP_BROADCAST */
- "nisdomain" "\0" /* */
- "nissrv" "\0" /* */
- "ntpsrv" "\0" /* DHCP_NTP_SERVER */
- "wins" "\0" /* DHCP_WINS_SERVER */
- "requestip" "\0" /* DHCP_REQUESTED_IP */
- "lease" "\0" /* DHCP_LEASE_TIME */
- "dhcptype" "\0" /* */
- "serverid" "\0" /* DHCP_SERVER_ID */
- "message" "\0" /* DHCP_MESSAGE */
- "vendorclass" "\0" /* DHCP_VENDOR */
- "clientid" "\0" /* DHCP_CLIENT_ID */
- "tftp" "\0"
- "bootfile" "\0"
- "userclass" "\0"
-#if ENABLE_FEATURE_RFC3397
- "search" "\0"
-#endif
- /* MSIE's "Web Proxy Autodiscovery Protocol" support */
- "wpad" "\0"
- ;
-
-
-/* Lengths of the different option types */
-const uint8_t dhcp_option_lengths[] ALIGN1 = {
- [OPTION_IP] = 4,
- [OPTION_IP_PAIR] = 8,
- [OPTION_BOOLEAN] = 1,
- [OPTION_STRING] = 1,
-#if ENABLE_FEATURE_RFC3397
- [OPTION_STR1035] = 1,
-#endif
- [OPTION_U8] = 1,
- [OPTION_U16] = 2,
- [OPTION_S16] = 2,
- [OPTION_U32] = 4,
- [OPTION_S32] = 4
-};
-
-
-/* get an option with bounds checking (warning, not aligned). */
-uint8_t *get_option(struct dhcpMessage *packet, int code)
-{
- int i, length;
- uint8_t *optionptr;
- int over = 0;
- int curr = OPTION_FIELD;
-
- optionptr = packet->options;
- i = 0;
- length = sizeof(packet->options);
- while (1) {
- if (i >= length) {
- bb_error_msg("bogus packet, option fields too long");
- return NULL;
- }
- if (optionptr[i + OPT_CODE] == code) {
- if (i + 1 + optionptr[i + OPT_LEN] >= length) {
- bb_error_msg("bogus packet, option fields too long");
- return NULL;
- }
- return optionptr + i + 2;
- }
- switch (optionptr[i + OPT_CODE]) {
- case DHCP_PADDING:
- i++;
- break;
- case DHCP_OPTION_OVER:
- if (i + 1 + optionptr[i + OPT_LEN] >= length) {
- bb_error_msg("bogus packet, option fields too long");
- return NULL;
- }
- over = optionptr[i + 3];
- i += optionptr[OPT_LEN] + 2;
- break;
- case DHCP_END:
- if (curr == OPTION_FIELD && (over & FILE_FIELD)) {
- optionptr = packet->file;
- i = 0;
- length = sizeof(packet->file);
- curr = FILE_FIELD;
- } else if (curr == FILE_FIELD && (over & SNAME_FIELD)) {
- optionptr = packet->sname;
- i = 0;
- length = sizeof(packet->sname);
- curr = SNAME_FIELD;
- } else
- return NULL;
- break;
- default:
- i += optionptr[OPT_LEN + i] + 2;
- }
- }
- return NULL;
-}
-
-
-/* return the position of the 'end' option (no bounds checking) */
-int end_option(uint8_t *optionptr)
-{
- int i = 0;
-
- while (optionptr[i] != DHCP_END) {
- if (optionptr[i] == DHCP_PADDING)
- i++;
- else
- i += optionptr[i + OPT_LEN] + 2;
- }
- return i;
-}
-
-
-/* add an option string to the options (an option string contains an option code,
- * length, then data) */
-int add_option_string(uint8_t *optionptr, uint8_t *string)
-{
- int end = end_option(optionptr);
-
- /* end position + string length + option code/length + end option */
- if (end + string[OPT_LEN] + 2 + 1 >= DHCP_OPTIONS_BUFSIZE) {
- bb_error_msg("option 0x%02x did not fit into the packet",
- string[OPT_CODE]);
- return 0;
- }
- DEBUG("adding option 0x%02x", string[OPT_CODE]);
- memcpy(optionptr + end, string, string[OPT_LEN] + 2);
- optionptr[end + string[OPT_LEN] + 2] = DHCP_END;
- return string[OPT_LEN] + 2;
-}
-
-
-/* add a one to four byte option to a packet */
-int add_simple_option(uint8_t *optionptr, uint8_t code, uint32_t data)
-{
- const struct dhcp_option *dh;
-
- for (dh = dhcp_options; dh->code; dh++) {
- if (dh->code == code) {
- uint8_t option[6], len;
-
- option[OPT_CODE] = code;
- len = dhcp_option_lengths[dh->flags & TYPE_MASK];
- option[OPT_LEN] = len;
- if (BB_BIG_ENDIAN)
- data <<= 8 * (4 - len);
- /* This memcpy is for processors which can't
- * handle a simple unaligned 32-bit assignment */
- memcpy(&option[OPT_DATA], &data, 4);
- return add_option_string(optionptr, option);
- }
- }
-
- bb_error_msg("cannot add option 0x%02x", code);
- return 0;
-}
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/* options.h */
-#ifndef _OPTIONS_H
-#define _OPTIONS_H
-
-#define TYPE_MASK 0x0F
-
-enum {
- OPTION_IP = 1,
- OPTION_IP_PAIR,
- OPTION_STRING,
-#if ENABLE_FEATURE_RFC3397
- OPTION_STR1035, /* RFC1035 compressed domain name list */
-#endif
- OPTION_BOOLEAN,
- OPTION_U8,
- OPTION_U16,
- OPTION_S16,
- OPTION_U32,
- OPTION_S32
-};
-
-#define OPTION_REQ 0x10 /* have the client request this option */
-#define OPTION_LIST 0x20 /* There can be a list of 1 or more of these */
-
-/*****************************************************************/
-/* Do not modify below here unless you know what you are doing!! */
-/*****************************************************************/
-
-/* DHCP protocol -- see RFC 2131 */
-#define DHCP_MAGIC 0x63825363
-
-
-/* DHCP option codes (partial list) */
-#define DHCP_PADDING 0x00
-#define DHCP_SUBNET 0x01
-#define DHCP_TIME_OFFSET 0x02
-#define DHCP_ROUTER 0x03
-#define DHCP_TIME_SERVER 0x04
-#define DHCP_NAME_SERVER 0x05
-#define DHCP_DNS_SERVER 0x06
-#define DHCP_LOG_SERVER 0x07
-#define DHCP_COOKIE_SERVER 0x08
-#define DHCP_LPR_SERVER 0x09
-#define DHCP_HOST_NAME 0x0c
-#define DHCP_BOOT_SIZE 0x0d
-#define DHCP_DOMAIN_NAME 0x0f
-#define DHCP_SWAP_SERVER 0x10
-#define DHCP_ROOT_PATH 0x11
-#define DHCP_IP_TTL 0x17
-#define DHCP_MTU 0x1a
-#define DHCP_BROADCAST 0x1c
-#define DHCP_NTP_SERVER 0x2a
-#define DHCP_WINS_SERVER 0x2c
-#define DHCP_REQUESTED_IP 0x32
-#define DHCP_LEASE_TIME 0x33
-#define DHCP_OPTION_OVER 0x34
-#define DHCP_MESSAGE_TYPE 0x35
-#define DHCP_SERVER_ID 0x36
-#define DHCP_PARAM_REQ 0x37
-#define DHCP_MESSAGE 0x38
-#define DHCP_MAX_SIZE 0x39
-#define DHCP_T1 0x3a
-#define DHCP_T2 0x3b
-#define DHCP_VENDOR 0x3c
-#define DHCP_CLIENT_ID 0x3d
-#define DHCP_FQDN 0x51
-#define DHCP_END 0xFF
-
-
-#define BOOTREQUEST 1
-#define BOOTREPLY 2
-
-#define ETH_10MB 1
-#define ETH_10MB_LEN 6
-
-#define DHCPDISCOVER 1
-#define DHCPOFFER 2
-#define DHCPREQUEST 3
-#define DHCPDECLINE 4
-#define DHCPACK 5
-#define DHCPNAK 6
-#define DHCPRELEASE 7
-#define DHCPINFORM 8
-
-#define BROADCAST_FLAG 0x8000
-
-#define OPTION_FIELD 0
-#define FILE_FIELD 1
-#define SNAME_FIELD 2
-
-/* miscellaneous defines */
-#define OPT_CODE 0
-#define OPT_LEN 1
-#define OPT_DATA 2
-
-struct dhcp_option {
- uint8_t flags;
- uint8_t code;
-};
-
-extern const struct dhcp_option dhcp_options[];
-extern const char dhcp_option_strings[];
-extern const uint8_t dhcp_option_lengths[];
-
-uint8_t *get_option(struct dhcpMessage *packet, int code);
-int end_option(uint8_t *optionptr);
-int add_option_string(uint8_t *optionptr, uint8_t *string);
-int add_simple_option(uint8_t *optionptr, uint8_t code, uint32_t data);
-#if ENABLE_FEATURE_RFC3397
-char *dname_dec(const uint8_t *cstr, int clen, const char *pre);
-uint8_t *dname_enc(const uint8_t *cstr, int clen, const char *src, int *retlen);
-#endif
-
-#endif
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/* script.c
- *
- * Functions to call the DHCP client notification scripts
- *
- * Russ Dill <Russ.Dill@asu.edu> July 2001
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "common.h"
-#include "dhcpc.h"
-#include "options.h"
-
-
-/* get a rough idea of how long an option will be (rounding up...) */
-static const uint8_t max_option_length[] = {
- [OPTION_IP] = sizeof("255.255.255.255 "),
- [OPTION_IP_PAIR] = sizeof("255.255.255.255 ") * 2,
- [OPTION_STRING] = 1,
-#if ENABLE_FEATURE_RFC3397
- [OPTION_STR1035] = 1,
-#endif
- [OPTION_BOOLEAN] = sizeof("yes "),
- [OPTION_U8] = sizeof("255 "),
- [OPTION_U16] = sizeof("65535 "),
- [OPTION_S16] = sizeof("-32768 "),
- [OPTION_U32] = sizeof("4294967295 "),
- [OPTION_S32] = sizeof("-2147483684 "),
-};
-
-
-static inline int upper_length(int length, int opt_index)
-{
- return max_option_length[opt_index] *
- (length / dhcp_option_lengths[opt_index]);
-}
-
-
-static int sprintip(char *dest, const char *pre, const uint8_t *ip)
-{
- return sprintf(dest, "%s%d.%d.%d.%d", pre, ip[0], ip[1], ip[2], ip[3]);
-}
-
-
-/* really simple implementation, just count the bits */
-static int mton(uint32_t mask)
-{
- int i = 0;
- mask = ntohl(mask); /* 111110000-like bit pattern */
- while (mask) {
- i++;
- mask <<= 1;
- }
- return i;
-}
-
-
-/* Allocate and fill with the text of option 'option'. */
-static char *alloc_fill_opts(uint8_t *option, const struct dhcp_option *type_p, const char *opt_name)
-{
- int len, type, optlen;
- uint16_t val_u16;
- int16_t val_s16;
- uint32_t val_u32;
- int32_t val_s32;
- char *dest, *ret;
-
- len = option[OPT_LEN - 2];
- type = type_p->flags & TYPE_MASK;
- optlen = dhcp_option_lengths[type];
-
- dest = ret = xmalloc(upper_length(len, type) + strlen(opt_name) + 2);
- dest += sprintf(ret, "%s=", opt_name);
-
- for (;;) {
- switch (type) {
- case OPTION_IP_PAIR:
- dest += sprintip(dest, "", option);
- *dest++ = '/';
- option += 4;
- optlen = 4;
- case OPTION_IP: /* Works regardless of host byte order. */
- dest += sprintip(dest, "", option);
- break;
- case OPTION_BOOLEAN:
- dest += sprintf(dest, *option ? "yes" : "no");
- break;
- case OPTION_U8:
- dest += sprintf(dest, "%u", *option);
- break;
- case OPTION_U16:
- memcpy(&val_u16, option, 2);
- dest += sprintf(dest, "%u", ntohs(val_u16));
- break;
- case OPTION_S16:
- memcpy(&val_s16, option, 2);
- dest += sprintf(dest, "%d", ntohs(val_s16));
- break;
- case OPTION_U32:
- memcpy(&val_u32, option, 4);
- dest += sprintf(dest, "%lu", (unsigned long) ntohl(val_u32));
- break;
- case OPTION_S32:
- memcpy(&val_s32, option, 4);
- dest += sprintf(dest, "%ld", (long) ntohl(val_s32));
- break;
- case OPTION_STRING:
- memcpy(dest, option, len);
- dest[len] = '\0';
- return ret; /* Short circuit this case */
-#if ENABLE_FEATURE_RFC3397
- case OPTION_STR1035:
- /* unpack option into dest; use ret for prefix (i.e., "optname=") */
- dest = dname_dec(option, len, ret);
- free(ret);
- return dest;
-#endif
- }
- option += optlen;
- len -= optlen;
- if (len <= 0) break;
- dest += sprintf(dest, " ");
- }
- return ret;
-}
-
-
-/* put all the parameters into an environment */
-static char **fill_envp(struct dhcpMessage *packet)
-{
- int num_options = 0;
- int i, j;
- char **envp;
- char *var;
- const char *opt_name;
- uint8_t *temp;
- char over = 0;
-
- if (packet) {
- for (i = 0; dhcp_options[i].code; i++) {
- if (get_option(packet, dhcp_options[i].code)) {
- num_options++;
- if (dhcp_options[i].code == DHCP_SUBNET)
- num_options++; /* for mton */
- }
- }
- if (packet->siaddr)
- num_options++;
- temp = get_option(packet, DHCP_OPTION_OVER);
- if (temp)
- over = *temp;
- if (!(over & FILE_FIELD) && packet->file[0])
- num_options++;
- if (!(over & SNAME_FIELD) && packet->sname[0])
- num_options++;
- }
-
- envp = xzalloc(sizeof(char *) * (num_options + 5));
- j = 0;
- envp[j++] = xasprintf("interface=%s", client_config.interface);
- var = getenv("PATH");
- if (var)
- envp[j++] = xasprintf("PATH=%s", var);
- var = getenv("HOME");
- if (var)
- envp[j++] = xasprintf("HOME=%s", var);
-
- if (packet == NULL)
- return envp;
-
- envp[j] = xmalloc(sizeof("ip=255.255.255.255"));
- sprintip(envp[j++], "ip=", (uint8_t *) &packet->yiaddr);
-
- opt_name = dhcp_option_strings;
- i = 0;
- while (*opt_name) {
- temp = get_option(packet, dhcp_options[i].code);
- if (!temp)
- goto next;
- envp[j++] = alloc_fill_opts(temp, &dhcp_options[i], opt_name);
-
- /* Fill in a subnet bits option for things like /24 */
- if (dhcp_options[i].code == DHCP_SUBNET) {
- uint32_t subnet;
- memcpy(&subnet, temp, 4);
- envp[j++] = xasprintf("mask=%d", mton(subnet));
- }
- next:
- opt_name += strlen(opt_name) + 1;
- i++;
- }
- if (packet->siaddr) {
- envp[j] = xmalloc(sizeof("siaddr=255.255.255.255"));
- sprintip(envp[j++], "siaddr=", (uint8_t *) &packet->siaddr);
- }
- if (!(over & FILE_FIELD) && packet->file[0]) {
- /* watch out for invalid packets */
- packet->file[sizeof(packet->file) - 1] = '\0';
- envp[j++] = xasprintf("boot_file=%s", packet->file);
- }
- if (!(over & SNAME_FIELD) && packet->sname[0]) {
- /* watch out for invalid packets */
- packet->sname[sizeof(packet->sname) - 1] = '\0';
- envp[j++] = xasprintf("sname=%s", packet->sname);
- }
- return envp;
-}
-
-
-/* Call a script with a par file and env vars */
-void udhcp_run_script(struct dhcpMessage *packet, const char *name)
-{
- int pid;
- char **envp, **curr;
-
- if (client_config.script == NULL)
- return;
-
- DEBUG("vfork'ing and execle'ing %s", client_config.script);
-
- envp = fill_envp(packet);
-
- /* call script */
-// can we use wait4pid(spawn(...)) here?
- pid = vfork();
- if (pid < 0) return;
- if (pid == 0) {
- /* close fd's? */
- /* exec script */
- execle(client_config.script, client_config.script,
- name, NULL, envp);
- bb_perror_msg_and_die("script %s failed", client_config.script);
- }
- safe_waitpid(pid, NULL, 0);
- for (curr = envp; *curr; curr++)
- free(*curr);
- free(envp);
-}
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/* serverpacket.c
- *
- * Construct and send DHCP server packets
- *
- * Russ Dill <Russ.Dill@asu.edu> July 2001
- *
- * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include "common.h"
-#include "dhcpc.h"
-#include "dhcpd.h"
-#include "options.h"
-
-
-/* send a packet to giaddr using the kernel ip stack */
-static int send_packet_to_relay(struct dhcpMessage *payload)
-{
- DEBUG("Forwarding packet to relay");
-
- return udhcp_send_kernel_packet(payload, server_config.server, SERVER_PORT,
- payload->giaddr, SERVER_PORT);
-}
-
-
-/* send a packet to a specific arp address and ip address by creating our own ip packet */
-static int send_packet_to_client(struct dhcpMessage *payload, int force_broadcast)
-{
- const uint8_t *chaddr;
- uint32_t ciaddr;
-
- if (force_broadcast) {
- DEBUG("broadcasting packet to client (NAK)");
- ciaddr = INADDR_BROADCAST;
- chaddr = MAC_BCAST_ADDR;
- } else if (payload->ciaddr) {
- DEBUG("unicasting packet to client ciaddr");
- ciaddr = payload->ciaddr;
- chaddr = payload->chaddr;
- } else if (ntohs(payload->flags) & BROADCAST_FLAG) {
- DEBUG("broadcasting packet to client (requested)");
- ciaddr = INADDR_BROADCAST;
- chaddr = MAC_BCAST_ADDR;
- } else {
- DEBUG("unicasting packet to client yiaddr");
- ciaddr = payload->yiaddr;
- chaddr = payload->chaddr;
- }
- return udhcp_send_raw_packet(payload, server_config.server, SERVER_PORT,
- ciaddr, CLIENT_PORT, chaddr, server_config.ifindex);
-}
-
-
-/* send a dhcp packet, if force broadcast is set, the packet will be broadcast to the client */
-static int send_packet(struct dhcpMessage *payload, int force_broadcast)
-{
- int ret;
-
- if (payload->giaddr)
- ret = send_packet_to_relay(payload);
- else ret = send_packet_to_client(payload, force_broadcast);
- return ret;
-}
-
-
-static void init_packet(struct dhcpMessage *packet, struct dhcpMessage *oldpacket, char type)
-{
- udhcp_init_header(packet, type);
- packet->xid = oldpacket->xid;
- memcpy(packet->chaddr, oldpacket->chaddr, 16);
- packet->flags = oldpacket->flags;
- packet->giaddr = oldpacket->giaddr;
- packet->ciaddr = oldpacket->ciaddr;
- add_simple_option(packet->options, DHCP_SERVER_ID, server_config.server);
-}
-
-
-/* add in the bootp options */
-static void add_bootp_options(struct dhcpMessage *packet)
-{
- packet->siaddr = server_config.siaddr;
- if (server_config.sname)
- strncpy((char*)packet->sname, server_config.sname, sizeof(packet->sname) - 1);
- if (server_config.boot_file)
- strncpy((char*)packet->file, server_config.boot_file, sizeof(packet->file) - 1);
-}
-
-
-/* send a DHCP OFFER to a DHCP DISCOVER */
-int sendOffer(struct dhcpMessage *oldpacket)
-{
- struct dhcpMessage packet;
- struct dhcpOfferedAddr *lease = NULL;
- uint32_t req_align, lease_time_align = server_config.lease;
- uint8_t *req, *lease_time;
- struct option_set *curr;
- struct in_addr addr;
-
- uint32_t static_lease_ip;
-
- init_packet(&packet, oldpacket, DHCPOFFER);
-
- static_lease_ip = getIpByMac(server_config.static_leases, oldpacket->chaddr);
-
- /* ADDME: if static, short circuit */
- if (!static_lease_ip) {
- /* the client is in our lease/offered table */
- lease = find_lease_by_chaddr(oldpacket->chaddr);
- if (lease) {
- if (!lease_expired(lease))
- lease_time_align = lease->expires - time(0);
- packet.yiaddr = lease->yiaddr;
- /* Or the client has a requested ip */
- } else if ((req = get_option(oldpacket, DHCP_REQUESTED_IP))
- /* Don't look here (ugly hackish thing to do) */
- && memcpy(&req_align, req, 4)
- /* and the ip is in the lease range */
- && ntohl(req_align) >= server_config.start_ip
- && ntohl(req_align) <= server_config.end_ip
- && !static_lease_ip /* Check that its not a static lease */
- /* and is not already taken/offered */
- && (!(lease = find_lease_by_yiaddr(req_align))
- /* or its taken, but expired */ /* ADDME: or maybe in here */
- || lease_expired(lease))
- ) {
- packet.yiaddr = req_align; /* FIXME: oh my, is there a host using this IP? */
- /* otherwise, find a free IP */
- } else {
- /* Is it a static lease? (No, because find_address skips static lease) */
- packet.yiaddr = find_address(0);
- /* try for an expired lease */
- if (!packet.yiaddr)
- packet.yiaddr = find_address(1);
- }
-
- if (!packet.yiaddr) {
- bb_error_msg("no IP addresses to give - OFFER abandoned");
- return -1;
- }
- if (!add_lease(packet.chaddr, packet.yiaddr, server_config.offer_time)) {
- bb_error_msg("lease pool is full - OFFER abandoned");
- return -1;
- }
- lease_time = get_option(oldpacket, DHCP_LEASE_TIME);
- if (lease_time) {
- memcpy(&lease_time_align, lease_time, 4);
- lease_time_align = ntohl(lease_time_align);
- if (lease_time_align > server_config.lease)
- lease_time_align = server_config.lease;
- }
-
- /* Make sure we aren't just using the lease time from the previous offer */
- if (lease_time_align < server_config.min_lease)
- lease_time_align = server_config.lease;
- /* ADDME: end of short circuit */
- } else {
- /* It is a static lease... use it */
- packet.yiaddr = static_lease_ip;
- }
-
- add_simple_option(packet.options, DHCP_LEASE_TIME, htonl(lease_time_align));
-
- curr = server_config.options;
- while (curr) {
- if (curr->data[OPT_CODE] != DHCP_LEASE_TIME)
- add_option_string(packet.options, curr->data);
- curr = curr->next;
- }
-
- add_bootp_options(&packet);
-
- addr.s_addr = packet.yiaddr;
- bb_info_msg("Sending OFFER of %s", inet_ntoa(addr));
- return send_packet(&packet, 0);
-}
-
-
-int sendNAK(struct dhcpMessage *oldpacket)
-{
- struct dhcpMessage packet;
-
- init_packet(&packet, oldpacket, DHCPNAK);
-
- DEBUG("Sending NAK");
- return send_packet(&packet, 1);
-}
-
-
-int sendACK(struct dhcpMessage *oldpacket, uint32_t yiaddr)
-{
- struct dhcpMessage packet;
- struct option_set *curr;
- uint8_t *lease_time;
- uint32_t lease_time_align = server_config.lease;
- struct in_addr addr;
-
- init_packet(&packet, oldpacket, DHCPACK);
- packet.yiaddr = yiaddr;
-
- lease_time = get_option(oldpacket, DHCP_LEASE_TIME);
- if (lease_time) {
- memcpy(&lease_time_align, lease_time, 4);
- lease_time_align = ntohl(lease_time_align);
- if (lease_time_align > server_config.lease)
- lease_time_align = server_config.lease;
- else if (lease_time_align < server_config.min_lease)
- lease_time_align = server_config.lease;
- }
-
- add_simple_option(packet.options, DHCP_LEASE_TIME, htonl(lease_time_align));
-
- curr = server_config.options;
- while (curr) {
- if (curr->data[OPT_CODE] != DHCP_LEASE_TIME)
- add_option_string(packet.options, curr->data);
- curr = curr->next;
- }
-
- add_bootp_options(&packet);
-
- addr.s_addr = packet.yiaddr;
- bb_info_msg("Sending ACK to %s", inet_ntoa(addr));
-
- if (send_packet(&packet, 0) < 0)
- return -1;
-
- add_lease(packet.chaddr, packet.yiaddr, lease_time_align);
- if (ENABLE_FEATURE_UDHCPD_WRITE_LEASES_EARLY) {
- /* rewrite the file with leases at every new acceptance */
- write_leases();
- }
-
- return 0;
-}
-
-
-int send_inform(struct dhcpMessage *oldpacket)
-{
- struct dhcpMessage packet;
- struct option_set *curr;
-
- init_packet(&packet, oldpacket, DHCPACK);
-
- curr = server_config.options;
- while (curr) {
- if (curr->data[OPT_CODE] != DHCP_LEASE_TIME)
- add_option_string(packet.options, curr->data);
- curr = curr->next;
- }
-
- add_bootp_options(&packet);
-
- return send_packet(&packet, 0);
-}
+++ /dev/null
-menu "Print Utilities"
-
-config LPD
- bool "lpd"
- default n
- help
- lpd is a print spooling daemon.
-
-config LPR
- bool "lpr"
- default n
- help
- lpr sends files (or standard input) to a print spooling daemon.
-
-config LPQ
- bool "lpq"
- default n
- help
- lpq is a print spool queue examination and manipulation program.
-
-endmenu
+++ /dev/null
-# Makefile for busybox
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y :=
-
-lib-$(CONFIG_LPD) += lpd.o
-lib-$(CONFIG_LPR) += lpr.o
-lib-$(CONFIG_LPQ) += lpr.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Process Utilities"
-
-config FREE
- bool "free"
- default n
- help
- free displays the total amount of free and used physical and swap
- memory in the system, as well as the buffers used by the kernel.
- The shared memory column should be ignored; it is obsolete.
-
-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 KILL
- bool "kill"
- default n
- help
- The command kill sends the specified signal to the specified
- process or process group. If no signal is specified, the TERM
- signal is sent.
-
-config KILLALL
- bool "killall"
- default n
- depends on KILL
- help
- killall sends a signal to all processes running any of the
- specified commands. If no signal name is specified, SIGTERM is
- sent.
-
-config KILLALL5
- bool "killall5"
- default n
- depends on KILL
-
-config NMETER
- bool "nmeter"
- default n
- help
- Prints selected system stats continuously, one line per update.
-
-config PGREP
- bool "pgrep"
- default n
- help
- Look for processes by name.
-
-config PIDOF
- bool "pidof"
- default n
- help
- Pidof finds the process id's (pids) of the named programs. It prints
- those id's on the standard output.
-
-config FEATURE_PIDOF_SINGLE
- bool "Enable argument for single shot (-s)"
- default n
- depends on PIDOF
- help
- Support argument '-s' for returning only the first pid found.
-
-config FEATURE_PIDOF_OMIT
- bool "Enable argument for omitting pids (-o)"
- default n
- depends on 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 PKILL
- bool "pkill"
- default n
- help
- Send signals to processes by name.
-
-config PS
- bool "ps"
- default n
- help
- ps gives a snapshot of the current processes.
-
-config FEATURE_PS_WIDE
- bool "Enable argument for wide output (-w)"
- default n
- depends on 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 FEATURE_PS_TIME
- bool "Enable time and elapsed time output"
- default n
- depends on PS && DESKTOP
- help
- Support -o time and -o etime output specifiers.
-
-config FEATURE_PS_UNUSUAL_SYSTEMS
- bool "Support Linux prior to 2.4.0 and non-ELF systems"
- default n
- depends on FEATURE_PS_TIME
- help
- Include support for measuring HZ on old kernels and non-ELF systems
- (if you are on Linux 2.4.0+ and use ELF, you don't need this)
-
-config RENICE
- bool "renice"
- default n
- help
- Renice alters the scheduling priority of one or more running
- processes.
-
-config BB_SYSCTL
- bool "sysctl"
- default n
- help
- Configure kernel parameters at runtime.
-
-config TOP
- bool "top"
- default n
- help
- The top program provides a dynamic real-time view of a running
- system.
-
-config FEATURE_TOP_CPU_USAGE_PERCENTAGE
- bool "Show CPU per-process usage percentage (adds 2k bytes)"
- default y
- depends on TOP
- help
- Make top display CPU usage for each process.
-
-config FEATURE_TOP_CPU_GLOBAL_PERCENTS
- bool "Show CPU global usage percentage (adds 0.5k bytes)"
- default y
- depends on FEATURE_TOP_CPU_USAGE_PERCENTAGE
- help
- Makes top display "CPU: NN% usr NN% sys..." line.
-
-config FEATURE_TOP_DECIMALS
- bool "Show 1/10th of a percent in CPU/mem statistics (adds 0.3k bytes)"
- default n
- depends on FEATURE_TOP_CPU_USAGE_PERCENTAGE
- help
- Show 1/10th of a percent in CPU/mem statistics.
-
-config FEATURE_TOPMEM
- bool "topmem"
- default n
- depends on TOP
- help
- Enable 's' in top (gives lots of memory info)
-
-config UPTIME
- bool "uptime"
- default n
- help
- uptime gives a one line display of the current time, how long
- 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 WATCH
- bool "watch"
- default n
- #huh?? select DATE
- help
- watch is used to execute a program periodically, showing
- output to the screen.
-
-
-endmenu
-
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_FREE) += free.o
-lib-$(CONFIG_FUSER) += fuser.o
-lib-$(CONFIG_KILL) += kill.o
-lib-$(CONFIG_ASH) += kill.o # used for built-in kill by ash
-lib-$(CONFIG_NMETER) += nmeter.o
-lib-$(CONFIG_PGREP) += pgrep.o
-lib-$(CONFIG_PKILL) += pgrep.o
-lib-$(CONFIG_PIDOF) += pidof.o
-lib-$(CONFIG_PS) += ps.o
-lib-$(CONFIG_RENICE) += renice.o
-lib-$(CONFIG_BB_SYSCTL) += sysctl.o
-lib-$(CONFIG_TOP) += top.o
-lib-$(CONFIG_UPTIME) += uptime.o
-lib-$(CONFIG_WATCH) += watch.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Runit Utilities"
-
-config RUNSV
- bool "runsv"
- default n
- help
- runsv starts and monitors a service and optionally an appendant log
- service.
-
-config RUNSVDIR
- bool "runsvdir"
- default n
- help
- runsvdir starts a runsv process for each subdirectory, or symlink to
- a directory, in the services directory dir, up to a limit of 1000
- subdirectories, and restarts a runsv process if it terminates.
-
-config SV
- bool "sv"
- default n
- help
- sv reports the current status and controls the state of services
- monitored by the runsv supervisor.
-
-config SVLOGD
- bool "svlogd"
- default n
- help
- svlogd continuously reads log data from its standard input, optionally
- filters log messages, and writes the data to one or more automatically
- rotated logs.
-
-config CHPST
- bool "chpst"
- default n
- help
- chpst changes the process state according to the given options, and
- execs specified program.
-
-config SETUIDGID
- bool "setuidgid"
- help
- Sets soft resource limits as specified by options
-
-config ENVUIDGID
- bool "envuidgid"
- help
- Sets $UID to account's uid and $GID to account's gid
-
-config ENVDIR
- bool "envdir"
- help
- Sets various environment variables as specified by files
- in the given directory
-
-config SOFTLIMIT
- bool "softlimit"
- help
- Sets soft resource limits as specified by options
-
-endmenu
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_RUNSV) += runsv.o runit_lib.o
-lib-$(CONFIG_RUNSVDIR) += runsvdir.o runit_lib.o
-lib-$(CONFIG_SV) += sv.o runit_lib.o
-lib-$(CONFIG_SVLOGD) += svlogd.o runit_lib.o
-lib-$(CONFIG_CHPST) += chpst.o
-
-lib-$(CONFIG_ENVDIR) += chpst.o
-lib-$(CONFIG_ENVUIDGID) += chpst.o
-lib-$(CONFIG_SETUIDGID) += chpst.o
-lib-$(CONFIG_SOFTLIMIT) += chpst.o
+++ /dev/null
-###
-# scripts contains sources for various helper programs used throughout
-# the kernel for the build process.
-# ---------------------------------------------------------------------------
-
-# Let clean descend into subdirs
-subdir- += basic kconfig
+++ /dev/null
-#
-# Automatically generated make config: don't edit
-# Busybox version: 1.10.0.svn
-# Fri Mar 21 21:33:40 2008
-#
-CONFIG_HAVE_DOT_CONFIG=y
-
-#
-# Busybox Settings
-#
-
-#
-# General Configuration
-#
-CONFIG_NITPICK=y
-# CONFIG_DESKTOP is not set
-CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
-# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
-# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
-CONFIG_SHOW_USAGE=y
-CONFIG_FEATURE_VERBOSE_USAGE=y
-CONFIG_FEATURE_COMPRESS_USAGE=y
-CONFIG_FEATURE_INSTALLER=y
-CONFIG_LOCALE_SUPPORT=y
-CONFIG_GETOPT_LONG=y
-CONFIG_FEATURE_DEVPTS=y
-# CONFIG_FEATURE_CLEAN_UP is not set
-CONFIG_FEATURE_PIDFILE=y
-CONFIG_FEATURE_SUID=y
-CONFIG_FEATURE_SUID_CONFIG=y
-CONFIG_FEATURE_SUID_CONFIG_QUIET=y
-# CONFIG_SELINUX is not set
-# CONFIG_FEATURE_PREFER_APPLETS is not set
-CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
-CONFIG_FEATURE_SYSLOG=y
-CONFIG_FEATURE_HAVE_RPC=y
-
-#
-# Build Options
-#
-# CONFIG_STATIC is not set
-# CONFIG_NOMMU is not set
-# CONFIG_BUILD_LIBBUSYBOX is not set
-# CONFIG_FEATURE_INDIVIDUAL is not set
-# CONFIG_FEATURE_SHARED_BUSYBOX is not set
-CONFIG_LFS=y
-
-#
-# Debugging Options
-#
-# CONFIG_DEBUG is not set
-# CONFIG_WERROR is not set
-CONFIG_NO_DEBUG_LIB=y
-# CONFIG_DMALLOC is not set
-# CONFIG_EFENCE is not set
-CONFIG_INCLUDE_SUSv2=y
-
-#
-# Installation Options
-#
-# CONFIG_INSTALL_NO_USR is not set
-CONFIG_INSTALL_APPLET_SYMLINKS=y
-# CONFIG_INSTALL_APPLET_HARDLINKS is not set
-# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
-# CONFIG_INSTALL_APPLET_DONT is not set
-# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
-# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
-# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
-CONFIG_PREFIX="./_install"
-
-#
-# Busybox Library Tuning
-#
-CONFIG_PASSWORD_MINLEN=6
-CONFIG_MD5_SIZE_VS_SPEED=2
-CONFIG_FEATURE_FAST_TOP=y
-# CONFIG_FEATURE_ETC_NETWORKS is not set
-CONFIG_FEATURE_EDITING=y
-CONFIG_FEATURE_EDITING_MAX_LEN=1024
-# CONFIG_FEATURE_EDITING_VI is not set
-CONFIG_FEATURE_EDITING_HISTORY=15
-# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set
-CONFIG_FEATURE_TAB_COMPLETION=y
-# CONFIG_FEATURE_USERNAME_COMPLETION is not set
-# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
-# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
-CONFIG_FEATURE_COPYBUF_KB=4
-# CONFIG_MONOTONIC_SYSCALL is not set
-CONFIG_IOCTL_HEX2STR_ERROR=y
-
-#
-# Applets
-#
-
-#
-# Archival Utilities
-#
-CONFIG_AR=y
-CONFIG_FEATURE_AR_LONG_FILENAMES=y
-CONFIG_BUNZIP2=y
-CONFIG_BZIP2=y
-CONFIG_CPIO=y
-# CONFIG_DPKG is not set
-# CONFIG_DPKG_DEB is not set
-# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
-CONFIG_GUNZIP=y
-CONFIG_FEATURE_GUNZIP_UNCOMPRESS=y
-CONFIG_GZIP=y
-CONFIG_RPM2CPIO=y
-CONFIG_RPM=y
-CONFIG_FEATURE_RPM_BZ2=y
-CONFIG_TAR=y
-CONFIG_FEATURE_TAR_CREATE=y
-CONFIG_FEATURE_TAR_GZIP=y
-CONFIG_FEATURE_TAR_BZIP2=y
-CONFIG_FEATURE_TAR_LZMA=y
-CONFIG_FEATURE_TAR_COMPRESS=y
-CONFIG_FEATURE_TAR_AUTODETECT=y
-CONFIG_FEATURE_TAR_FROM=y
-CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
-CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y
-CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
-CONFIG_FEATURE_TAR_LONG_OPTIONS=y
-CONFIG_FEATURE_TAR_UNAME_GNAME=y
-CONFIG_UNCOMPRESS=y
-CONFIG_UNLZMA=y
-CONFIG_FEATURE_LZMA_FAST=y
-CONFIG_UNZIP=y
-
-#
-# Common options for cpio and tar
-#
-CONFIG_FEATURE_UNARCHIVE_TAPE=y
-# CONFIG_FEATURE_DEB_TAR_GZ is not set
-# CONFIG_FEATURE_DEB_TAR_BZ2 is not set
-# CONFIG_FEATURE_DEB_TAR_LZMA is not set
-
-#
-# Coreutils
-#
-CONFIG_BASENAME=y
-CONFIG_CAL=y
-CONFIG_CAT=y
-CONFIG_CATV=y
-CONFIG_CHGRP=y
-CONFIG_CHMOD=y
-CONFIG_CHOWN=y
-CONFIG_CHROOT=y
-CONFIG_CKSUM=y
-CONFIG_COMM=y
-CONFIG_CP=y
-CONFIG_CUT=y
-CONFIG_DATE=y
-CONFIG_FEATURE_DATE_ISOFMT=y
-CONFIG_DD=y
-CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
-CONFIG_FEATURE_DD_IBS_OBS=y
-CONFIG_DF=y
-CONFIG_FEATURE_DF_INODE=y
-CONFIG_DIRNAME=y
-CONFIG_DOS2UNIX=y
-CONFIG_UNIX2DOS=y
-CONFIG_DU=y
-CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
-CONFIG_ECHO=y
-CONFIG_FEATURE_FANCY_ECHO=y
-CONFIG_ENV=y
-CONFIG_FEATURE_ENV_LONG_OPTIONS=y
-CONFIG_EXPAND=y
-CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y
-CONFIG_EXPR=y
-CONFIG_EXPR_MATH_SUPPORT_64=y
-CONFIG_FALSE=y
-CONFIG_FOLD=y
-CONFIG_HEAD=y
-CONFIG_FEATURE_FANCY_HEAD=y
-CONFIG_HOSTID=y
-CONFIG_ID=y
-CONFIG_INSTALL=y
-CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y
-CONFIG_LENGTH=y
-CONFIG_LN=y
-CONFIG_LOGNAME=y
-CONFIG_LS=y
-CONFIG_FEATURE_LS_FILETYPES=y
-CONFIG_FEATURE_LS_FOLLOWLINKS=y
-CONFIG_FEATURE_LS_RECURSIVE=y
-CONFIG_FEATURE_LS_SORTFILES=y
-CONFIG_FEATURE_LS_TIMESTAMPS=y
-CONFIG_FEATURE_LS_USERNAME=y
-CONFIG_FEATURE_LS_COLOR=y
-CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
-CONFIG_MD5SUM=y
-CONFIG_MKDIR=y
-CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
-CONFIG_MKFIFO=y
-CONFIG_MKNOD=y
-CONFIG_MV=y
-CONFIG_FEATURE_MV_LONG_OPTIONS=y
-CONFIG_NICE=y
-CONFIG_NOHUP=y
-CONFIG_OD=y
-CONFIG_PRINTENV=y
-CONFIG_PRINTF=y
-CONFIG_PWD=y
-CONFIG_READLINK=y
-CONFIG_FEATURE_READLINK_FOLLOW=y
-CONFIG_REALPATH=y
-CONFIG_RM=y
-CONFIG_RMDIR=y
-# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
-CONFIG_SEQ=y
-CONFIG_SHA1SUM=y
-CONFIG_SLEEP=y
-CONFIG_FEATURE_FANCY_SLEEP=y
-CONFIG_SORT=y
-CONFIG_FEATURE_SORT_BIG=y
-CONFIG_SPLIT=y
-CONFIG_FEATURE_SPLIT_FANCY=y
-CONFIG_STAT=y
-CONFIG_FEATURE_STAT_FORMAT=y
-CONFIG_STTY=y
-CONFIG_SUM=y
-CONFIG_SYNC=y
-CONFIG_TAC=y
-CONFIG_TAIL=y
-CONFIG_FEATURE_FANCY_TAIL=y
-CONFIG_TEE=y
-CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
-CONFIG_TEST=y
-CONFIG_FEATURE_TEST_64=y
-CONFIG_TOUCH=y
-CONFIG_TR=y
-CONFIG_FEATURE_TR_CLASSES=y
-CONFIG_FEATURE_TR_EQUIV=y
-CONFIG_TRUE=y
-CONFIG_TTY=y
-CONFIG_UNAME=y
-CONFIG_UNEXPAND=y
-CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y
-CONFIG_UNIQ=y
-CONFIG_USLEEP=y
-CONFIG_UUDECODE=y
-CONFIG_UUENCODE=y
-CONFIG_WC=y
-CONFIG_FEATURE_WC_LARGE=y
-CONFIG_WHO=y
-CONFIG_WHOAMI=y
-CONFIG_YES=y
-
-#
-# Common options for cp and mv
-#
-CONFIG_FEATURE_PRESERVE_HARDLINKS=y
-
-#
-# Common options for ls, more and telnet
-#
-CONFIG_FEATURE_AUTOWIDTH=y
-
-#
-# Common options for df, du, ls
-#
-CONFIG_FEATURE_HUMAN_READABLE=y
-
-#
-# Common options for md5sum, sha1sum
-#
-CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
-
-#
-# Console Utilities
-#
-CONFIG_CHVT=y
-CONFIG_CLEAR=y
-CONFIG_DEALLOCVT=y
-CONFIG_DUMPKMAP=y
-CONFIG_KBD_MODE=y
-CONFIG_LOADFONT=y
-CONFIG_LOADKMAP=y
-CONFIG_OPENVT=y
-CONFIG_RESET=y
-CONFIG_RESIZE=y
-CONFIG_FEATURE_RESIZE_PRINT=y
-CONFIG_SETCONSOLE=y
-CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y
-CONFIG_SETKEYCODES=y
-CONFIG_SETLOGCONS=y
-
-#
-# Debian Utilities
-#
-CONFIG_MKTEMP=y
-CONFIG_PIPE_PROGRESS=y
-CONFIG_RUN_PARTS=y
-CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
-CONFIG_FEATURE_RUN_PARTS_FANCY=y
-CONFIG_START_STOP_DAEMON=y
-CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
-CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
-CONFIG_WHICH=y
-
-#
-# Editors
-#
-CONFIG_AWK=y
-CONFIG_FEATURE_AWK_MATH=y
-CONFIG_CMP=y
-CONFIG_DIFF=y
-CONFIG_FEATURE_DIFF_BINARY=y
-CONFIG_FEATURE_DIFF_DIR=y
-CONFIG_FEATURE_DIFF_MINIMAL=y
-CONFIG_ED=y
-CONFIG_PATCH=y
-CONFIG_SED=y
-CONFIG_VI=y
-CONFIG_FEATURE_VI_MAX_LEN=4096
-# CONFIG_FEATURE_VI_8BIT is not set
-CONFIG_FEATURE_VI_COLON=y
-CONFIG_FEATURE_VI_YANKMARK=y
-CONFIG_FEATURE_VI_SEARCH=y
-CONFIG_FEATURE_VI_USE_SIGNALS=y
-CONFIG_FEATURE_VI_DOT_CMD=y
-CONFIG_FEATURE_VI_READONLY=y
-CONFIG_FEATURE_VI_SETOPTS=y
-CONFIG_FEATURE_VI_SET=y
-CONFIG_FEATURE_VI_WIN_RESIZE=y
-CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
-CONFIG_FEATURE_ALLOW_EXEC=y
-
-#
-# Finding Utilities
-#
-CONFIG_FIND=y
-CONFIG_FEATURE_FIND_PRINT0=y
-CONFIG_FEATURE_FIND_MTIME=y
-CONFIG_FEATURE_FIND_MMIN=y
-CONFIG_FEATURE_FIND_PERM=y
-CONFIG_FEATURE_FIND_TYPE=y
-CONFIG_FEATURE_FIND_XDEV=y
-CONFIG_FEATURE_FIND_MAXDEPTH=y
-CONFIG_FEATURE_FIND_NEWER=y
-CONFIG_FEATURE_FIND_INUM=y
-CONFIG_FEATURE_FIND_EXEC=y
-CONFIG_FEATURE_FIND_USER=y
-CONFIG_FEATURE_FIND_GROUP=y
-CONFIG_FEATURE_FIND_NOT=y
-CONFIG_FEATURE_FIND_DEPTH=y
-CONFIG_FEATURE_FIND_PAREN=y
-CONFIG_FEATURE_FIND_SIZE=y
-CONFIG_FEATURE_FIND_PRUNE=y
-CONFIG_FEATURE_FIND_DELETE=y
-CONFIG_FEATURE_FIND_PATH=y
-CONFIG_FEATURE_FIND_REGEX=y
-# CONFIG_FEATURE_FIND_CONTEXT is not set
-CONFIG_GREP=y
-CONFIG_FEATURE_GREP_EGREP_ALIAS=y
-CONFIG_FEATURE_GREP_FGREP_ALIAS=y
-CONFIG_FEATURE_GREP_CONTEXT=y
-CONFIG_XARGS=y
-CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
-CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
-CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
-CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
-
-#
-# Init Utilities
-#
-CONFIG_INIT=y
-# CONFIG_DEBUG_INIT is not set
-CONFIG_FEATURE_USE_INITTAB=y
-# CONFIG_FEATURE_KILL_REMOVED is not set
-CONFIG_FEATURE_KILL_DELAY=0
-CONFIG_FEATURE_INIT_SCTTY=y
-# CONFIG_FEATURE_INIT_SYSLOG is not set
-CONFIG_FEATURE_EXTRA_QUIET=y
-CONFIG_FEATURE_INIT_COREDUMPS=y
-CONFIG_FEATURE_INITRD=y
-CONFIG_HALT=y
-CONFIG_MESG=y
-
-#
-# Login/Password Management Utilities
-#
-CONFIG_FEATURE_SHADOWPASSWDS=y
-CONFIG_USE_BB_SHADOW=y
-CONFIG_USE_BB_PWD_GRP=y
-CONFIG_ADDGROUP=y
-CONFIG_FEATURE_ADDUSER_TO_GROUP=y
-CONFIG_DELGROUP=y
-CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
-# CONFIG_FEATURE_CHECK_NAMES is not set
-CONFIG_ADDUSER=y
-# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
-CONFIG_DELUSER=y
-CONFIG_GETTY=y
-CONFIG_FEATURE_UTMP=y
-CONFIG_FEATURE_WTMP=y
-CONFIG_LOGIN=y
-# CONFIG_PAM is not set
-CONFIG_LOGIN_SCRIPTS=y
-CONFIG_FEATURE_NOLOGIN=y
-CONFIG_FEATURE_SECURETTY=y
-CONFIG_PASSWD=y
-CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
-CONFIG_CRYPTPW=y
-CONFIG_CHPASSWD=y
-CONFIG_SU=y
-CONFIG_FEATURE_SU_SYSLOG=y
-CONFIG_FEATURE_SU_CHECKS_SHELLS=y
-CONFIG_SULOGIN=y
-CONFIG_VLOCK=y
-
-#
-# Linux Ext2 FS Progs
-#
-CONFIG_CHATTR=y
-CONFIG_FSCK=y
-CONFIG_LSATTR=y
-
-#
-# Linux Module Utilities
-#
-CONFIG_INSMOD=y
-CONFIG_FEATURE_INSMOD_VERSION_CHECKING=y
-CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS=y
-CONFIG_FEATURE_INSMOD_LOADINKMEM=y
-CONFIG_FEATURE_INSMOD_LOAD_MAP=y
-CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL=y
-CONFIG_RMMOD=y
-CONFIG_LSMOD=y
-CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
-CONFIG_MODPROBE=y
-CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
-CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
-
-#
-# Options common to multiple modutils
-#
-CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
-CONFIG_FEATURE_2_4_MODULES=y
-CONFIG_FEATURE_2_6_MODULES=y
-# CONFIG_FEATURE_QUERY_MODULE_INTERFACE is not set
-
-#
-# Linux System Utilities
-#
-CONFIG_DMESG=y
-CONFIG_FEATURE_DMESG_PRETTY=y
-CONFIG_FBSET=y
-CONFIG_FEATURE_FBSET_FANCY=y
-CONFIG_FEATURE_FBSET_READMODE=y
-CONFIG_FDFLUSH=y
-CONFIG_FDFORMAT=y
-CONFIG_FDISK=y
-CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
-CONFIG_FEATURE_FDISK_WRITABLE=y
-# CONFIG_FEATURE_AIX_LABEL is not set
-# CONFIG_FEATURE_SGI_LABEL is not set
-# CONFIG_FEATURE_SUN_LABEL is not set
-# CONFIG_FEATURE_OSF_LABEL is not set
-CONFIG_FEATURE_FDISK_ADVANCED=y
-# CONFIG_FINDFS is not set
-CONFIG_FREERAMDISK=y
-CONFIG_FSCK_MINIX=y
-CONFIG_MKFS_MINIX=y
-
-#
-# Minix filesystem support
-#
-CONFIG_FEATURE_MINIX2=y
-CONFIG_GETOPT=y
-CONFIG_HEXDUMP=y
-# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
-# CONFIG_HD is not set
-CONFIG_HWCLOCK=y
-CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
-CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
-CONFIG_IPCRM=y
-CONFIG_IPCS=y
-CONFIG_LOSETUP=y
-CONFIG_MDEV=y
-CONFIG_FEATURE_MDEV_CONF=y
-CONFIG_FEATURE_MDEV_RENAME=y
-CONFIG_FEATURE_MDEV_EXEC=y
-CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
-CONFIG_MKSWAP=y
-CONFIG_FEATURE_MKSWAP_V0=y
-CONFIG_MORE=y
-CONFIG_FEATURE_USE_TERMIOS=y
-# CONFIG_VOLUMEID is not set
-# CONFIG_FEATURE_VOLUMEID_EXT is not set
-# CONFIG_FEATURE_VOLUMEID_REISERFS is not set
-# CONFIG_FEATURE_VOLUMEID_FAT is not set
-# CONFIG_FEATURE_VOLUMEID_HFS is not set
-# CONFIG_FEATURE_VOLUMEID_JFS is not set
-# CONFIG_FEATURE_VOLUMEID_XFS is not set
-# CONFIG_FEATURE_VOLUMEID_NTFS is not set
-# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set
-# CONFIG_FEATURE_VOLUMEID_UDF is not set
-# CONFIG_FEATURE_VOLUMEID_LUKS is not set
-# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set
-# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set
-# CONFIG_FEATURE_VOLUMEID_ROMFS is not set
-# CONFIG_FEATURE_VOLUMEID_SYSV is not set
-# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set
-# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set
-CONFIG_MOUNT=y
-CONFIG_FEATURE_MOUNT_FAKE=y
-CONFIG_FEATURE_MOUNT_VERBOSE=y
-# CONFIG_FEATURE_MOUNT_HELPERS is not set
-# CONFIG_FEATURE_MOUNT_LABEL is not set
-CONFIG_FEATURE_MOUNT_NFS=y
-CONFIG_FEATURE_MOUNT_CIFS=y
-CONFIG_FEATURE_MOUNT_FLAGS=y
-CONFIG_FEATURE_MOUNT_FSTAB=y
-CONFIG_PIVOT_ROOT=y
-CONFIG_RDATE=y
-CONFIG_READPROFILE=y
-# CONFIG_RTCWAKE is not set
-CONFIG_SETARCH=y
-CONFIG_SWAPONOFF=y
-CONFIG_SWITCH_ROOT=y
-CONFIG_UMOUNT=y
-CONFIG_FEATURE_UMOUNT_ALL=y
-
-#
-# Common options for mount/umount
-#
-CONFIG_FEATURE_MOUNT_LOOP=y
-# CONFIG_FEATURE_MTAB_SUPPORT is not set
-
-#
-# Miscellaneous Utilities
-#
-CONFIG_ADJTIMEX=y
-# CONFIG_BBCONFIG is not set
-# CONFIG_CHAT is not set
-# CONFIG_FEATURE_CHAT_NOFAIL is not set
-# CONFIG_FEATURE_CHAT_TTY_HIFI is not set
-# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set
-# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set
-# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set
-# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set
-# CONFIG_FEATURE_CHAT_CLR_ABORT is not set
-CONFIG_CHRT=y
-CONFIG_CROND=y
-# CONFIG_DEBUG_CROND_OPTION is not set
-CONFIG_FEATURE_CROND_CALL_SENDMAIL=y
-CONFIG_CRONTAB=y
-CONFIG_DC=y
-# CONFIG_DEVFSD is not set
-# CONFIG_DEVFSD_MODLOAD is not set
-# CONFIG_DEVFSD_FG_NP is not set
-# CONFIG_DEVFSD_VERBOSE is not set
-# CONFIG_FEATURE_DEVFS is not set
-CONFIG_EJECT=y
-CONFIG_FEATURE_EJECT_SCSI=y
-CONFIG_LAST=y
-CONFIG_LESS=y
-CONFIG_FEATURE_LESS_MAXLINES=9999999
-CONFIG_FEATURE_LESS_BRACKETS=y
-CONFIG_FEATURE_LESS_FLAGS=y
-CONFIG_FEATURE_LESS_FLAGCS=y
-CONFIG_FEATURE_LESS_MARKS=y
-CONFIG_FEATURE_LESS_REGEXP=y
-CONFIG_HDPARM=y
-CONFIG_FEATURE_HDPARM_GET_IDENTITY=y
-CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y
-CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y
-CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y
-CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y
-CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y
-CONFIG_MAKEDEVS=y
-# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
-CONFIG_FEATURE_MAKEDEVS_TABLE=y
-CONFIG_MICROCOM=y
-CONFIG_MOUNTPOINT=y
-CONFIG_MT=y
-CONFIG_RAIDAUTORUN=y
-CONFIG_READAHEAD=y
-CONFIG_RUNLEVEL=y
-CONFIG_RX=y
-CONFIG_SCRIPT=y
-CONFIG_STRINGS=y
-CONFIG_SETSID=y
-CONFIG_TASKSET=y
-CONFIG_FEATURE_TASKSET_FANCY=y
-CONFIG_TIME=y
-CONFIG_TTYSIZE=y
-CONFIG_WATCHDOG=y
-
-#
-# Networking Utilities
-#
-CONFIG_FEATURE_IPV6=y
-CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
-# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
-CONFIG_ARP=y
-CONFIG_ARPING=y
-CONFIG_BRCTL=y
-CONFIG_FEATURE_BRCTL_FANCY=y
-CONFIG_DNSD=y
-CONFIG_ETHER_WAKE=y
-CONFIG_FAKEIDENTD=y
-CONFIG_FTPGET=y
-CONFIG_FTPPUT=y
-CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y
-CONFIG_HOSTNAME=y
-CONFIG_HTTPD=y
-CONFIG_FEATURE_HTTPD_RANGES=y
-CONFIG_FEATURE_HTTPD_USE_SENDFILE=y
-CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP=y
-CONFIG_FEATURE_HTTPD_SETUID=y
-CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
-CONFIG_FEATURE_HTTPD_AUTH_MD5=y
-CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES=y
-CONFIG_FEATURE_HTTPD_CGI=y
-CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
-CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
-CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
-CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
-CONFIG_FEATURE_HTTPD_PROXY=y
-CONFIG_IFCONFIG=y
-CONFIG_FEATURE_IFCONFIG_STATUS=y
-CONFIG_FEATURE_IFCONFIG_SLIP=y
-CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y
-CONFIG_FEATURE_IFCONFIG_HW=y
-CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
-CONFIG_IFENSLAVE=y
-CONFIG_IFUPDOWN=y
-CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
-CONFIG_FEATURE_IFUPDOWN_IP=y
-CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
-# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
-CONFIG_FEATURE_IFUPDOWN_IPV4=y
-CONFIG_FEATURE_IFUPDOWN_IPV6=y
-CONFIG_FEATURE_IFUPDOWN_MAPPING=y
-# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
-CONFIG_INETD=y
-CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
-CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
-CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
-CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
-CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
-# CONFIG_FEATURE_INETD_RPC is not set
-CONFIG_IP=y
-CONFIG_FEATURE_IP_ADDRESS=y
-CONFIG_FEATURE_IP_LINK=y
-CONFIG_FEATURE_IP_ROUTE=y
-CONFIG_FEATURE_IP_TUNNEL=y
-CONFIG_FEATURE_IP_RULE=y
-CONFIG_FEATURE_IP_SHORT_FORMS=y
-# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
-CONFIG_IPADDR=y
-CONFIG_IPLINK=y
-CONFIG_IPROUTE=y
-CONFIG_IPTUNNEL=y
-CONFIG_IPRULE=y
-CONFIG_IPCALC=y
-CONFIG_FEATURE_IPCALC_FANCY=y
-CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y
-CONFIG_NAMEIF=y
-# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
-CONFIG_NC=y
-CONFIG_NC_SERVER=y
-CONFIG_NC_EXTRA=y
-CONFIG_NETSTAT=y
-CONFIG_FEATURE_NETSTAT_WIDE=y
-CONFIG_NSLOOKUP=y
-CONFIG_PING=y
-CONFIG_PING6=y
-CONFIG_FEATURE_FANCY_PING=y
-CONFIG_PSCAN=y
-CONFIG_ROUTE=y
-CONFIG_SENDMAIL=y
-CONFIG_FETCHMAIL=y
-CONFIG_SLATTACH=y
-CONFIG_TELNET=y
-CONFIG_FEATURE_TELNET_TTYPE=y
-CONFIG_FEATURE_TELNET_AUTOLOGIN=y
-CONFIG_TELNETD=y
-CONFIG_FEATURE_TELNETD_STANDALONE=y
-CONFIG_TFTP=y
-CONFIG_TFTPD=y
-CONFIG_FEATURE_TFTP_GET=y
-CONFIG_FEATURE_TFTP_PUT=y
-CONFIG_FEATURE_TFTP_BLOCKSIZE=y
-# CONFIG_DEBUG_TFTP is not set
-CONFIG_TRACEROUTE=y
-# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
-# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
-# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
-CONFIG_APP_UDHCPD=y
-CONFIG_APP_DHCPRELAY=y
-CONFIG_APP_DUMPLEASES=y
-CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y
-CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases"
-CONFIG_APP_UDHCPC=y
-CONFIG_FEATURE_UDHCPC_ARPING=y
-# CONFIG_FEATURE_UDHCP_PORT is not set
-# CONFIG_FEATURE_UDHCP_DEBUG is not set
-CONFIG_FEATURE_RFC3397=y
-CONFIG_DHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
-CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
-CONFIG_VCONFIG=y
-CONFIG_WGET=y
-CONFIG_FEATURE_WGET_STATUSBAR=y
-CONFIG_FEATURE_WGET_AUTHENTICATION=y
-CONFIG_FEATURE_WGET_LONG_OPTIONS=y
-CONFIG_ZCIP=y
-CONFIG_TCPSVD=y
-CONFIG_UDPSVD=y
-
-#
-# Process Utilities
-#
-CONFIG_FREE=y
-CONFIG_FUSER=y
-CONFIG_KILL=y
-CONFIG_KILLALL=y
-CONFIG_KILLALL5=y
-CONFIG_NMETER=y
-CONFIG_PGREP=y
-CONFIG_PIDOF=y
-CONFIG_FEATURE_PIDOF_SINGLE=y
-CONFIG_FEATURE_PIDOF_OMIT=y
-CONFIG_PKILL=y
-CONFIG_PS=y
-CONFIG_FEATURE_PS_WIDE=y
-# CONFIG_FEATURE_PS_TIME is not set
-# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
-CONFIG_RENICE=y
-CONFIG_BB_SYSCTL=y
-CONFIG_TOP=y
-CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
-CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
-# CONFIG_FEATURE_TOP_DECIMALS is not set
-CONFIG_FEATURE_TOPMEM=y
-CONFIG_UPTIME=y
-CONFIG_WATCH=y
-
-#
-# Shells
-#
-CONFIG_FEATURE_SH_IS_ASH=y
-# CONFIG_FEATURE_SH_IS_HUSH is not set
-# CONFIG_FEATURE_SH_IS_MSH is not set
-# CONFIG_FEATURE_SH_IS_NONE is not set
-CONFIG_ASH=y
-
-#
-# Ash Shell Options
-#
-CONFIG_ASH_JOB_CONTROL=y
-CONFIG_ASH_READ_NCHARS=y
-CONFIG_ASH_READ_TIMEOUT=y
-# CONFIG_ASH_ALIAS is not set
-CONFIG_ASH_MATH_SUPPORT=y
-CONFIG_ASH_MATH_SUPPORT_64=y
-# CONFIG_ASH_GETOPTS is not set
-CONFIG_ASH_BUILTIN_ECHO=y
-CONFIG_ASH_BUILTIN_TEST=y
-CONFIG_ASH_CMDCMD=y
-# CONFIG_ASH_MAIL is not set
-CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
-CONFIG_ASH_RANDOM_SUPPORT=y
-# CONFIG_ASH_EXPAND_PRMT is not set
-# CONFIG_HUSH is not set
-# CONFIG_HUSH_HELP is not set
-# CONFIG_HUSH_INTERACTIVE is not set
-# CONFIG_HUSH_JOB is not set
-# CONFIG_HUSH_TICK is not set
-# CONFIG_HUSH_IF is not set
-# CONFIG_HUSH_LOOPS is not set
-# CONFIG_LASH is not set
-# CONFIG_MSH is not set
-
-#
-# Bourne Shell Options
-#
-CONFIG_FEATURE_SH_EXTRA_QUIET=y
-# CONFIG_FEATURE_SH_STANDALONE is not set
-# CONFIG_CTTYHACK is not set
-
-#
-# System Logging Utilities
-#
-CONFIG_SYSLOGD=y
-CONFIG_FEATURE_ROTATE_LOGFILE=y
-CONFIG_FEATURE_REMOTE_LOG=y
-# CONFIG_FEATURE_SYSLOGD_DUP is not set
-CONFIG_FEATURE_IPC_SYSLOG=y
-CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
-CONFIG_LOGREAD=y
-CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
-CONFIG_KLOGD=y
-CONFIG_LOGGER=y
-
-#
-# Runit Utilities
-#
-CONFIG_RUNSV=y
-CONFIG_RUNSVDIR=y
-CONFIG_SV=y
-CONFIG_SVLOGD=y
-CONFIG_CHPST=y
-CONFIG_SETUIDGID=y
-CONFIG_ENVUIDGID=y
-CONFIG_ENVDIR=y
-CONFIG_SOFTLIMIT=y
-# CONFIG_CHCON is not set
-# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
-# CONFIG_GETENFORCE is not set
-# CONFIG_GETSEBOOL is not set
-# CONFIG_LOAD_POLICY is not set
-# CONFIG_MATCHPATHCON is not set
-# CONFIG_RESTORECON is not set
-# CONFIG_RUNCON is not set
-# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
-# CONFIG_SELINUXENABLED is not set
-# CONFIG_SETENFORCE is not set
-# CONFIG_SETFILES is not set
-# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
-# CONFIG_SETSEBOOL is not set
-# CONFIG_SESTATUS is not set
-
-#
-# Print Utilities
-#
-CONFIG_LPD=y
-CONFIG_LPR=y
-CONFIG_LPQ=y
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Selinux Utilities"
- depends on SELINUX
-
-config CHCON
- bool "chcon"
- default n
- depends on SELINUX
- help
- Enable support to change the security context of file.
-
-config FEATURE_CHCON_LONG_OPTIONS
- bool "Enable long options"
- default y
- depends on CHCON && GETOPT_LONG
- help
- Support long options for the chcon applet.
-
-config GETENFORCE
- bool "getenforce"
- default n
- depends on SELINUX
- help
- Enable support to get the current mode of SELinux.
-
-config GETSEBOOL
- bool "getsebool"
- default n
- depends on SELINUX
- help
- Enable support to get SELinux boolean values.
-
-config LOAD_POLICY
- bool "load_policy"
- default n
- depends on SELINUX
- help
- Enable support to load SELinux policy.
-
-config MATCHPATHCON
- bool "matchpathcon"
- default n
- depends on SELINUX
- help
- Enable support to get default security context of the
- specified path from the file contexts configuration.
-
-config RESTORECON
- bool "restorecon"
- default n
- depends on SELINUX
- help
- Enable support to relabel files. The feature is almost
- the same as setfiles, but usage is a little different.
-
-config RUNCON
- bool "runcon"
- default n
- depends on SELINUX
- help
- Enable support to run command in speficied security context.
-
-config FEATURE_RUNCON_LONG_OPTIONS
- bool "Enable long options"
- default y
- depends on RUNCON && GETOPT_LONG
- help
- Support long options for the runcon applet.
-
-config SELINUXENABLED
- bool "selinuxenabled"
- default n
- depends on SELINUX
- help
- Enable support for this command to be used within shell scripts
- to determine if selinux is enabled.
-
-config SETENFORCE
- bool "setenforce"
- default n
- depends on SELINUX
- help
- Enable support to modify the mode SELinux is running in.
-
-config SETFILES
- bool "setfiles"
- default n
- depends on SELINUX
- help
- Enable support to modify to relabel files.
- Notice: If you built libselinux with -D_FILE_OFFSET_BITS=64,
- (It is default in libselinux's Makefile), you _must_ enable
- CONFIG_LFS.
-
-config FEATURE_SETFILES_CHECK_OPTION
- bool "Enable check option"
- default n
- depends on SETFILES
- help
- Support "-c" option (check the validity of the contexts against
- the specified binary policy) for setfiles. Requires libsepol.
-
-config SETSEBOOL
- bool "setsebool"
- default n
- depends on SELINUX
- help
- Enable support for change boolean.
- semanage and -P option is not supported yet.
-
-config SESTATUS
- bool "sestatus"
- default n
- depends on SELINUX
- help
- Displays the status of SELinux.
-
-endmenu
-
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-# Copyright (C) 2007 by KaiGai Kohei <kaigai@kaigai.gr.jp>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_CHCON) += chcon.o
-lib-$(CONFIG_GETENFORCE) += getenforce.o
-lib-$(CONFIG_GETSEBOOL) += getsebool.o
-lib-$(CONFIG_LOAD_POLICY) += load_policy.o
-lib-$(CONFIG_MATCHPATHCON) += matchpathcon.o
-lib-$(CONFIG_RUNCON) += runcon.o
-lib-$(CONFIG_SELINUXENABLED) += selinuxenabled.o
-lib-$(CONFIG_SETENFORCE) += setenforce.o
-lib-$(CONFIG_SETFILES) += setfiles.o
-lib-$(CONFIG_RESTORECON) += setfiles.o
-lib-$(CONFIG_SETSEBOOL) += setsebool.o
-lib-$(CONFIG_SESTATUS) += sestatus.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Shells"
-
-choice
- prompt "Choose your default shell"
- default FEATURE_SH_IS_NONE
- help
- Choose a shell. The ash shell is the most bash compatible
- and full featured one.
-
-config FEATURE_SH_IS_ASH
- select ASH
- bool "ash"
-
-config FEATURE_SH_IS_HUSH
- select HUSH
- bool "hush"
-
-####config FEATURE_SH_IS_LASH
-#### select LASH
-#### bool "lash"
-
-config FEATURE_SH_IS_MSH
- select MSH
- bool "msh"
-
-config FEATURE_SH_IS_NONE
- bool "none"
-
-endchoice
-
-config ASH
- bool "ash"
- default n
- select TEST
- help
- Tha 'ash' shell adds about 60k in the default configuration and is
- the most complete and most pedantically correct shell included with
- busybox. This shell is actually a derivative of the Debian 'dash'
- shell (by Herbert Xu), which was created by porting the 'ash' shell
- (written by Kenneth Almquist) from NetBSD.
-
-comment "Ash Shell Options"
- depends on ASH
-
-config ASH_JOB_CONTROL
- bool "Job control"
- default y
- depends on ASH
- help
- Enable job control in the ash shell.
-
-config ASH_READ_NCHARS
- bool "'read -n N' and 'read -s' support"
- default n
- depends on 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 ASH_READ_TIMEOUT
- bool "'read -t S' support."
- default n
- depends on 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 ASH_ALIAS
- bool "alias support"
- default y
- depends on ASH
- help
- Enable alias support in the ash shell.
-
-config ASH_MATH_SUPPORT
- bool "Posix math support"
- default y
- depends on ASH
- help
- Enable math support in the ash shell.
-
-config ASH_MATH_SUPPORT_64
- bool "Extend Posix math support to 64 bit"
- default n
- depends on ASH_MATH_SUPPORT
- help
- Enable 64-bit math support in the ash shell. This will make
- the shell slightly larger, but will allow computation with very
- large numbers.
-
-config ASH_GETOPTS
- bool "Builtin getopt to parse positional parameters"
- default n
- depends on ASH
- help
- Enable getopts builtin in the ash shell.
-
-config ASH_BUILTIN_ECHO
- bool "Builtin version of 'echo'"
- default y
- select ECHO
- depends on ASH
- help
- Enable support for echo, builtin to ash.
-
-config ASH_BUILTIN_TEST
- bool "Builtin version of 'test'"
- default y
- select TEST
- depends on ASH
- help
- Enable support for test, builtin to ash.
-
-config ASH_CMDCMD
- bool "'command' command to override shell builtins"
- default n
- depends on 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.
-
-config ASH_MAIL
- bool "Check for new mail on interactive shells"
- default y
- depends on ASH
- help
- Enable "check for new mail" in the ash shell.
-
-config ASH_OPTIMIZE_FOR_SIZE
- bool "Optimize for size instead of speed"
- default y
- depends on ASH
- help
- Compile ash for reduced size at the price of speed.
-
-config ASH_RANDOM_SUPPORT
- bool "Pseudorandom generator and variable $RANDOM"
- default n
- depends on ASH
- help
- Enable pseudorandom generator and dynamic variable "$RANDOM".
- Each read of "$RANDOM" will generate a new pseudorandom value.
- You can reset the generator by using a specified start value.
- After "unset RANDOM" then generator will switch off and this
- variable will no longer have special treatment.
-
-config ASH_EXPAND_PRMT
- bool "Expand prompt string"
- default n
- depends on 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 HUSH
- bool "hush"
- default n
- select TRUE
- select FALSE
- select TEST
- select ECHO
- 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
- options such as if/then/elif/else/fi, for/in/do/done, while loops,
- etc.
-
- It does not handle case/esac, select, function, here documents ( <<
- word ), arithmetic expansion, aliases, brace expansion, tilde
- expansion, &> and >& redirection of stdout+stderr, etc.
-
-config HUSH_HELP
- bool "help builtin"
- default n
- depends on HUSH
- help
- Enable help builtin in hush. Code size + ~1 kbyte.
-
-config HUSH_INTERACTIVE
- bool "Interactive mode"
- default y
- depends on HUSH
- help
- Enable interactive mode (prompt and command editing).
- Without this, hush simply reads and executes commands
- from stdin just like a shell script from the file.
- No prompt, no PS1/PS2 magic shell variables.
-
-config HUSH_JOB
- bool "Job control"
- default n
- depends on HUSH_INTERACTIVE
- help
- Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current
- command (not entire shell), fg/bg builtins work. Without this option,
- "cmd &" still works by simply spawning a process and immediately
- prompting for next command (or executing next command in a script),
- but no separate process group is formed.
-
-config HUSH_TICK
- bool "Process substitution"
- default n
- depends on HUSH
- help
- Enable process substitution `command` and $(command) in hush.
-
-config HUSH_IF
- bool "Support if/then/elif/else/fi"
- default n
- depends on HUSH
- help
- Enable if/then/elif/else/fi in hush.
-
-config HUSH_LOOPS
- bool "Support for, while and until loops"
- default n
- depends on HUSH
- help
- Enable for, while and until loops in hush.
-
-config LASH
- bool "lash"
- default n
- select HUSH
- help
- lash is deprecated and will be removed, please migrate to hush.
-
-
-config MSH
- bool "msh"
- default n
- select TRUE
- select FALSE
- select 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
- shell to do. It is not always pedantically correct about Bourne
- shell grammar (try running the shell testscript "tests/sh.testcases"
- on it and compare vs bash) but for most things it works quite well.
- It also uses only vfork, so it can be used on uClinux systems.
-
-comment "Bourne Shell Options"
- depends on MSH || LASH || HUSH || ASH
-
-config FEATURE_SH_EXTRA_QUIET
- bool "Hide message on interactive shell startup"
- default n
- depends on MSH || LASH || HUSH || ASH
- help
- Remove the busybox introduction when starting a shell.
-
-config FEATURE_SH_STANDALONE
- bool "Standalone shell"
- default n
- depends on (MSH || LASH || HUSH || ASH) && FEATURE_PREFER_APPLETS
- help
- This option causes busybox shells to use busybox applets
- in preference to executables in the PATH whenever possible. For
- example, entering the command 'ifconfig' into the shell would cause
- 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 statically linked version of busybox
- for use as a rescue shell, in the event that you screw up your system.
-
- This is implemented by re-execing /proc/self/exe (typically)
- with right parameters. Some selected applets ("NOFORK" applets)
- can even be executed without creating new process.
- Instead, busybox will call <applet>_main() internally.
-
- However, this causes problems in chroot jails without mounted /proc
- and with ps/top (command name can be shown as 'exe' for applets
- started this way).
-# untrue?
-# 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.
-# untrue?
-# 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 CTTYHACK
- bool "cttyhack"
- default n
- help
- One common problem reported on the mailing list is "can't access tty;
- job control turned off" error message which typically appears when
- one tries to use shell with stdin/stdout opened to /dev/console.
- This device is special - it cannot be a controlling tty.
-
- Proper solution is to use correct device instead of /dev/console.
-
- cttyhack provides "quick and dirty" solution to this problem.
- It analyzes stdin with various ioctls, trying to determine whether
- it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line).
- If it detects one, it closes stdin/out/err and reopens that device.
- Then it executes given program. Usage example for /etc/inittab
- (for busybox init):
-
- ::respawn:/bin/cttyhack /bin/sh
-
-endmenu
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_ASH) += ash.o ash_ptr_hack.o
-lib-$(CONFIG_HUSH) += hush.o
-lib-$(CONFIG_MSH) += msh.o
-lib-$(CONFIG_CTTYHACK) += cttyhack.o
+++ /dev/null
-Testing: in $empty""
-..
-Finished
+++ /dev/null
-if test $# = 0; then
- exec "$THIS_SH" quote3.tests abc "d e"
-fi
-
-echo 'Testing: in $empty""'
-empty=''
-for a in $empty""; do echo ".$a."; done
-echo Finished
+++ /dev/null
-true
-false; echo `echo $?`
-true
-{ false; echo `echo $?`; }
+++ /dev/null
-http://busybox.net
-http://busybox.net_abc
-1
-1
+++ /dev/null
-URL=http://busybox.net
-
-echo $URL
-echo ${URL}_abc
-
-true
-false; echo $?
-true
-{ false; echo $?; }
+++ /dev/null
-# TODO: hush doesn't know ':' null command
-
-while :; do exit; done
+++ /dev/null
-## TODO: fix and add to testsuite
-
-## # bash zbad2
-## ZVAR=z.map
-## *.map
-## # hush zbad2
-## ZVAR=z.map
-## z.map <====== !!!
-
-## hush does globbing for "VAR=val" too!
-## it should do it only for non-assignments.
-## even if word looks like assignment, it can be non-assignment:
-## ZVAR=*.map /bin/echo ZVAR=*.map
-## ^dont_glob ^glob
-
->ZVAR=z.map
-ZVAR=*.map /bin/echo ZVAR=*.map
-ZVAR=*.map
-echo "$ZVAR"
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * lash -- the BusyBox Lame-Ass SHell
- *
- * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
- *
- * Based in part on ladsh.c by Michael K. Johnson and Erik W. Troan, which is
- * under the following liberal license: "We have placed this source code in the
- * public domain. Use it in any project, free or commercial."
- *
- * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
- */
-
-/* This shell's parsing engine is officially at a dead-end. Future
- * work shell work should be done using hush, msh, or ash. This is
- * still a very useful, small shell -- it just don't need any more
- * features beyond what it already has...
- */
-
-//For debugging/development on the shell only...
-//#define DEBUG_SHELL
-
-#include <getopt.h>
-#include <glob.h>
-
-#include "libbb.h"
-
-#define expand_t glob_t
-
-/* Always enable for the moment... */
-#define CONFIG_LASH_PIPE_N_REDIRECTS
-#define CONFIG_LASH_JOB_CONTROL
-#define ENABLE_LASH_PIPE_N_REDIRECTS 1
-#define ENABLE_LASH_JOB_CONTROL 1
-
-
-enum { MAX_READ = 128 }; /* size of input buffer for 'read' builtin */
-#define JOB_STATUS_FORMAT "[%d] %-22s %.40s\n"
-
-
-#if ENABLE_LASH_PIPE_N_REDIRECTS
-enum redir_type { REDIRECT_INPUT, REDIRECT_OVERWRITE,
- REDIRECT_APPEND
-};
-#endif
-
-enum {
- DEFAULT_CONTEXT = 0x1,
- IF_TRUE_CONTEXT = 0x2,
- IF_FALSE_CONTEXT = 0x4,
- THEN_EXP_CONTEXT = 0x8,
- ELSE_EXP_CONTEXT = 0x10
-};
-
-#define LASH_OPT_DONE (1)
-#define LASH_OPT_SAW_QUOTE (2)
-
-#if ENABLE_LASH_PIPE_N_REDIRECTS
-struct redir_struct {
- enum redir_type type; /* type of redirection */
- int fd; /* file descriptor being redirected */
- char *filename; /* file to redirect fd to */
-};
-#endif
-
-struct child_prog {
- pid_t pid; /* 0 if exited */
- char **argv; /* program name and arguments */
- int num_redirects; /* elements in redirection array */
- int is_stopped; /* is the program currently running? */
- struct job *family; /* pointer back to the child's parent job */
-#if ENABLE_LASH_PIPE_N_REDIRECTS
- struct redir_struct *redirects; /* I/O redirects */
-#endif
-};
-
-struct jobset {
- struct job *head; /* head of list of running jobs */
- struct job *fg; /* current foreground job */
-};
-
-struct job {
- int jobid; /* job number */
- int num_progs; /* total number of programs in job */
- int running_progs; /* number of programs running */
- char *text; /* name of job */
- char *cmdbuf; /* buffer various argv's point into */
- pid_t pgrp; /* process group ID for the job */
- struct child_prog *progs; /* array of programs in job */
- struct job *next; /* to track background commands */
- int stopped_progs; /* number of programs alive, but stopped */
- unsigned int job_context; /* bitmask defining current context */
- struct jobset *job_list;
-};
-
-struct built_in_command {
- const char *cmd; /* name */
- const char *descr; /* description */
- int (*function) (struct child_prog *); /* function ptr */
-};
-
-/* function prototypes for builtins */
-static int builtin_cd(struct child_prog *cmd);
-static int builtin_exec(struct child_prog *cmd);
-static int builtin_exit(struct child_prog *cmd);
-static int builtin_fg_bg(struct child_prog *cmd);
-static int builtin_help(struct child_prog *cmd);
-static int builtin_jobs(struct child_prog *dummy);
-static int builtin_pwd(struct child_prog *dummy);
-static int builtin_export(struct child_prog *cmd);
-static int builtin_source(struct child_prog *cmd);
-static int builtin_unset(struct child_prog *cmd);
-static int builtin_read(struct child_prog *cmd);
-
-
-/* function prototypes for shell stuff */
-static void checkjobs(struct jobset *job_list);
-static void remove_job(struct jobset *j_list, struct job *job);
-static int get_command_bufsiz(FILE * source, char *command);
-static int parse_command(char **command_ptr, struct job *job, int *inbg);
-static int run_command(struct job *newjob, int inbg, int outpipe[2]);
-static int pseudo_exec(struct child_prog *cmd) ATTRIBUTE_NORETURN;
-static int busy_loop(FILE * input);
-
-
-/* Table of built-in functions (these are non-forking builtins, meaning they
- * can change global variables in the parent shell process but they will not
- * work with pipes and redirects; 'unset foo | whatever' will not work) */
-static const struct built_in_command bltins[] = {
- {"bg" , "Resume a job in the background", builtin_fg_bg},
- {"cd" , "Change working directory", builtin_cd},
- {"exec" , "Exec command, replacing this shell with the exec'd process", builtin_exec},
- {"exit" , "Exit from shell()", builtin_exit},
- {"fg" , "Bring job into the foreground", builtin_fg_bg},
- {"jobs" , "Lists the active jobs", builtin_jobs},
- {"export", "Set environment variable", builtin_export},
- {"unset" , "Unset environment variable", builtin_unset},
- {"read" , "Input environment variable", builtin_read},
- {"." , "Source-in and run commands in a file", builtin_source},
- /* These were "forked applets", but distinction was nuked */
- /* Original comment retained: */
- /* Table of forking built-in functions (things that fork cannot change global
- * variables in the parent process, such as the current working directory) */
- {"pwd" , "Print current directory", builtin_pwd},
- {"help" , "List shell built-in commands", builtin_help},
- /* to do: add ulimit */
-};
-
-
-#define VEC_LAST(v) v[ARRAY_SIZE(v)-1]
-
-
-static int shell_context; /* Type prompt trigger (PS1 or PS2) */
-
-
-/* Globals that are static to this file */
-static char *cwd;
-static char *local_pending_command;
-static struct jobset job_list = { NULL, NULL };
-static int global_argc;
-static char **global_argv;
-static llist_t *close_me_list;
-static int last_return_code;
-static int last_bg_pid;
-static unsigned int last_jobid;
-static int shell_terminal;
-static const char *PS1;
-static const char *PS2 = "> ";
-
-
-#ifdef DEBUG_SHELL
-static inline void debug_printf(const char *format, ...)
-{
- va_list args;
- va_start(args, format);
- vfprintf(stderr, format, args);
- va_end(args);
-}
-#else
-static inline void debug_printf(const char ATTRIBUTE_UNUSED *format, ...) { }
-#endif
-
-/*
- Most builtins need access to the struct child_prog that has
- their arguments, previously coded as cmd->progs[0]. That coding
- can exhibit a bug, if the builtin is not the first command in
- a pipeline: "echo foo | exec sort" will attempt to exec foo.
-
-builtin previous use notes
------- ----------------- ---------
-cd cmd->progs[0]
-exec cmd->progs[0] squashed bug: didn't look for applets or forking builtins
-exit cmd->progs[0]
-fg_bg cmd->progs[0], job_list->head, job_list->fg
-help 0
-jobs job_list->head
-pwd 0
-export cmd->progs[0]
-source cmd->progs[0]
-unset cmd->progs[0]
-read cmd->progs[0]
-
-I added "struct job *family;" to struct child_prog,
-and switched API to builtin_foo(struct child_prog *child);
-So cmd->text becomes child->family->text
- cmd->job_context becomes child->family->job_context
- cmd->progs[0] becomes *child
- job_list becomes child->family->job_list
- */
-
-
-static void update_cwd(void)
-{
- cwd = xrealloc_getcwd_or_warn(cwd);
- if (!cwd)
- cwd = xstrdup(bb_msg_unknown);
-}
-
-/* built-in 'cd <path>' handler */
-static int builtin_cd(struct child_prog *child)
-{
- char *newdir;
-
- if (child->argv[1] == NULL)
- newdir = getenv("HOME");
- else
- newdir = child->argv[1];
- if (chdir(newdir)) {
- bb_perror_msg("cd: %s", newdir);
- return EXIT_FAILURE;
- }
- update_cwd();
- return EXIT_SUCCESS;
-}
-
-/* built-in 'exec' handler */
-static int builtin_exec(struct child_prog *child)
-{
- if (child->argv[1] == NULL)
- return EXIT_SUCCESS; /* Really? */
- child->argv++;
- while (close_me_list)
- close((long)llist_pop(&close_me_list));
- pseudo_exec(child);
- /* never returns */
-}
-
-/* built-in 'exit' handler */
-static int builtin_exit(struct child_prog *child)
-{
- if (child->argv[1] == NULL)
- exit(EXIT_SUCCESS);
-
- exit(atoi(child->argv[1]));
-}
-
-/* built-in 'fg' and 'bg' handler */
-static int builtin_fg_bg(struct child_prog *child)
-{
- int i, jobnum;
- struct job *job;
-
- /* If they gave us no args, assume they want the last backgrounded task */
- if (!child->argv[1]) {
- for (job = child->family->job_list->head; job; job = job->next) {
- if (job->jobid == last_jobid) {
- goto found;
- }
- }
- bb_error_msg("%s: no current job", child->argv[0]);
- return EXIT_FAILURE;
- }
- if (sscanf(child->argv[1], "%%%d", &jobnum) != 1) {
- bb_error_msg(bb_msg_invalid_arg, child->argv[1], child->argv[0]);
- return EXIT_FAILURE;
- }
- for (job = child->family->job_list->head; job; job = job->next) {
- if (job->jobid == jobnum) {
- goto found;
- }
- }
- bb_error_msg("%s: %d: no such job", child->argv[0], jobnum);
- return EXIT_FAILURE;
- found:
- if (*child->argv[0] == 'f') {
- /* Put the job into the foreground. */
- tcsetpgrp(shell_terminal, job->pgrp);
-
- child->family->job_list->fg = job;
- }
-
- /* Restart the processes in the job */
- for (i = 0; i < job->num_progs; i++)
- job->progs[i].is_stopped = 0;
-
- job->stopped_progs = 0;
-
- i = kill(- job->pgrp, SIGCONT);
- if (i < 0) {
- if (errno == ESRCH) {
- remove_job(&job_list, job);
- } else {
- bb_perror_msg("kill (SIGCONT)");
- }
- }
-
- return EXIT_SUCCESS;
-}
-
-/* built-in 'help' handler */
-static int builtin_help(struct child_prog ATTRIBUTE_UNUSED *dummy)
-{
- const struct built_in_command *x;
-
- printf("\nBuilt-in commands:\n"
- "-------------------\n");
- for (x = bltins; x <= &VEC_LAST(bltins); x++) {
- if (x->descr == NULL)
- continue;
- printf("%s\t%s\n", x->cmd, x->descr);
- }
- bb_putchar('\n');
- return EXIT_SUCCESS;
-}
-
-/* built-in 'jobs' handler */
-static int builtin_jobs(struct child_prog *child)
-{
- struct job *job;
- const char *status_string;
-
- for (job = child->family->job_list->head; job; job = job->next) {
- if (job->running_progs == job->stopped_progs)
- status_string = "Stopped";
- else
- status_string = "Running";
-
- printf(JOB_STATUS_FORMAT, job->jobid, status_string, job->text);
- }
- return EXIT_SUCCESS;
-}
-
-
-/* built-in 'pwd' handler */
-static int builtin_pwd(struct child_prog ATTRIBUTE_UNUSED *dummy)
-{
- update_cwd();
- puts(cwd);
- return EXIT_SUCCESS;
-}
-
-/* built-in 'export VAR=value' handler */
-static int builtin_export(struct child_prog *child)
-{
- int res;
- char *v = child->argv[1];
-
- if (v == NULL) {
- char **e;
- for (e = environ; *e; e++) {
- puts(*e);
- }
- return 0;
- }
- res = putenv(v);
- if (res)
- bb_perror_msg("export");
-#if ENABLE_FEATURE_EDITING_FANCY_PROMPT
- if (strncmp(v, "PS1=", 4) == 0)
- PS1 = getenv("PS1");
-#endif
-
-#if ENABLE_LOCALE_SUPPORT
- // TODO: why getenv? "" would be just as good...
- if (strncmp(v, "LC_ALL=", 7) == 0)
- setlocale(LC_ALL, getenv("LC_ALL"));
- if (strncmp(v, "LC_CTYPE=", 9) == 0)
- setlocale(LC_CTYPE, getenv("LC_CTYPE"));
-#endif
-
- return res;
-}
-
-/* built-in 'read VAR' handler */
-static int builtin_read(struct child_prog *child)
-{
- int res = 0, len;
- char *s;
- char string[MAX_READ];
-
- if (child->argv[1]) {
- /* argument (VAR) given: put "VAR=" into buffer */
- safe_strncpy(string, child->argv[1], MAX_READ-1);
- len = strlen(string);
- string[len++] = '=';
- string[len] = '\0';
- fgets(&string[len], sizeof(string) - len, stdin); /* read string */
- res = strlen(string);
- if (res > len)
- string[--res] = '\0'; /* chomp trailing newline */
- /*
- ** string should now contain "VAR=<value>"
- ** copy it (putenv() won't do that, so we must make sure
- ** the string resides in a static buffer!)
- */
- res = -1;
- s = strdup(string);
- if (s)
- res = putenv(s);
- if (res)
- bb_perror_msg("read");
- } else
- fgets(string, sizeof(string), stdin);
-
- return res;
-}
-
-/* Built-in '.' handler (read-in and execute commands from file) */
-static int builtin_source(struct child_prog *child)
-{
- FILE *input;
- int status;
-
- input = fopen_or_warn(child->argv[1], "r");
- if (!input) {
- return EXIT_FAILURE;
- }
-
- llist_add_to(&close_me_list, (void *)(long)fileno(input));
- /* Now run the file */
- status = busy_loop(input);
- fclose(input);
- llist_pop(&close_me_list);
- return status;
-}
-
-/* built-in 'unset VAR' handler */
-static int builtin_unset(struct child_prog *child)
-{
- if (child->argv[1] == NULL) {
- printf(bb_msg_requires_arg, "unset");
- return EXIT_FAILURE;
- }
- unsetenv(child->argv[1]);
- return EXIT_SUCCESS;
-}
-
-#if ENABLE_LASH_JOB_CONTROL
-/* free up all memory from a job */
-static void free_job(struct job *cmd)
-{
- int i;
- struct jobset *keep;
-
- for (i = 0; i < cmd->num_progs; i++) {
- free(cmd->progs[i].argv);
-#if ENABLE_LASH_PIPE_N_REDIRECTS
- free(cmd->progs[i].redirects);
-#endif
- }
- free(cmd->progs);
- free(cmd->text);
- free(cmd->cmdbuf);
- keep = cmd->job_list;
- memset(cmd, 0, sizeof(struct job));
- cmd->job_list = keep;
-}
-
-/* remove a job from a jobset */
-static void remove_job(struct jobset *j_list, struct job *job)
-{
- struct job *prevjob;
-
- free_job(job);
- if (job == j_list->head) {
- j_list->head = job->next;
- } else {
- prevjob = j_list->head;
- while (prevjob->next != job)
- prevjob = prevjob->next;
- prevjob->next = job->next;
- }
-
- if (j_list->head)
- last_jobid = j_list->head->jobid;
- else
- last_jobid = 0;
-
- free(job);
-}
-
-/* Checks to see if any background processes have exited -- if they
- have, figure out why and see if a job has completed */
-static void checkjobs(struct jobset *j_list)
-{
- struct job *job;
- pid_t childpid;
- int status;
- int prognum = 0;
-
- while ((childpid = waitpid(-1, &status, WNOHANG | WUNTRACED)) > 0) {
- for (job = j_list->head; job; job = job->next) {
- prognum = 0;
- while (prognum < job->num_progs &&
- job->progs[prognum].pid != childpid) prognum++;
- if (prognum < job->num_progs)
- break;
- }
-
- /* This happens on backticked commands */
- if (job == NULL)
- return;
-
- if (WIFEXITED(status) || WIFSIGNALED(status)) {
- /* child exited */
- job->running_progs--;
- job->progs[prognum].pid = 0;
-
- if (!job->running_progs) {
- printf(JOB_STATUS_FORMAT, job->jobid, "Done", job->text);
- last_jobid = 0;
- remove_job(j_list, job);
- }
- } else {
- /* child stopped */
- job->stopped_progs++;
- job->progs[prognum].is_stopped = 1;
- }
- }
-
- if (childpid == -1 && errno != ECHILD)
- bb_perror_msg("waitpid");
-}
-#else
-static void checkjobs(struct jobset *j_list)
-{
-}
-static void free_job(struct job *cmd)
-{
-}
-static void remove_job(struct jobset *j_list, struct job *job)
-{
-}
-#endif
-
-#if ENABLE_LASH_PIPE_N_REDIRECTS
-/* squirrel != NULL means we squirrel away copies of stdin, stdout,
- * and stderr if they are redirected. */
-static int setup_redirects(struct child_prog *prog, int squirrel[])
-{
- int i;
- int openfd;
- int mode = O_RDONLY;
- struct redir_struct *redir = prog->redirects;
-
- for (i = 0; i < prog->num_redirects; i++, redir++) {
- switch (redir->type) {
- case REDIRECT_INPUT:
- mode = O_RDONLY;
- break;
- case REDIRECT_OVERWRITE:
- mode = O_WRONLY | O_CREAT | O_TRUNC;
- break;
- case REDIRECT_APPEND:
- mode = O_WRONLY | O_CREAT | O_APPEND;
- break;
- }
-
- openfd = open_or_warn(redir->filename, mode);
- if (openfd < 0) {
- /* this could get lost if stderr has been redirected, but
- bash and ash both lose it as well (though zsh doesn't!) */
- return 1;
- }
-
- if (openfd != redir->fd) {
- if (squirrel && redir->fd < 3) {
- squirrel[redir->fd] = dup(redir->fd);
- close_on_exec_on(squirrel[redir->fd]);
- }
- dup2(openfd, redir->fd);
- close(openfd);
- }
- }
-
- return 0;
-}
-
-static void restore_redirects(int squirrel[])
-{
- int i, fd;
- for (i = 0; i < 3; i++) {
- fd = squirrel[i];
- if (fd != -1) {
- /* No error checking. I sure wouldn't know what
- * to do with an error if I found one! */
- dup2(fd, i);
- close(fd);
- }
- }
-}
-#else
-static inline int setup_redirects(struct child_prog *prog, int squirrel[])
-{
- return 0;
-}
-static inline void restore_redirects(int squirrel[])
-{
-}
-#endif
-
-static inline void cmdedit_set_initial_prompt(void)
-{
-#if !ENABLE_FEATURE_EDITING_FANCY_PROMPT
- PS1 = NULL;
-#else
- PS1 = getenv("PS1");
- if (PS1 == 0)
- PS1 = "\\w \\$ ";
-#endif
-}
-
-static inline const char* setup_prompt_string(void)
-{
-#if !ENABLE_FEATURE_EDITING_FANCY_PROMPT
- /* Set up the prompt */
- if (shell_context == 0) {
- char *ns;
- free((char*)PS1);
- ns = xmalloc(strlen(cwd)+4);
- sprintf(ns, "%s %c ", cwd, (geteuid() != 0) ? '$': '#');
- PS1 = ns;
- return ns;
- } else {
- return PS2;
- }
-#else
- return (shell_context == 0)? PS1 : PS2;
-#endif
-}
-
-#if ENABLE_FEATURE_EDITING
-static line_input_t *line_input_state;
-#endif
-
-static int get_command_bufsiz(FILE * source, char *command)
-{
- const char *prompt_str;
-
- if (source == NULL) {
- if (local_pending_command) {
- /* a command specified (-c option): return it & mark it done */
- strncpy(command, local_pending_command, BUFSIZ);
- local_pending_command = NULL;
- return 0;
- }
- return 1;
- }
-
- if (source == stdin) {
- prompt_str = setup_prompt_string();
-
-#if ENABLE_FEATURE_EDITING
- /*
- ** enable command line editing only while a command line
- ** is actually being read; otherwise, we'll end up bequeathing
- ** atexit() handlers and other unwanted stuff to our
- ** child processes (rob@sysgo.de)
- */
- read_line_input(prompt_str, command, BUFSIZ, line_input_state);
- return 0;
-#else
- fputs(prompt_str, stdout);
-#endif
- }
-
- if (!fgets(command, BUFSIZ - 2, source)) {
- if (source == stdin)
- bb_putchar('\n');
- return 1;
- }
-
- return 0;
-}
-
-static char * strsep_space(char *string, int * ix)
-{
- /* Short circuit the trivial case */
- if (!string || ! string[*ix])
- return NULL;
-
- /* Find the end of the token. */
- while (string[*ix] && !isspace(string[*ix]) ) {
- (*ix)++;
- }
-
- /* Find the end of any whitespace trailing behind
- * the token and let that be part of the token */
- while (string[*ix] && (isspace)(string[*ix]) ) {
- (*ix)++;
- }
-
- if (!*ix) {
- /* Nothing useful was found */
- return NULL;
- }
-
- return xstrndup(string, *ix);
-}
-
-static int expand_arguments(char *command)
-{
- static const char out_of_space[] ALIGN1 = "out of space during expansion";
-
- int total_length = 0, length, i, retval, ix = 0;
- expand_t expand_result;
- char *tmpcmd, *cmd, *cmd_copy;
- char *src, *dst, *var;
- int flags = GLOB_NOCHECK
-#ifdef GLOB_BRACE
- | GLOB_BRACE
-#endif
-#ifdef GLOB_TILDE
- | GLOB_TILDE
-#endif
- ;
-
- /* get rid of the terminating \n */
- chomp(command);
-
- /* Fix up escape sequences to be the Real Thing(tm) */
- while (command && command[ix]) {
- if (command[ix] == '\\') {
- const char *tmp = command+ix+1;
- command[ix] = bb_process_escape_sequence( &tmp );
- memmove(command+ix + 1, tmp, strlen(tmp)+1);
- }
- ix++;
- }
- /* Use glob and then fixup environment variables and such */
-
- /* It turns out that glob is very stupid. We have to feed it one word at a
- * time since it can't cope with a full string. Here we convert command
- * (char*) into cmd (char**, one word per string) */
-
- /* We need a clean copy, so strsep can mess up the copy while
- * we write stuff into the original (in a minute) */
- cmd = cmd_copy = xstrdup(command);
- *command = '\0';
- for (ix = 0, tmpcmd = cmd;
- (tmpcmd = strsep_space(cmd, &ix)) != NULL; cmd += ix, ix = 0) {
- if (*tmpcmd == '\0')
- break;
- /* we need to trim() the result for glob! */
- trim(tmpcmd);
- retval = glob(tmpcmd, flags, NULL, &expand_result);
- free(tmpcmd); /* Free mem allocated by strsep_space */
- if (retval == GLOB_NOSPACE) {
- /* Mem may have been allocated... */
- globfree(&expand_result);
- bb_error_msg(out_of_space);
- return FALSE;
- } else if (retval != 0) {
- /* Some other error. GLOB_NOMATCH shouldn't
- * happen because of the GLOB_NOCHECK flag in
- * the glob call. */
- bb_error_msg("syntax error");
- return FALSE;
- } else {
- /* Convert from char** (one word per string) to a simple char*,
- * but don't overflow command which is BUFSIZ in length */
- for (i = 0; i < expand_result.gl_pathc; i++) {
- length = strlen(expand_result.gl_pathv[i]);
- if (total_length+length+1 >= BUFSIZ) {
- bb_error_msg(out_of_space);
- return FALSE;
- }
- strcat(command+total_length, " ");
- total_length += 1;
- strcat(command+total_length, expand_result.gl_pathv[i]);
- total_length += length;
- }
- globfree(&expand_result);
- }
- }
- free(cmd_copy);
- trim(command);
-
- /* Now do the shell variable substitutions which
- * wordexp can't do for us, namely $? and $! */
- src = command;
- while ((dst = strchr(src,'$')) != NULL) {
- var = NULL;
- switch (*(dst+1)) {
- case '?':
- var = itoa(last_return_code);
- break;
- case '!':
- if (last_bg_pid == -1)
- *var = '\0';
- else
- var = itoa(last_bg_pid);
- break;
- /* Everything else like $$, $#, $[0-9], etc. should all be
- * expanded by wordexp(), so we can in theory skip that stuff
- * here, but just to be on the safe side (i.e., since uClibc
- * wordexp doesn't do this stuff yet), lets leave it in for
- * now. */
- case '$':
- var = itoa(getpid());
- break;
- case '#':
- var = itoa(global_argc - 1);
- break;
- case '0':case '1':case '2':case '3':case '4':
- case '5':case '6':case '7':case '8':case '9':
- {
- int ixx = *(dst+1)-48+1;
- if (ixx >= global_argc) {
- var = '\0';
- } else {
- var = global_argv[ixx];
- }
- }
- break;
-
- }
- if (var) {
- /* a single character construction was found, and
- * already handled in the case statement */
- src = dst + 2;
- } else {
- /* Looks like an environment variable */
- char delim_hold;
- int num_skip_chars = 0;
- int dstlen = strlen(dst);
- /* Is this a ${foo} type variable? */
- if (dstlen >= 2 && *(dst+1) == '{') {
- src = strchr(dst+1, '}');
- num_skip_chars = 1;
- } else {
- src = dst + 1;
- while ((isalnum)(*src) || *src == '_') src++;
- }
- if (src == NULL) {
- src = dst+dstlen;
- }
- delim_hold = *src;
- *src = '\0'; /* temporary */
- var = getenv(dst + 1 + num_skip_chars);
- *src = delim_hold;
- src += num_skip_chars;
- }
- if (var == NULL) {
- /* Seems we got an un-expandable variable. So delete it. */
- var = (char*)"";
- }
- {
- int subst_len = strlen(var);
- int trail_len = strlen(src);
- if (dst+subst_len+trail_len >= command+BUFSIZ) {
- bb_error_msg(out_of_space);
- return FALSE;
- }
- /* Move stuff to the end of the string to accommodate
- * filling the created gap with the new stuff */
- memmove(dst+subst_len, src, trail_len+1);
- /* Now copy in the new stuff */
- memcpy(dst, var, subst_len);
- src = dst+subst_len;
- }
- }
-
- return TRUE;
-}
-
-/* Return cmd->num_progs as 0 if no command is present (e.g. an empty
- line). If a valid command is found, command_ptr is set to point to
- the beginning of the next command (if the original command had more
- then one job associated with it) or NULL if no more commands are
- present. */
-static int parse_command(char **command_ptr, struct job *job, int *inbg)
-{
- char *command;
- char *return_command = NULL;
- char *src, *buf;
- int argc_l;
- int flag;
- int argv_alloced;
- char quote = '\0';
- struct child_prog *prog;
-#if ENABLE_LASH_PIPE_N_REDIRECTS
- int i;
- char *chptr;
-#endif
-
- /* skip leading white space */
- *command_ptr = skip_whitespace(*command_ptr);
-
- /* this handles empty lines or leading '#' characters */
- if (!**command_ptr || (**command_ptr == '#')) {
- job->num_progs = 0;
- return 0;
- }
-
- *inbg = 0;
- job->num_progs = 1;
- job->progs = xmalloc(sizeof(*job->progs));
-
- /* We set the argv elements to point inside of this string. The
- memory is freed by free_job(). Allocate twice the original
- length in case we need to quote every single character.
-
- Getting clean memory relieves us of the task of NULL
- terminating things and makes the rest of this look a bit
- cleaner (though it is, admittedly, a tad less efficient) */
- job->cmdbuf = command = xzalloc(2*strlen(*command_ptr) + 1);
- job->text = NULL;
-
- prog = job->progs;
- prog->num_redirects = 0;
- prog->is_stopped = 0;
- prog->family = job;
-#if ENABLE_LASH_PIPE_N_REDIRECTS
- prog->redirects = NULL;
-#endif
-
- argv_alloced = 5;
- prog->argv = xmalloc(sizeof(*prog->argv) * argv_alloced);
- prog->argv[0] = job->cmdbuf;
-
- flag = argc_l = 0;
- buf = command;
- src = *command_ptr;
- while (*src && !(flag & LASH_OPT_DONE)) {
- if (quote == *src) {
- quote = '\0';
- } else if (quote) {
- if (*src == '\\') {
- src++;
- if (!*src) {
- bb_error_msg("character expected after \\");
- free_job(job);
- return 1;
- }
-
- /* in shell, "\'" should yield \' */
- if (*src != quote) {
- *buf++ = '\\';
- *buf++ = '\\';
- }
- } else if (*src == '*' || *src == '?' || *src == '[' ||
- *src == ']') *buf++ = '\\';
- *buf++ = *src;
- } else if (isspace(*src)) {
- if (*prog->argv[argc_l] || (flag & LASH_OPT_SAW_QUOTE)) {
- buf++, argc_l++;
- /* +1 here leaves room for the NULL which ends argv */
- if ((argc_l + 1) == argv_alloced) {
- argv_alloced += 5;
- prog->argv = xrealloc(prog->argv,
- sizeof(*prog->argv) * argv_alloced);
- }
- prog->argv[argc_l] = buf;
- flag ^= LASH_OPT_SAW_QUOTE;
- }
- } else
- switch (*src) {
- case '"':
- case '\'':
- quote = *src;
- flag |= LASH_OPT_SAW_QUOTE;
- break;
-
- case '#': /* comment */
- if (*(src-1)== '$')
- *buf++ = *src;
- else
- flag |= LASH_OPT_DONE;
- break;
-
-#if ENABLE_LASH_PIPE_N_REDIRECTS
- case '>': /* redirects */
- case '<':
- i = prog->num_redirects++;
- prog->redirects = xrealloc(prog->redirects,
- sizeof(*prog->redirects) * (i + 1));
-
- prog->redirects[i].fd = -1;
- if (buf != prog->argv[argc_l]) {
- /* the stuff before this character may be the file number
- being redirected */
- prog->redirects[i].fd =
- strtol(prog->argv[argc_l], &chptr, 10);
-
- if (*chptr && *prog->argv[argc_l]) {
- buf++, argc_l++;
- prog->argv[argc_l] = buf;
- }
- }
-
- if (prog->redirects[i].fd == -1) {
- if (*src == '>')
- prog->redirects[i].fd = 1;
- else
- prog->redirects[i].fd = 0;
- }
-
- if (*src++ == '>') {
- if (*src == '>')
- prog->redirects[i].type =
- REDIRECT_APPEND, src++;
- else
- prog->redirects[i].type = REDIRECT_OVERWRITE;
- } else {
- prog->redirects[i].type = REDIRECT_INPUT;
- }
-
- /* This isn't POSIX sh compliant. Oh well. */
- chptr = src;
- chptr = skip_whitespace(chptr);
-
- if (!*chptr) {
- bb_error_msg("file name expected after %c", *(src-1));
- free_job(job);
- job->num_progs = 0;
- return 1;
- }
-
- prog->redirects[i].filename = buf;
- while (*chptr && !isspace(*chptr))
- *buf++ = *chptr++;
-
- src = chptr - 1; /* we src++ later */
- prog->argv[argc_l] = ++buf;
- break;
-
- case '|': /* pipe */
- /* finish this command */
- if (*prog->argv[argc_l] || flag & LASH_OPT_SAW_QUOTE)
- argc_l++;
- if (!argc_l) {
- goto empty_command_in_pipe;
- }
- prog->argv[argc_l] = NULL;
-
- /* and start the next */
- job->num_progs++;
- job->progs = xrealloc(job->progs,
- sizeof(*job->progs) * job->num_progs);
- prog = job->progs + (job->num_progs - 1);
- prog->num_redirects = 0;
- prog->redirects = NULL;
- prog->is_stopped = 0;
- prog->family = job;
- argc_l = 0;
-
- argv_alloced = 5;
- prog->argv = xmalloc(sizeof(*prog->argv) * argv_alloced);
- prog->argv[0] = ++buf;
-
- src++;
- src = skip_whitespace(src);
-
- if (!*src) {
-empty_command_in_pipe:
- bb_error_msg("empty command in pipe");
- free_job(job);
- job->num_progs = 0;
- return 1;
- }
- src--; /* we'll ++ it at the end of the loop */
-
- break;
-#endif
-
-#if ENABLE_LASH_JOB_CONTROL
- case '&': /* background */
- *inbg = 1;
- /* fallthrough */
-#endif
- case ';': /* multiple commands */
- flag |= LASH_OPT_DONE;
- return_command = *command_ptr + (src - *command_ptr) + 1;
- break;
-
- case '\\':
- src++;
- if (!*src) {
- bb_error_msg("character expected after \\");
- free_job(job);
- return 1;
- }
- if (*src == '*' || *src == '[' || *src == ']'
- || *src == '?') *buf++ = '\\';
- /* fallthrough */
- default:
- *buf++ = *src;
- }
-
- src++;
- }
-
- if (*prog->argv[argc_l] || flag & LASH_OPT_SAW_QUOTE) {
- argc_l++;
- }
- if (!argc_l) {
- free_job(job);
- return 0;
- }
- prog->argv[argc_l] = NULL;
-
- if (!return_command) {
- job->text = xstrdup(*command_ptr);
- } else {
- /* This leaves any trailing spaces, which is a bit sloppy */
- job->text = xstrndup(*command_ptr, return_command - *command_ptr);
- }
-
- *command_ptr = return_command;
-
- return 0;
-}
-
-/* Run the child_prog, no matter what kind of command it uses.
- */
-static int pseudo_exec(struct child_prog *child)
-{
- const struct built_in_command *x;
-
- /* Check if the command matches any of the non-forking builtins.
- * Depending on context, this might be redundant. But it's
- * easier to waste a few CPU cycles than it is to figure out
- * if this is one of those cases.
- */
- /* Check if the command matches any of the forking builtins. */
- for (x = bltins; x <= &VEC_LAST(bltins); x++) {
- if (strcmp(child->argv[0], x->cmd) == 0) {
- _exit(x->function(child));
- }
- }
-
- /* Check if the command matches any busybox internal
- * commands ("applets") here. Following discussions from
- * November 2000 on busybox@busybox.net, don't use
- * bb_get_last_path_component_nostrip(). This way explicit
- * (with slashes) filenames will never be interpreted as an
- * applet, just like with builtins. This way the user can
- * override an applet with an explicit filename reference.
- * The only downside to this change is that an explicit
- * /bin/foo invocation will fork and exec /bin/foo, even if
- * /bin/foo is a symlink to busybox.
- */
- if (ENABLE_FEATURE_SH_STANDALONE) {
- run_applet_and_exit(child->argv[0], child->argv);
- }
-
- execvp(child->argv[0], child->argv);
-
- /* Do not use bb_perror_msg_and_die() here, since we must not
- * call exit() but should call _exit() instead */
- bb_simple_perror_msg(child->argv[0]);
- _exit(EXIT_FAILURE);
-}
-
-static void insert_job(struct job *newjob, int inbg)
-{
- struct job *thejob;
- struct jobset *j_list = newjob->job_list;
-
- /* find the ID for thejob to use */
- newjob->jobid = 1;
- for (thejob = j_list->head; thejob; thejob = thejob->next)
- if (thejob->jobid >= newjob->jobid)
- newjob->jobid = thejob->jobid + 1;
-
- /* add thejob to the list of running jobs */
- if (!j_list->head) {
- thejob = j_list->head = xmalloc(sizeof(*thejob));
- } else {
- for (thejob = j_list->head; thejob->next; thejob = thejob->next) /* nothing */;
- thejob->next = xmalloc(sizeof(*thejob));
- thejob = thejob->next;
- }
-
- *thejob = *newjob; /* physically copy the struct job */
- thejob->next = NULL;
- thejob->running_progs = thejob->num_progs;
- thejob->stopped_progs = 0;
-
-#if ENABLE_LASH_JOB_CONTROL
- if (inbg) {
- /* we don't wait for background thejobs to return -- append it
- to the list of backgrounded thejobs and leave it alone */
- printf("[%d] %d\n", thejob->jobid,
- newjob->progs[newjob->num_progs - 1].pid);
- last_jobid = newjob->jobid;
- last_bg_pid = newjob->progs[newjob->num_progs - 1].pid;
- } else {
- newjob->job_list->fg = thejob;
-
- /* move the new process group into the foreground */
- /* Ignore errors since child could have already exited */
- tcsetpgrp(shell_terminal, newjob->pgrp);
- }
-#endif
-}
-
-static int run_command(struct job *newjob, int inbg, int outpipe[2])
-{
- /* struct job *thejob; */
- int i;
- int nextin, nextout;
- int pipefds[2]; /* pipefd[0] is for reading */
- const struct built_in_command *x;
- struct child_prog *child;
-
- nextin = 0;
- for (i = 0; i < newjob->num_progs; i++) {
- child = &(newjob->progs[i]);
-
- nextout = 1;
- if ((i + 1) < newjob->num_progs) {
- xpipe(pipefds);
- nextout = pipefds[1];
- } else if (outpipe[1] != -1) {
- nextout = outpipe[1];
- }
-
- /* Check if the command matches any non-forking builtins,
- * but only if this is a simple command.
- * Non-forking builtins within pipes have to fork anyway,
- * and are handled in pseudo_exec. "echo foo | read bar"
- * is doomed to failure, and doesn't work on bash, either.
- */
- if (newjob->num_progs == 1) {
- int rcode;
- int squirrel[] = {-1, -1, -1};
-
- /* Check if the command sets an environment variable. */
- if (strchr(child->argv[0], '=') != NULL) {
- child->argv[1] = child->argv[0];
- return builtin_export(child);
- }
-
- for (x = bltins; x <= &VEC_LAST(bltins); x++) {
- if (strcmp(child->argv[0], x->cmd) == 0) {
- setup_redirects(child, squirrel);
- rcode = x->function(child);
- restore_redirects(squirrel);
- return rcode;
- }
- }
-#if ENABLE_FEATURE_SH_STANDALONE
- {
- int a = find_applet_by_name(child->argv[i]);
- if (a >= 0 && APPLET_IS_NOFORK(a)) {
- setup_redirects(child, squirrel);
- rcode = run_nofork_applet(a, child->argv + i);
- restore_redirects(squirrel);
- return rcode;
- }
- }
-#endif
- }
-
-#if BB_MMU
- child->pid = fork();
-#else
- child->pid = vfork();
-#endif
- if (!child->pid) {
- /* Set the handling for job control signals back to the default. */
- signal(SIGINT, SIG_DFL);
- signal(SIGQUIT, SIG_DFL);
- signal(SIGTSTP, SIG_DFL);
- signal(SIGTTIN, SIG_DFL);
- signal(SIGTTOU, SIG_DFL);
- signal(SIGCHLD, SIG_DFL);
-
- /* Close all open filehandles. */
- while (close_me_list)
- close((long)llist_pop(&close_me_list));
-
- if (outpipe[1] != -1) {
- close(outpipe[0]);
- }
- if (nextin != 0) {
- dup2(nextin, 0);
- close(nextin);
- }
-
- if (nextout != 1) {
- dup2(nextout, 1);
- dup2(nextout, 2); /* Really? */
- close(nextout);
- close(pipefds[0]);
- }
-
- /* explicit redirects override pipes */
- setup_redirects(child,NULL);
-
- pseudo_exec(child);
- }
- if (outpipe[1] != -1) {
- close(outpipe[1]);
- }
-
- /* put our child in the process group whose leader is the
- first process in this pipe */
- setpgid(child->pid, newjob->progs[0].pid);
- if (nextin != 0)
- close(nextin);
- if (nextout != 1)
- close(nextout);
-
- /* If there isn't another process, nextin is garbage
- but it doesn't matter */
- nextin = pipefds[0];
- }
-
- newjob->pgrp = newjob->progs[0].pid;
-
- insert_job(newjob, inbg);
-
- return 0;
-}
-
-static int busy_loop(FILE * input)
-{
- char *command;
- char *next_command = NULL;
- struct job newjob;
- int i;
- int inbg = 0;
- int status;
-#if ENABLE_LASH_JOB_CONTROL
- pid_t parent_pgrp;
- /* save current owner of TTY so we can restore it on exit */
- parent_pgrp = tcgetpgrp(shell_terminal);
-#endif
- newjob.job_list = &job_list;
- newjob.job_context = DEFAULT_CONTEXT;
-
- command = xzalloc(BUFSIZ);
-
- while (1) {
- if (!job_list.fg) {
- /* no job is in the foreground */
-
- /* see if any background processes have exited */
- checkjobs(&job_list);
-
- if (!next_command) {
- if (get_command_bufsiz(input, command))
- break;
- next_command = command;
- }
-
- if (!expand_arguments(next_command)) {
- free(command);
- command = xzalloc(BUFSIZ);
- next_command = NULL;
- continue;
- }
-
- if (!parse_command(&next_command, &newjob, &inbg) &&
- newjob.num_progs) {
- int pipefds[2] = { -1, -1 };
- debug_printf("job=%p fed to run_command by busy_loop()'\n",
- &newjob);
- run_command(&newjob, inbg, pipefds);
- }
- else {
- free(command);
- command = xzalloc(BUFSIZ);
- next_command = NULL;
- }
- } else {
- /* a job is running in the foreground; wait for it */
- i = 0;
- while (!job_list.fg->progs[i].pid ||
- job_list.fg->progs[i].is_stopped == 1) i++;
-
- if (waitpid(job_list.fg->progs[i].pid, &status, WUNTRACED) < 0) {
- if (errno != ECHILD) {
- bb_perror_msg_and_die("waitpid(%d)", job_list.fg->progs[i].pid);
- }
- }
-
- if (WIFEXITED(status) || WIFSIGNALED(status)) {
- /* the child exited */
- job_list.fg->running_progs--;
- job_list.fg->progs[i].pid = 0;
-
- last_return_code = WEXITSTATUS(status);
-
- if (!job_list.fg->running_progs) {
- /* child exited */
- remove_job(&job_list, job_list.fg);
- job_list.fg = NULL;
- }
- }
-#if ENABLE_LASH_JOB_CONTROL
- else {
- /* the child was stopped */
- job_list.fg->stopped_progs++;
- job_list.fg->progs[i].is_stopped = 1;
-
- if (job_list.fg->stopped_progs == job_list.fg->running_progs) {
- printf("\n" JOB_STATUS_FORMAT, job_list.fg->jobid,
- "Stopped", job_list.fg->text);
- job_list.fg = NULL;
- }
- }
-
- if (!job_list.fg) {
- /* move the shell to the foreground */
- /* suppress messages when run from /linuxrc mag@sysgo.de */
- if (tcsetpgrp(shell_terminal, getpgrp()) && errno != ENOTTY)
- bb_perror_msg("tcsetpgrp");
- }
-#endif
- }
- }
- free(command);
-
-#if ENABLE_LASH_JOB_CONTROL
- /* return controlling TTY back to parent process group before exiting */
- if (tcsetpgrp(shell_terminal, parent_pgrp) && errno != ENOTTY)
- bb_perror_msg("tcsetpgrp");
-#endif
-
- /* return exit status if called with "-c" */
- if (input == NULL && WIFEXITED(status))
- return WEXITSTATUS(status);
-
- return 0;
-}
-
-#if ENABLE_FEATURE_CLEAN_UP
-static void free_memory(void)
-{
- free(cwd);
-
- if (job_list.fg && !job_list.fg->running_progs) {
- remove_job(&job_list, job_list.fg);
- }
-}
-#else
-void free_memory(void);
-#endif
-
-#if ENABLE_LASH_JOB_CONTROL
-/* Make sure we have a controlling tty. If we get started under a job
- * aware app (like bash for example), make sure we are now in charge so
- * we don't fight over who gets the foreground */
-static void setup_job_control(void)
-{
- int status;
- pid_t shell_pgrp;
-
- /* Loop until we are in the foreground. */
- while ((status = tcgetpgrp(shell_terminal)) >= 0) {
- shell_pgrp = getpgrp();
- if (status == shell_pgrp) {
- break;
- }
- kill(- shell_pgrp, SIGTTIN);
- }
-
- /* Ignore interactive and job-control signals. */
- signal(SIGINT, SIG_IGN);
- signal(SIGQUIT, SIG_IGN);
- signal(SIGTSTP, SIG_IGN);
- signal(SIGTTIN, SIG_IGN);
- signal(SIGTTOU, SIG_IGN);
- signal(SIGCHLD, SIG_IGN);
-
- /* Put ourselves in our own process group. */
- setsid();
- shell_pgrp = getpid();
- setpgid(shell_pgrp, shell_pgrp);
-
- /* Grab control of the terminal. */
- tcsetpgrp(shell_terminal, shell_pgrp);
-}
-#else
-static inline void setup_job_control(void)
-{
-}
-#endif
-
-int lash_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int lash_main(int argc, char **argv)
-{
- unsigned opt;
- FILE *input = stdin;
-
- global_argc = argc;
- global_argv = argv;
-
-#if ENABLE_FEATURE_EDITING
- line_input_state = new_line_input_t(FOR_SHELL);
-#endif
-
- /* These variables need re-initializing when recursing */
- last_jobid = 0;
- close_me_list = NULL;
- job_list.head = NULL;
- job_list.fg = NULL;
- last_return_code = 1;
-
- if (global_argv[0] && global_argv[0][0] == '-') {
- FILE *prof_input;
- prof_input = fopen("/etc/profile", "r");
- if (prof_input) {
- llist_add_to(&close_me_list, (void *)(long)fileno(prof_input));
- /* Now run the file */
- busy_loop(prof_input);
- fclose_if_not_stdin(prof_input);
- llist_pop(&close_me_list);
- }
- }
-
- opt = getopt32(argv, "+ic:", &local_pending_command);
-#define LASH_OPT_i (1<<0)
-#define LASH_OPT_c (1<<1)
- if (opt & LASH_OPT_c) {
- input = NULL;
- optind++;
- global_argv += optind;
- }
- /* A shell is interactive if the `-i' flag was given, or if all of
- * the following conditions are met:
- * no -c command
- * no arguments remaining or the -s flag given
- * standard input is a terminal
- * standard output is a terminal
- * Refer to Posix.2, the description of the `sh' utility. */
- if (global_argv[optind] == NULL && input == stdin
- && isatty(STDIN_FILENO) && isatty(STDOUT_FILENO)
- ) {
- opt |= LASH_OPT_i;
- }
- setup_job_control();
- if (opt & LASH_OPT_i) {
- /* Looks like they want an interactive shell */
- if (!ENABLE_FEATURE_SH_EXTRA_QUIET) {
- printf("\n\n%s built-in shell (lash)\n"
- "Enter 'help' for a list of built-in commands.\n\n",
- bb_banner);
- }
- } else if (!local_pending_command && global_argv[optind]) {
- //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
- input = xfopen(global_argv[optind], "r");
- /* be lazy, never mark this closed */
- llist_add_to(&close_me_list, (void *)(long)fileno(input));
- }
-
- /* initialize the cwd -- this is never freed...*/
- update_cwd();
-
- if (ENABLE_FEATURE_CLEAN_UP) atexit(free_memory);
-
- if (ENABLE_FEATURE_EDITING) cmdedit_set_initial_prompt();
- else PS1 = NULL;
-
- return busy_loop(input);
-}
+++ /dev/null
-/* vi: set sw=4 ts=4: */
-/*
- * Minix shell port for busybox
- *
- * This version of the Minix shell was adapted for use in busybox
- * by Erik Andersen <andersen@codepoet.org>
- *
- * - backtick expansion did not work properly
- * Jonas Holmberg <jonas.holmberg@axis.com>
- * Robert Schwebel <r.schwebel@pengutronix.de>
- * Erik Andersen <andersen@codepoet.org>
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include <sys/times.h>
-#include <setjmp.h>
-
-#ifdef STANDALONE
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-# endif
-# include <sys/types.h>
-# include <sys/stat.h>
-# include <sys/wait.h>
-# include <signal.h>
-# include <stdio.h>
-# include <stdlib.h>
-# include <unistd.h>
-# include <string.h>
-# include <errno.h>
-# include <dirent.h>
-# include <fcntl.h>
-# include <ctype.h>
-# include <assert.h>
-# define bb_dev_null "/dev/null"
-# define DEFAULT_SHELL "/proc/self/exe"
-# define CONFIG_BUSYBOX_EXEC_PATH "/proc/self/exe"
-# define bb_banner "busybox standalone"
-# define ENABLE_FEATURE_SH_STANDALONE 0
-# define bb_msg_memory_exhausted "memory exhausted"
-# define xmalloc(size) malloc(size)
-# define msh_main(argc,argv) main(argc,argv)
-# define safe_read(fd,buf,count) read(fd,buf,count)
-# define nonblock_safe_read(fd,buf,count) read(fd,buf,count)
-# define NOT_LONE_DASH(s) ((s)[0] != '-' || (s)[1])
-# define LONE_CHAR(s,c) ((s)[0] == (c) && !(s)[1])
-# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-static int find_applet_by_name(const char *applet)
-{
- return -1;
-}
-static char *utoa_to_buf(unsigned n, char *buf, unsigned buflen)
-{
- unsigned i, out, res;
- assert(sizeof(unsigned) == 4);
- if (buflen) {
- out = 0;
- for (i = 1000000000; i; i /= 10) {
- res = n / i;
- if (res || out || i == 1) {
- if (!--buflen) break;
- out++;
- n -= res*i;
- *buf++ = '0' + res;
- }
- }
- }
- return buf;
-}
-static char *itoa_to_buf(int n, char *buf, unsigned buflen)
-{
- if (buflen && n < 0) {
- n = -n;
- *buf++ = '-';
- buflen--;
- }
- return utoa_to_buf((unsigned)n, buf, buflen);
-}
-static char local_buf[12];
-static char *itoa(int n)
-{
- *(itoa_to_buf(n, local_buf, sizeof(local_buf))) = '\0';
- return local_buf;
-}
-#else
-# include "busybox.h" /* for applet_names */
-#endif
-
-//#define MSHDEBUG 4
-
-#ifdef MSHDEBUG
-static int mshdbg = MSHDEBUG;
-
-#define DBGPRINTF(x) if (mshdbg>0) printf x
-#define DBGPRINTF0(x) if (mshdbg>0) printf x
-#define DBGPRINTF1(x) if (mshdbg>1) printf x
-#define DBGPRINTF2(x) if (mshdbg>2) printf x
-#define DBGPRINTF3(x) if (mshdbg>3) printf x
-#define DBGPRINTF4(x) if (mshdbg>4) printf x
-#define DBGPRINTF5(x) if (mshdbg>5) printf x
-#define DBGPRINTF6(x) if (mshdbg>6) printf x
-#define DBGPRINTF7(x) if (mshdbg>7) printf x
-#define DBGPRINTF8(x) if (mshdbg>8) printf x
-#define DBGPRINTF9(x) if (mshdbg>9) printf x
-
-static int mshdbg_rc = 0;
-
-#define RCPRINTF(x) if (mshdbg_rc) printf x
-
-#else
-
-#define DBGPRINTF(x)
-#define DBGPRINTF0(x) ((void)0)
-#define DBGPRINTF1(x) ((void)0)
-#define DBGPRINTF2(x) ((void)0)
-#define DBGPRINTF3(x) ((void)0)
-#define DBGPRINTF4(x) ((void)0)
-#define DBGPRINTF5(x) ((void)0)
-#define DBGPRINTF6(x) ((void)0)
-#define DBGPRINTF7(x) ((void)0)
-#define DBGPRINTF8(x) ((void)0)
-#define DBGPRINTF9(x) ((void)0)
-
-#define RCPRINTF(x) ((void)0)
-
-#endif /* MSHDEBUG */
-
-
-#if ENABLE_FEATURE_EDITING_FANCY_PROMPT
-# define DEFAULT_ROOT_PROMPT "\\u:\\w> "
-# define DEFAULT_USER_PROMPT "\\u:\\w$ "
-#else
-# define DEFAULT_ROOT_PROMPT "# "
-# define DEFAULT_USER_PROMPT "$ "
-#endif
-
-
-/* -------- sh.h -------- */
-/*
- * shell
- */
-
-#define LINELIM 2100
-#define NPUSH 8 /* limit to input nesting */
-
-#undef NOFILE
-#define NOFILE 20 /* Number of open files */
-#define NUFILE 10 /* Number of user-accessible files */
-#define FDBASE 10 /* First file usable by Shell */
-
-/*
- * values returned by wait
- */
-#define WAITSIG(s) ((s) & 0177)
-#define WAITVAL(s) (((s) >> 8) & 0377)
-#define WAITCORE(s) (((s) & 0200) != 0)
-
-/*
- * library and system definitions
- */
-typedef void xint; /* base type of jmp_buf, for not broken compilers */
-
-/*
- * shell components
- */
-#define NOBLOCK ((struct op *)NULL)
-#define NOWORD ((char *)NULL)
-#define NOWORDS ((char **)NULL)
-#define NOPIPE ((int *)NULL)
-
-/*
- * redirection
- */
-struct ioword {
- smallint io_flag; /* action (below) */
- int io_fd; /* fd affected */
- char *io_name; /* file name */
-};
-
-#define IOREAD 1 /* < */
-#define IOHERE 2 /* << (here file) */
-#define IOWRITE 4 /* > */
-#define IOCAT 8 /* >> */
-#define IOXHERE 16 /* ${}, ` in << */
-#define IODUP 32 /* >&digit */
-#define IOCLOSE 64 /* >&- */
-
-#define IODEFAULT (-1) /* "default" IO fd */
-
-
-/*
- * Description of a command or an operation on commands.
- * Might eventually use a union.
- */
-struct op {
- smallint op_type; /* operation type, see Txxxx below */
- char **op_words; /* arguments to a command */
- struct ioword **ioact; /* IO actions (eg, < > >>) */
- struct op *left;
- struct op *right;
- char *str; /* identifier for case and for */
-};
-
-#define TCOM 1 /* command */
-#define TPAREN 2 /* (c-list) */
-#define TPIPE 3 /* a | b */
-#define TLIST 4 /* a [&;] b */
-#define TOR 5 /* || */
-#define TAND 6 /* && */
-#define TFOR 7
-#define TDO 8
-#define TCASE 9
-#define TIF 10
-#define TWHILE 11
-#define TUNTIL 12
-#define TELIF 13
-#define TPAT 14 /* pattern in case */
-#define TBRACE 15 /* {c-list} */
-#define TASYNC 16 /* c & */
-/* Added to support "." file expansion */
-#define TDOT 17
-
-/* Strings for names to make debug easier */
-#ifdef MSHDEBUG
-static const char *const T_CMD_NAMES[] = {
- "PLACEHOLDER",
- "TCOM",
- "TPAREN",
- "TPIPE",
- "TLIST",
- "TOR",
- "TAND",
- "TFOR",
- "TDO",
- "TCASE",
- "TIF",
- "TWHILE",
- "TUNTIL",
- "TELIF",
- "TPAT",
- "TBRACE",
- "TASYNC",
- "TDOT",
-};
-#endif
-
-#define AREASIZE (90000)
-
-/*
- * flags to control evaluation of words
- */
-#define DOSUB 1 /* interpret $, `, and quotes */
-#define DOBLANK 2 /* perform blank interpretation */
-#define DOGLOB 4 /* interpret [?* */
-#define DOKEY 8 /* move words with `=' to 2nd arg. list */
-#define DOTRIM 16 /* trim resulting string */
-
-#define DOALL (DOSUB|DOBLANK|DOGLOB|DOKEY|DOTRIM)
-
-
-struct brkcon {
- jmp_buf brkpt;
- struct brkcon *nextlev;
-};
-
-
-static smallint trapset; /* trap pending (signal number) */
-
-static smallint yynerrs; /* yacc (flag) */
-
-/* moved to G: static char line[LINELIM]; */
-
-#if ENABLE_FEATURE_EDITING
-static char *current_prompt;
-static line_input_t *line_input_state;
-#endif
-
-
-/*
- * other functions
- */
-static const char *rexecve(char *c, char **v, char **envp);
-static char *evalstr(char *cp, int f);
-static char *putn(int n);
-static char *unquote(char *as);
-static int rlookup(char *n);
-static struct wdblock *glob(char *cp, struct wdblock *wb);
-static int my_getc(int ec);
-static int subgetc(char ec, int quoted);
-static char **makenv(int all, struct wdblock *wb);
-static char **eval(char **ap, int f);
-static int setstatus(int s);
-static int waitfor(int lastpid, int canintr);
-
-static void onintr(int s); /* SIGINT handler */
-
-static int newenv(int f);
-static void quitenv(void);
-static void next(int f);
-static void setdash(void);
-static void onecommand(void);
-static void runtrap(int i);
-
-
-/* -------- area stuff -------- */
-
-#define REGSIZE sizeof(struct region)
-#define GROWBY (256)
-/* #define SHRINKBY (64) */
-#undef SHRINKBY
-#define FREE (32767)
-#define BUSY (0)
-#define ALIGN (sizeof(int)-1)
-
-
-struct region {
- struct region *next;
- int area;
-};
-
-
-/* -------- grammar stuff -------- */
-typedef union {
- char *cp;
- char **wp;
- int i;
- struct op *o;
-} YYSTYPE;
-
-#define WORD 256
-#define LOGAND 257
-#define LOGOR 258
-#define BREAK 259
-#define IF 260
-#define THEN 261
-#define ELSE 262
-#define ELIF 263
-#define FI 264
-#define CASE 265
-#define ESAC 266
-#define FOR 267
-#define WHILE 268
-#define UNTIL 269
-#define DO 270
-#define DONE 271
-#define IN 272
-/* Added for "." file expansion */
-#define DOT 273
-
-#define YYERRCODE 300
-
-/* flags to yylex */
-#define CONTIN 01 /* skip new lines to complete command */
-
-static struct op *pipeline(int cf);
-static struct op *andor(void);
-static struct op *c_list(void);
-static int synio(int cf);
-static void musthave(int c, int cf);
-static struct op *simple(void);
-static struct op *nested(int type, int mark);
-static struct op *command(int cf);
-static struct op *dogroup(int onlydone);
-static struct op *thenpart(void);
-static struct op *elsepart(void);
-static struct op *caselist(void);
-static struct op *casepart(void);
-static char **pattern(void);
-static char **wordlist(void);
-static struct op *list(struct op *t1, struct op *t2);
-static struct op *block(int type, struct op *t1, struct op *t2, char **wp);
-static struct op *newtp(void);
-static struct op *namelist(struct op *t);
-static char **copyw(void);
-static void word(char *cp);
-static struct ioword **copyio(void);
-static struct ioword *io(int u, int f, char *cp);
-static int yylex(int cf);
-static int collect(int c, int c1);
-static int dual(int c);
-static void diag(int ec);
-static char *tree(unsigned size);
-
-/* -------- var.h -------- */
-
-struct var {
- char *value;
- char *name;
- struct var *next;
- char status;
-};
-
-#define COPYV 1 /* flag to setval, suggesting copy */
-#define RONLY 01 /* variable is read-only */
-#define EXPORT 02 /* variable is to be exported */
-#define GETCELL 04 /* name & value space was got with getcell */
-
-static int yyparse(void);
-
-
-/* -------- io.h -------- */
-/* io buffer */
-struct iobuf {
- unsigned id; /* buffer id */
- char buf[512]; /* buffer */
- char *bufp; /* pointer into buffer */
- char *ebufp; /* pointer to end of buffer */
-};
-
-/* possible arguments to an IO function */
-struct ioarg {
- const char *aword;
- char **awordlist;
- int afile; /* file descriptor */
- unsigned afid; /* buffer id */
- off_t afpos; /* file position */
- struct iobuf *afbuf; /* buffer for this file */
-};
-
-/* an input generator's state */
-struct io {
- int (*iofn) (struct ioarg *, struct io *);
- struct ioarg *argp;
- int peekc;
- char prev; /* previous character read by readc() */
- char nlcount; /* for `'s */
- char xchar; /* for `'s */
- char task; /* reason for pushed IO */
-};
-/* ->task: */
-#define XOTHER 0 /* none of the below */
-#define XDOLL 1 /* expanding ${} */
-#define XGRAVE 2 /* expanding `'s */
-#define XIO 3 /* file IO */
-
-
-/*
- * input generators for IO structure
- */
-static int nlchar(struct ioarg *ap);
-static int strchar(struct ioarg *ap);
-static int qstrchar(struct ioarg *ap);
-static int filechar(struct ioarg *ap);
-static int herechar(struct ioarg *ap);
-static int linechar(struct ioarg *ap);
-static int gravechar(struct ioarg *ap, struct io *iop);
-static int qgravechar(struct ioarg *ap, struct io *iop);
-static int dolchar(struct ioarg *ap);
-static int wdchar(struct ioarg *ap);
-static void scraphere(void);
-static void freehere(int area);
-static void gethere(void);
-static void markhere(char *s, struct ioword *iop);
-static int herein(char *hname, int xdoll);
-static int run(struct ioarg *argp, int (*f) (struct ioarg *));
-
-
-static int eofc(void);
-static int readc(void);
-static void unget(int c);
-static void ioecho(char c);
-
-
-/*
- * IO control
- */
-static void pushio(struct ioarg *argp, int (*f) (struct ioarg *));
-#define PUSHIO(what,arg,gen) ((temparg.what = (arg)), pushio(&temparg,(gen)))
-static int remap(int fd);
-static int openpipe(int *pv);
-static void closepipe(int *pv);
-static struct io *setbase(struct io *ip);
-
-/* -------- word.h -------- */
-
-#define NSTART 16 /* default number of words to allow for initially */
-
-struct wdblock {
- short w_bsize;
- short w_nword;
- /* bounds are arbitrary */
- char *w_words[1];
-};
-
-static struct wdblock *addword(char *wd, struct wdblock *wb);
-static struct wdblock *newword(int nw);
-static char **getwords(struct wdblock *wb);
-
-/* -------- misc stuff -------- */
-
-static int dolabel(struct op *t, char **args);
-static int dohelp(struct op *t, char **args);
-static int dochdir(struct op *t, char **args);
-static int doshift(struct op *t, char **args);
-static int dologin(struct op *t, char **args);
-static int doumask(struct op *t, char **args);
-static int doexec(struct op *t, char **args);
-static int dodot(struct op *t, char **args);
-static int dowait(struct op *t, char **args);
-static int doread(struct op *t, char **args);
-static int doeval(struct op *t, char **args);
-static int dotrap(struct op *t, char **args);
-static int dobreak(struct op *t, char **args);
-static int doexit(struct op *t, char **args);
-static int doexport(struct op *t, char **args);
-static int doreadonly(struct op *t, char **args);
-static int doset(struct op *t, char **args);
-static int dotimes(struct op *t, char **args);
-static int docontinue(struct op *t, char **args);
-
-static int forkexec(struct op *t, int *pin, int *pout, int no_fork, char **wp);
-static int execute(struct op *t, int *pin, int *pout, int no_fork);
-static int iosetup(struct ioword *iop, int pipein, int pipeout);
-static void brkset(struct brkcon *bc);
-static int getsig(char *s);
-static void setsig(int n, sighandler_t f);
-static int getn(char *as);
-static int brkcontin(char *cp, int val);
-static void rdexp(char **wp, void (*f) (struct var *), int key);
-static void badid(char *s);
-static void varput(char *s, int out);
-static int expand(const char *cp, struct wdblock **wbp, int f);
-static char *blank(int f);
-static int dollar(int quoted);
-static int grave(int quoted);
-static void globname(char *we, char *pp);
-static char *generate(char *start1, char *end1, char *middle, char *end);
-static int anyspcl(struct wdblock *wb);
-static void readhere(char **name, char *s, int ec);
-static int xxchar(struct ioarg *ap);
-
-struct here {
- char *h_tag;
- char h_dosub;
- struct ioword *h_iop;
- struct here *h_next;
-};
-
-static const char *const signame[] = {
- "Signal 0",
- "Hangup",
- NULL, /* interrupt */
- "Quit",
- "Illegal instruction",
- "Trace/BPT trap",
- "Abort",
- "Bus error",
- "Floating Point Exception",
- "Killed",
- "SIGUSR1",
- "SIGSEGV",
- "SIGUSR2",
- NULL, /* broken pipe */
- "Alarm clock",
- "Terminated"
-};
-
-
-typedef int (*builtin_func_ptr)(struct op *, char **);
-
-struct builtincmd {
- const char *name;
- builtin_func_ptr builtinfunc;
-};
-
-static const struct builtincmd builtincmds[] = {
- { "." , dodot },
- { ":" , dolabel },
- { "break" , dobreak },
- { "cd" , dochdir },
- { "continue", docontinue },
- { "eval" , doeval },
- { "exec" , doexec },
- { "exit" , doexit },
- { "export" , doexport },
- { "help" , dohelp },
- { "login" , dologin },
- { "newgrp" , dologin },
- { "read" , doread },
- { "readonly", doreadonly },
- { "set" , doset },
- { "shift" , doshift },
- { "times" , dotimes },
- { "trap" , dotrap },
- { "umask" , doumask },
- { "wait" , dowait },
- { NULL , NULL },
-};
-
-static struct op *scantree(struct op *);
-static struct op *dowholefile(int /*, int*/);
-
-
-/* Globals */
-static char **dolv;
-static int dolc;
-static int exstat;
-static smallint gflg; /* (seems to be a parse error indicator) */
-static smallint interactive; /* Is this an interactive shell */
-static smallint execflg;
-static smallint isbreak; /* "break" statement was seen */
-static int multiline; /* '\n' changed to ';' (counter) */
-static struct op *outtree; /* result from parser */
-static xint *failpt;
-static xint *errpt;
-static struct brkcon *brklist;
-static struct wdblock *wdlist;
-static struct wdblock *iolist;
-
-#ifdef MSHDEBUG
-static struct var *mshdbg_var;
-#endif
-static struct var *vlist; /* dictionary */
-static struct var *homedir; /* home directory */
-static struct var *prompt; /* main prompt */
-static struct var *cprompt; /* continuation prompt */
-static struct var *path; /* search path for commands */
-static struct var *shell; /* shell to interpret command files */
-static struct var *ifs; /* field separators */
-
-static int areanum; /* current allocation area */
-static smallint intr; /* interrupt pending (bool) */
-static smallint heedint = 1; /* heed interrupt signals (bool) */
-static int inparse;
-static char *null = (char*)""; /* null value for variable */
-static void (*qflag)(int) = SIG_IGN;
-static int startl;
-static int peeksym;
-static int nlseen;
-static int iounit = IODEFAULT;
-static YYSTYPE yylval;
-static char *elinep; /* done in main(): = line + sizeof(line) - 5 */
-
-static struct here *inhere; /* list of hear docs while parsing */
-static struct here *acthere; /* list of active here documents */
-static struct region *areabot; /* bottom of area */
-static struct region *areatop; /* top of area */
-static struct region *areanxt; /* starting point of scan */
-static void *brktop;
-static void *brkaddr;
-
-#define AFID_NOBUF (~0)
-#define AFID_ID 0
-
-
-/*
- * parsing & execution environment
- */
-struct env {
- char *linep;
- struct io *iobase;
- struct io *iop;
- xint *errpt; /* void * */
- int iofd;
- struct env *oenv;
-};
-
-
-struct globals {
- struct env global_env;
- struct ioarg temparg; // = { .afid = AFID_NOBUF }; /* temporary for PUSHIO */
- unsigned bufid; // = AFID_ID; /* buffer id counter */
- char ourtrap[_NSIG + 1];
- char *trap[_NSIG + 1];
- struct iobuf sharedbuf; /* in main(): set to { AFID_NOBUF } */
- struct iobuf mainbuf; /* in main(): set to { AFID_NOBUF } */
- struct ioarg ioargstack[NPUSH];
- /*
- * flags:
- * -e: quit on error
- * -k: look for name=value everywhere on command line
- * -n: no execution
- * -t: exit after reading and executing one command
- * -v: echo as read
- * -x: trace
- * -u: unset variables net diagnostic
- */
- char flags['z' - 'a' + 1];
- char filechar_cmdbuf[BUFSIZ];
- char line[LINELIM];
- char child_cmd[LINELIM];
-
- struct io iostack[NPUSH];
-
- char grave__var_name[LINELIM];
- char grave__alt_value[LINELIM];
-};
-
-#define G (*ptr_to_globals)
-#define global_env (G.global_env )
-#define temparg (G.temparg )
-#define bufid (G.bufid )
-#define ourtrap (G.ourtrap )
-#define trap (G.trap )
-#define sharedbuf (G.sharedbuf )
-#define mainbuf (G.mainbuf )
-#define ioargstack (G.ioargstack )
-/* this looks weird, but is OK ... we index FLAG with 'a'...'z' */
-#define FLAG (G.flags - 'a' )
-#define filechar_cmdbuf (G.filechar_cmdbuf)
-#define line (G.line )
-#define child_cmd (G.child_cmd )
-#define iostack (G.iostack )
-#define INIT_G() do { \
- SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
- global_env.linep = line; \
- global_env.iobase = iostack; \
- global_env.iop = iostack - 1; \
- global_env.iofd = FDBASE; \
- temparg.afid = AFID_NOBUF; \
- bufid = AFID_ID; \
-} while (0)
-
-
-/* in substitution */
-#define INSUB() (global_env.iop->task == XGRAVE || global_env.iop->task == XDOLL)
-
-#define RUN(what, arg, gen) ((temparg.what = (arg)), run(&temparg, (gen)))
-
-#ifdef MSHDEBUG
-static void print_tree(struct op *head)
-{
- if (head == NULL) {
- DBGPRINTF(("PRINT_TREE: no tree\n"));
- return;
- }
-
- DBGPRINTF(("NODE: %p, left %p, right %p\n", head, head->left,
- head->right));
-
- if (head->left)
- print_tree(head->left);
-
- if (head->right)
- print_tree(head->right);
-}
-#endif /* MSHDEBUG */
-
-
-/*
- * IO functions
- */
-static void prs(const char *s)
-{
- if (*s)
- write(2, s, strlen(s));
-}
-
-static void prn(unsigned u)
-{
- prs(itoa(u));
-}
-
-static void echo(char **wp)
-{
- int i;
-
- prs("+");
- for (i = 0; wp[i]; i++) {
- if (i)
- prs(" ");
- prs(wp[i]);
- }
- prs("\n");
-}
-
-static void closef(int i)
-{
- if (i > 2)
- close(i);
-}
-
-static void closeall(void)
-{
- int u;
-
- for (u = NUFILE; u < NOFILE;)
- close(u++);
-}
-
-
-/* fail but return to process next command */
-static void fail(void) ATTRIBUTE_NORETURN;
-static void fail(void)
-{
- longjmp(failpt, 1);
- /* NOTREACHED */
-}
-
-/* abort shell (or fail in subshell) */
-static void leave(void) ATTRIBUTE_NORETURN;
-static void leave(void)
-{
- DBGPRINTF(("LEAVE: leave called!\n"));
-
- if (execflg)
- fail();
- scraphere();
- freehere(1);
- runtrap(0);
- _exit(exstat);
- /* NOTREACHED */
-}
-
-static void warn(const char *s)
-{
- if (*s) {
- prs(s);
- exstat = -1;
- }
- prs("\n");
- if (FLAG['e'])
- leave();
-}
-
-static void err(const char *s)
-{
- warn(s);
- if (FLAG['n'])
- return;
- if (!interactive)
- leave();
- if (global_env.errpt)
- longjmp(global_env.errpt, 1);
- closeall();
- global_env.iop = global_env.iobase = iostack;
-}
-
-
-/* -------- area.c -------- */
-
-/*
- * All memory between (char *)areabot and (char *)(areatop+1) is
- * exclusively administered by the area management routines.
- * It is assumed that sbrk() and brk() manipulate the high end.
- */
-
-#define sbrk(X) ({ \
- void * __q = (void *)-1; \
- if (brkaddr + (int)(X) < brktop) { \
- __q = brkaddr; \
- brkaddr += (int)(X); \
- } \
- __q; \
-})
-
-static void initarea(void)
-{
- brkaddr = xmalloc(AREASIZE);
- brktop = brkaddr + AREASIZE;
-
- while ((long) sbrk(0) & ALIGN)
- sbrk(1);
- areabot = (struct region *) sbrk(REGSIZE);
-
- areabot->next = areabot;
- areabot->area = BUSY;
- areatop = areabot;
- areanxt = areabot;
-}
-
-static char *getcell(unsigned nbytes)
-{
- int nregio;
- struct region *p, *q;
- int i;
-
- if (nbytes == 0) {
- puts("getcell(0)");
- abort();
- }
- /* silly and defeats the algorithm */
- /*
- * round upwards and add administration area
- */
- nregio = (nbytes + (REGSIZE - 1)) / REGSIZE + 1;
- p = areanxt;
- for (;;) {
- if (p->area > areanum) {
- /*
- * merge free cells
- */
- while ((q = p->next)->area > areanum && q != areanxt)
- p->next = q->next;
- /*
- * exit loop if cell big enough
- */
- if (q >= p + nregio)
- goto found;
- }
- p = p->next;
- if (p == areanxt)
- break;
- }
- i = nregio >= GROWBY ? nregio : GROWBY;
- p = (struct region *) sbrk(i * REGSIZE);
- if (p == (struct region *) -1)
- return NULL;
- p--;
- if (p != areatop) {
- puts("not contig");
- abort(); /* allocated areas are contiguous */
- }
- q = p + i;
- p->next = q;
- p->area = FREE;
- q->next = areabot;
- q->area = BUSY;
- areatop = q;
- found:
- /*
- * we found a FREE area big enough, pointed to by 'p', and up to 'q'
- */
- areanxt = p + nregio;
- if (areanxt < q) {
- /*
- * split into requested area and rest
- */
- if (areanxt + 1 > q) {
- puts("OOM");
- abort(); /* insufficient space left for admin */
- }
- areanxt->next = q;
- areanxt->area = FREE;
- p->next = areanxt;
- }
- p->area = areanum;
- return (char *) (p + 1);
-}
-
-static void freecell(char *cp)
-{
- struct region *p;
-
- p = (struct region *) cp;
- if (p != NULL) {
- p--;
- if (p < areanxt)
- areanxt = p;
- p->area = FREE;
- }
-}
-#define DELETE(obj) freecell((char *)obj)
-
-static void freearea(int a)
-{
- struct region *p, *top;
-
- top = areatop;
- for (p = areabot; p != top; p = p->next)
- if (p->area >= a)
- p->area = FREE;
-}
-
-static void setarea(char *cp, int a)
-{
- struct region *p;
-
- p = (struct region *) cp;
- if (p != NULL)
- (p - 1)->area = a;
-}
-
-static int getarea(char *cp)
-{
- return ((struct region *) cp - 1)->area;
-}
-
-static void garbage(void)
-{
- struct region *p, *q, *top;
-
- top = areatop;
- for (p = areabot; p != top; p = p->next) {
- if (p->area > areanum) {
- while ((q = p->next)->area > areanum)
- p->next = q->next;
- areanxt = p;
- }
- }
-#ifdef SHRINKBY
- if (areatop >= q + SHRINKBY && q->area > areanum) {
- brk((char *) (q + 1));
- q->next = areabot;
- q->area = BUSY;
- areatop = q;
- }
-#endif
-}
-
-static void *get_space(int n)
-{
- char *cp;
-
- cp = getcell(n);
- if (cp == NULL)
- err("out of string space");
- return cp;
-}
-
-static char *strsave(const char *s, int a)
-{
- char *cp;
-
- cp = get_space(strlen(s) + 1);
- if (cp == NULL) {
-// FIXME: I highly doubt this is good.
- return (char*)"";
- }
- setarea(cp, a);
- strcpy(cp, s);
- return cp;
-}
-
-
-/* -------- var.c -------- */
-
-static int eqname(const char *n1, const char *n2)
-{
- for (; *n1 != '=' && *n1 != '\0'; n1++)
- if (*n2++ != *n1)
- return 0;
- return *n2 == '\0' || *n2 == '=';
-}
-
-static const char *findeq(const char *cp)
-{
- while (*cp != '\0' && *cp != '=')
- cp++;
- return cp;
-}
-
-/*
- * Find the given name in the dictionary
- * and return its value. If the name was
- * not previously there, enter it now and
- * return a null value.
- */
-static struct var *lookup(const char *n)
-{
-// FIXME: dirty hack
- static struct var dummy;
-
- struct var *vp;
- const char *cp;
- char *xp;
- int c;
-
- if (isdigit(*n)) {
- dummy.name = (char*)n;
- for (c = 0; isdigit(*n) && c < 1000; n++)
- c = c * 10 + *n - '0';
- dummy.status = RONLY;
- dummy.value = (c <= dolc ? dolv[c] : null);
- return &dummy;
- }
-
- for (vp = vlist; vp; vp = vp->next)
- if (eqname(vp->name, n))
- return vp;
-
- cp = findeq(n);
- vp = get_space(sizeof(*vp));
- if (vp == 0 || (vp->name = get_space((int) (cp - n) + 2)) == NULL) {
- dummy.name = dummy.value = (char*)"";
- return &dummy;
- }
-
- xp = vp->name;
- while ((*xp = *n++) != '\0' && *xp != '=')
- xp++;
- *xp++ = '=';
- *xp = '\0';
- setarea((char *) vp, 0);
- setarea((char *) vp->name, 0);
- vp->value = null;
- vp->next = vlist;
- vp->status = GETCELL;
- vlist = vp;
- return vp;
-}
-
-/*
- * if name is not NULL, it must be
- * a prefix of the space `val',
- * and end with `='.
- * this is all so that exporting
- * values is reasonably painless.
- */
-static void nameval(struct var *vp, const char *val, const char *name)
-{
- const char *cp;
- char *xp;
- int fl;
-
- if (vp->status & RONLY) {
- xp = vp->name;
- while (*xp && *xp != '=')
- fputc(*xp++, stderr);
- err(" is read-only");
- return;
- }
- fl = 0;
- if (name == NULL) {
- xp = get_space(strlen(vp->name) + strlen(val) + 2);
- if (xp == NULL)
- return;
- /* make string: name=value */
- setarea(xp, 0);
- name = xp;
- cp = vp->name;
- while ((*xp = *cp++) != '\0' && *xp != '=')
- xp++;
- *xp++ = '=';
- strcpy(xp, val);
- val = xp;
- fl = GETCELL;
- }
- if (vp->status & GETCELL)
- freecell(vp->name); /* form new string `name=value' */
- vp->name = (char*)name;
- vp->value = (char*)val;
- vp->status |= fl;
-}
-
-/*
- * give variable at `vp' the value `val'.
- */
-static void setval(struct var *vp, const char *val)
-{
- nameval(vp, val, NULL);
-}
-
-static void export(struct var *vp)
-{
- vp->status |= EXPORT;
-}
-
-static void ronly(struct var *vp)
-{
- if (isalpha(vp->name[0]) || vp->name[0] == '_') /* not an internal symbol */
- vp->status |= RONLY;
-}
-
-static int isassign(const char *s)
-{
- unsigned char c;
- DBGPRINTF7(("ISASSIGN: enter, s=%s\n", s));
-
- c = *s;
- /* no isalpha() - we shouldn't use locale */
- /* c | 0x20 - lowercase (Latin) letters */
- if (c != '_' && (unsigned)((c|0x20) - 'a') > 25)
- /* not letter */
- return 0;
-
- while (1) {
- c = *++s;
- if (c == '=')
- return 1;
- if (c == '\0')
- return 0;
- if (c != '_'
- && (unsigned)(c - '0') > 9 /* not number */
- && (unsigned)((c|0x20) - 'a') > 25 /* not letter */
- ) {
- return 0;
- }
- }
-}
-
-static int assign(const char *s, int cf)
-{
- const char *cp;
- struct var *vp;
-
- DBGPRINTF7(("ASSIGN: enter, s=%s, cf=%d\n", s, cf));
-
- if (!isalpha(*s) && *s != '_')
- return 0;
- for (cp = s; *cp != '='; cp++)
- if (*cp == '\0' || (!isalnum(*cp) && *cp != '_'))
- return 0;
- vp = lookup(s);
- nameval(vp, ++cp, cf == COPYV ? NULL : s);
- if (cf != COPYV)
- vp->status &= ~GETCELL;
- return 1;
-}
-
-static int checkname(char *cp)
-{
- DBGPRINTF7(("CHECKNAME: enter, cp=%s\n", cp));
-
- if (!isalpha(*cp++) && *(cp - 1) != '_')
- return 0;
- while (*cp)
- if (!isalnum(*cp++) && *(cp - 1) != '_')
- return 0;
- return 1;
-}
-
-static void putvlist(int f, int out)
-{
- struct var *vp;
-
- for (vp = vlist; vp; vp = vp->next) {
- if (vp->status & f && (isalpha(*vp->name) || *vp->name == '_')) {
- if (vp->status & EXPORT)
- write(out, "export ", 7);
- if (vp->status & RONLY)
- write(out, "readonly ", 9);
- write(out, vp->name, (int) (findeq(vp->name) - vp->name));
- write(out, "\n", 1);
- }
- }
-}
-
-
-/*
- * trap handling
- */
-static void sig(int i)
-{
- trapset = i;
- signal(i, sig);
-}
-
-static void runtrap(int i)
-{
- char *trapstr;
-
- trapstr = trap[i];
- if (trapstr == NULL)
- return;
-
- if (i == 0)
- trap[i] = NULL;
-
- RUN(aword, trapstr, nlchar);
-}
-
-
-static void setdash(void)
-{
- char *cp;
- int c;
- char m['z' - 'a' + 1];
-
- cp = m;
- for (c = 'a'; c <= 'z'; c++)
- if (FLAG[c])
- *cp++ = c;
- *cp = '\0';
- setval(lookup("-"), m);
-}
-
-static int newfile(char *s)
-{
- int f;
-
- DBGPRINTF7(("NEWFILE: opening %s\n", s));
-
- f = 0;
- if (NOT_LONE_DASH(s)) {
- DBGPRINTF(("NEWFILE: s is %s\n", s));
- f = open(s, O_RDONLY);
- if (f < 0) {
- prs(s);
- err(": cannot open");
- return 1;
- }
- }
-
- next(remap(f));
- return 0;
-}
-
-
-struct op *scantree(struct op *head)
-{
- struct op *dotnode;
-
- if (head == NULL)
- return NULL;
-
- if (head->left != NULL) {
- dotnode = scantree(head->left);
- if (dotnode)
- return dotnode;
- }
-
- if (head->right != NULL) {
- dotnode = scantree(head->right);
- if (dotnode)
- return dotnode;
- }
-
- if (head->op_words == NULL)
- return NULL;
-
- DBGPRINTF5(("SCANTREE: checking node %p\n", head));
-
- if ((head->op_type != TDOT) && LONE_CHAR(head->op_words[0], '.')) {
- DBGPRINTF5(("SCANTREE: dot found in node %p\n", head));
- return head;
- }
-
- return NULL;
-}
-
-
-static void onecommand(void)
-{
- int i;
- jmp_buf m1;
-
- DBGPRINTF(("ONECOMMAND: enter, outtree=%p\n", outtree));
-
- while (global_env.oenv)
- quitenv();
-
- areanum = 1;
- freehere(areanum);
- freearea(areanum);
- garbage();
- wdlist = NULL;
- iolist = NULL;
- global_env.errpt = NULL;
- global_env.linep = line;
- yynerrs = 0;
- multiline = 0;
- inparse = 1;
- intr = 0;
- execflg = 0;
-
- failpt = m1;
- setjmp(failpt); /* Bruce Evans' fix */
- failpt = m1;
- if (setjmp(failpt) || yyparse() || intr) {
- DBGPRINTF(("ONECOMMAND: this is not good.\n"));
-
- while (global_env.oenv)
- quitenv();
- scraphere();
- if (!interactive && intr)
- leave();
- inparse = 0;
- intr = 0;
- return;
- }
-
- inparse = 0;
- brklist = 0;
- intr = 0;
- execflg = 0;
-
- if (!FLAG['n']) {
- DBGPRINTF(("ONECOMMAND: calling execute, t=outtree=%p\n",
- outtree));
- execute(outtree, NOPIPE, NOPIPE, /* no_fork: */ 0);
- }
-
- if (!interactive && intr) {
- execflg = 0;
- leave();
- }
-
- i = trapset;
- if (i != 0) {
- trapset = 0;
- runtrap(i);
- }
-}
-
-static int newenv(int f)
-{
- struct env *ep;
-
- DBGPRINTF(("NEWENV: f=%d (indicates quitenv and return)\n", f));
-
- if (f) {
- quitenv();
- return 1;
- }
-
- ep = get_space(sizeof(*ep));
- if (ep == NULL) {
- while (global_env.oenv)
- quitenv();
- fail();
- }
- *ep = global_env;
- global_env.oenv = ep;
- global_env.errpt = errpt;
-
- return 0;
-}
-
-static void quitenv(void)
-{
- struct env *ep;
- int fd;
-
- DBGPRINTF(("QUITENV: global_env.oenv=%p\n", global_env.oenv));
-
- ep = global_env.oenv;
- if (ep != NULL) {
- fd = global_env.iofd;
- global_env = *ep;
- /* should close `'d files */
- DELETE(ep);
- while (--fd >= global_env.iofd)
- close(fd);
- }
-}
-
-/*
- * Is character c in s?
- */
-static int any(int c, const char *s)
-{
- while (*s)
- if (*s++ == c)
- return 1;
- return 0;
-}
-
-/*
- * Is any character from s1 in s2?
- */
-static int anys(const char *s1, const char *s2)
-{
- while (*s1)
- if (any(*s1++, s2))
- return 1;
- return 0;
-}
-
-static char *putn(int n)
-{
- return itoa(n);
-}
-
-static void next(int f)
-{
- PUSHIO(afile, f, filechar);
-}
-
-static void onintr(int s ATTRIBUTE_UNUSED) /* ANSI C requires a parameter */
-{
- signal(SIGINT, onintr);
- intr = 1;
- if (interactive) {
- if (inparse) {
- prs("\n");
- fail();
- }
- } else if (heedint) {
- execflg = 0;
- leave();
- }
-}
-
-
-/* -------- gmatch.c -------- */
-/*
- * int gmatch(string, pattern)
- * char *string, *pattern;
- *
- * Match a pattern as in sh(1).
- */
-
-#define CMASK 0377
-#define QUOTE 0200
-#define QMASK (CMASK & ~QUOTE)
-#define NOT '!' /* might use ^ */
-
-static const char *cclass(const char *p, int sub)
-{
- int c, d, not, found;
-
- not = (*p == NOT);
- if (not != 0)
- p++;
- found = not;
- do {
- if (*p == '\0')
- return NULL;
- c = *p & CMASK;
- if (p[1] == '-' && p[2] != ']') {
- d = p[2] & CMASK;
- p++;
- } else
- d = c;
- if (c == sub || (c <= sub && sub <= d))
- found = !not;
- } while (*++p != ']');
- return found ? p + 1 : NULL;
-}
-
-static int gmatch(const char *s, const char *p)
-{
- int sc, pc;
-
- if (s == NULL || p == NULL)
- return 0;
-
- while ((pc = *p++ & CMASK) != '\0') {
- sc = *s++ & QMASK;
- switch (pc) {
- case '[':
- p = cclass(p, sc);
- if (p == NULL)
- return 0;
- break;
-
- case '?':
- if (sc == 0)
- return 0;
- break;
-
- case '*':
- s--;
- do {
- if (*p == '\0' || gmatch(s, p))
- return 1;
- } while (*s++ != '\0');
- return 0;
-
- default:
- if (sc != (pc & ~QUOTE))
- return 0;
- }
- }
- return *s == '\0';
-}
-
-
-/* -------- csyn.c -------- */
-/*
- * shell: syntax (C version)
- */
-
-static void yyerror(const char *s) ATTRIBUTE_NORETURN;
-static void yyerror(const char *s)
-{
- yynerrs = 1;
- if (interactive && global_env.iop <= iostack) {
- multiline = 0;
- while (eofc() == 0 && yylex(0) != '\n')
- continue;
- }
- err(s);
- fail();
-}
-
-static void zzerr(void) ATTRIBUTE_NORETURN;
-static void zzerr(void)
-{
- yyerror("syntax error");
-}
-
-int yyparse(void)
-{
- DBGPRINTF7(("YYPARSE: enter...\n"));
-
- startl = 1;
- peeksym = 0;
- yynerrs = 0;
- outtree = c_list();
- musthave('\n', 0);
- return yynerrs; /* 0/1 */
-}
-
-static struct op *pipeline(int cf)
-{
- struct op *t, *p;
- int c;
-
- DBGPRINTF7(("PIPELINE: enter, cf=%d\n", cf));
-
- t = command(cf);
-
- DBGPRINTF9(("PIPELINE: t=%p\n", t));
-
- if (t != NULL) {
- while ((c = yylex(0)) == '|') {
- p = command(CONTIN);
- if (p == NULL) {
- DBGPRINTF8(("PIPELINE: error!\n"));
- zzerr();
- }
-
- if (t->op_type != TPAREN && t->op_type != TCOM) {
- /* shell statement */
- t = block(TPAREN, t, NOBLOCK, NOWORDS);
- }
-
- t = block(TPIPE, t, p, NOWORDS);
- }
- peeksym = c;
- }
-
- DBGPRINTF7(("PIPELINE: returning t=%p\n", t));
- return t;
-}
-
-static struct op *andor(void)
-{
- struct op *t, *p;
- int c;
-
- DBGPRINTF7(("ANDOR: enter...\n"));
-
- t = pipeline(0);
-
- DBGPRINTF9(("ANDOR: t=%p\n", t));
-
- if (t != NULL) {
- while ((c = yylex(0)) == LOGAND || c == LOGOR) {
- p = pipeline(CONTIN);
- if (p == NULL) {
- DBGPRINTF8(("ANDOR: error!\n"));
- zzerr();
- }
-
- t = block(c == LOGAND ? TAND : TOR, t, p, NOWORDS);
- }
-
- peeksym = c;
- }
-
- DBGPRINTF7(("ANDOR: returning t=%p\n", t));
- return t;
-}
-
-static struct op *c_list(void)
-{
- struct op *t, *p;
- int c;
-
- DBGPRINTF7(("C_LIST: enter...\n"));
-
- t = andor();
-
- if (t != NULL) {
- peeksym = yylex(0);
- if (peeksym == '&')
- t = block(TASYNC, t, NOBLOCK, NOWORDS);
-
- while ((c = yylex(0)) == ';' || c == '&'
- || (multiline && c == '\n')
- ) {
- p = andor();
- if (p== NULL)
- return t;
-
- peeksym = yylex(0);
- if (peeksym == '&')
- p = block(TASYNC, p, NOBLOCK, NOWORDS);
-
- t = list(t, p);
- } /* WHILE */
-
- peeksym = c;
- }
- /* IF */
- DBGPRINTF7(("C_LIST: returning t=%p\n", t));
- return t;
-}
-
-static int synio(int cf)
-{
- struct ioword *iop;
- int i;
- int c;
-
- DBGPRINTF7(("SYNIO: enter, cf=%d\n", cf));
-
- c = yylex(cf);
- if (c != '<' && c != '>') {
- peeksym = c;
- return 0;
- }
-
- i = yylval.i;
- musthave(WORD, 0);
- iop = io(iounit, i, yylval.cp);
- iounit = IODEFAULT;
-
- if (i & IOHERE)
- markhere(yylval.cp, iop);
-
- DBGPRINTF7(("SYNIO: returning 1\n"));
- return 1;
-}
-
-static void musthave(int c, int cf)
-{
- peeksym = yylex(cf);
- if (peeksym != c) {
- DBGPRINTF7(("MUSTHAVE: error!\n"));
- zzerr();
- }
-
- peeksym = 0;
-}
-
-static struct op *simple(void)
-{
- struct op *t;
-
- t = NULL;
- for (;;) {
- switch (peeksym = yylex(0)) {
- case '<':
- case '>':
- (void) synio(0);
- break;
-
- case WORD:
- if (t == NULL) {
- t = newtp();
- t->op_type = TCOM;
- }
- peeksym = 0;
- word(yylval.cp);
- break;
-
- default:
- return t;
- }
- }
-}
-
-static struct op *nested(int type, int mark)
-{
- struct op *t;
-
- DBGPRINTF3(("NESTED: enter, type=%d, mark=%d\n", type, mark));
-
- multiline++;
- t = c_list();
- musthave(mark, 0);
- multiline--;
- return block(type, t, NOBLOCK, NOWORDS);
-}
-
-static struct op *command(int cf)
-{
- struct op *t;
- struct wdblock *iosave;
- int c;
-
- DBGPRINTF(("COMMAND: enter, cf=%d\n", cf));
-
- iosave = iolist;
- iolist = NULL;
-
- if (multiline)
- cf |= CONTIN;
-
- while (synio(cf))
- cf = 0;
-
- c = yylex(cf);
-
- switch (c) {
- default:
- peeksym = c;
- t = simple();
- if (t == NULL) {
- if (iolist == NULL)
- return NULL;
- t = newtp();
- t->op_type = TCOM;
- }
- break;
-
- case '(':
- t = nested(TPAREN, ')');
- break;
-
- case '{':
- t = nested(TBRACE, '}');
- break;
-
- case FOR:
- t = newtp();
- t->op_type = TFOR;
- musthave(WORD, 0);
- startl = 1;
- t->str = yylval.cp;
- multiline++;
- t->op_words = wordlist();
- c = yylex(0);
- if (c != '\n' && c != ';')
- peeksym = c;
- t->left = dogroup(0);
- multiline--;
- break;
-
- case WHILE:
- case UNTIL:
- multiline++;
- t = newtp();
- t->op_type = (c == WHILE ? TWHILE : TUNTIL);
- t->left = c_list();
- t->right = dogroup(1);
- /* t->op_words = NULL; - newtp() did this */
- multiline--;
- break;
-
- case CASE:
- t = newtp();
- t->op_type = TCASE;
- musthave(WORD, 0);
- t->str = yylval.cp;
- startl++;
- multiline++;
- musthave(IN, CONTIN);
- startl++;
-
- t->left = caselist();
-
- musthave(ESAC, 0);
- multiline--;
- break;
-
- case IF:
- multiline++;
- t = newtp();
- t->op_type = TIF;
- t->left = c_list();
- t->right = thenpart();
- musthave(FI, 0);
- multiline--;
- break;
-
- case DOT:
- t = newtp();
- t->op_type = TDOT;
-
- musthave(WORD, 0); /* gets name of file */
- DBGPRINTF7(("COMMAND: DOT clause, yylval.cp is %s\n", yylval.cp));
-
- word(yylval.cp); /* add word to wdlist */
- word(NOWORD); /* terminate wdlist */
- t->op_words = copyw(); /* dup wdlist */
- break;
-
- }
-
- while (synio(0))
- continue;
-
- t = namelist(t);
- iolist = iosave;
-
- DBGPRINTF(("COMMAND: returning %p\n", t));
-
- return t;
-}
-
-static struct op *dowholefile(int type /*, int mark*/)
-{
- struct op *t;
-
- DBGPRINTF(("DOWHOLEFILE: enter, type=%d\n", type /*, mark*/));
-
- multiline++;
- t = c_list();
- multiline--;
- t = block(type, t, NOBLOCK, NOWORDS);
- DBGPRINTF(("DOWHOLEFILE: return t=%p\n", t));
- return t;
-}
-
-static struct op *dogroup(int onlydone)
-{
- int c;
- struct op *mylist;
-
- c = yylex(CONTIN);
- if (c == DONE && onlydone)
- return NULL;
- if (c != DO)
- zzerr();
- mylist = c_list();
- musthave(DONE, 0);
- return mylist;
-}
-
-static struct op *thenpart(void)
-{
- int c;
- struct op *t;
-
- c = yylex(0);
- if (c != THEN) {
- peeksym = c;
- return NULL;
- }
- t = newtp();
- /*t->op_type = 0; - newtp() did this */
- t->left = c_list();
- if (t->left == NULL)
- zzerr();
- t->right = elsepart();
- return t;
-}
-
-static struct op *elsepart(void)
-{
- int c;
- struct op *t;
-
- switch (c = yylex(0)) {
- case ELSE:
- t = c_list();
- if (t == NULL)
- zzerr();
- return t;
-
- case ELIF:
- t = newtp();
- t->op_type = TELIF;
- t->left = c_list();
- t->right = thenpart();
- return t;
-
- default:
- peeksym = c;
- return NULL;
- }
-}
-
-static struct op *caselist(void)
-{
- struct op *t;
-
- t = NULL;
- while ((peeksym = yylex(CONTIN)) != ESAC) {
- DBGPRINTF(("CASELIST, doing yylex, peeksym=%d\n", peeksym));
- t = list(t, casepart());
- }
-
- DBGPRINTF(("CASELIST, returning t=%p\n", t));
- return t;
-}
-
-static struct op *casepart(void)
-{
- struct op *t;
-
- DBGPRINTF7(("CASEPART: enter...\n"));
-
- t = newtp();
- t->op_type = TPAT;
- t->op_words = pattern();
- musthave(')', 0);
- t->left = c_list();
- peeksym = yylex(CONTIN);
- if (peeksym != ESAC)
- musthave(BREAK, CONTIN);
-
- DBGPRINTF7(("CASEPART: made newtp(TPAT, t=%p)\n", t));
-
- return t;
-}
-
-static char **pattern(void)
-{
- int c, cf;
-
- cf = CONTIN;
- do {
- musthave(WORD, cf);
- word(yylval.cp);
- cf = 0;
- c = yylex(0);
- } while (c == '|');
- peeksym = c;
- word(NOWORD);
-
- return copyw();
-}
-
-static char **wordlist(void)
-{
- int c;
-
- c = yylex(0);
- if (c != IN) {
- peeksym = c;
- return NULL;
- }
- startl = 0;
- while ((c = yylex(0)) == WORD)
- word(yylval.cp);
- word(NOWORD);
- peeksym = c;
- return copyw();
-}
-
-/*
- * supporting functions
- */
-static struct op *list(struct op *t1, struct op *t2)
-{
- DBGPRINTF7(("LIST: enter, t1=%p, t2=%p\n", t1, t2));
-
- if (t1 == NULL)
- return t2;
- if (t2 == NULL)
- return t1;
-
- return block(TLIST, t1, t2, NOWORDS);
-}
-
-static struct op *block(int type, struct op *t1, struct op *t2, char **wp)
-{
- struct op *t;
-
- DBGPRINTF7(("BLOCK: enter, type=%d (%s)\n", type, T_CMD_NAMES[type]));
-
- t = newtp();
- t->op_type = type;
- t->left = t1;
- t->right = t2;
- t->op_words = wp;
-
- DBGPRINTF7(("BLOCK: inserted %p between %p and %p\n", t, t1, t2));
-
- return t;
-}
-
-/* See if given string is a shell multiline (FOR, IF, etc) */
-static int rlookup(char *n)
-{
- struct res {
- char r_name[6];
- int16_t r_val;
- };
- static const struct res restab[] = {
- { "for" , FOR },
- { "case" , CASE },
- { "esac" , ESAC },
- { "while", WHILE },
- { "do" , DO },
- { "done" , DONE },
- { "if" , IF },
- { "in" , IN },
- { "then" , THEN },
- { "else" , ELSE },
- { "elif" , ELIF },
- { "until", UNTIL },
- { "fi" , FI },
- { ";;" , BREAK },
- { "||" , LOGOR },
- { "&&" , LOGAND },
- { "{" , '{' },
- { "}" , '}' },
- { "." , DOT },
- { },
- };
-
- const struct res *rp;
-
- DBGPRINTF7(("RLOOKUP: enter, n is %s\n", n));
-
- for (rp = restab; rp->r_name[0]; rp++)
- if (strcmp(rp->r_name, n) == 0) {
- DBGPRINTF7(("RLOOKUP: match, returning %d\n", rp->r_val));
- return rp->r_val; /* Return numeric code for shell multiline */
- }
-
- DBGPRINTF7(("RLOOKUP: NO match, returning 0\n"));
- return 0; /* Not a shell multiline */
-}
-
-static struct op *newtp(void)
-{
- struct op *t;
-
- t = (struct op *) tree(sizeof(*t));
- memset(t, 0, sizeof(*t));
-
- DBGPRINTF3(("NEWTP: allocated %p\n", t));
-
- return t;
-}
-
-static struct op *namelist(struct op *t)
-{
- DBGPRINTF7(("NAMELIST: enter, t=%p, type %s, iolist=%p\n", t,
- T_CMD_NAMES[t->op_type], iolist));
-
- if (iolist) {
- iolist = addword((char *) NULL, iolist);
- t->ioact = copyio();
- } else
- t->ioact = NULL;
-
- if (t->op_type != TCOM) {
- if (t->op_type != TPAREN && t->ioact != NULL) {
- t = block(TPAREN, t, NOBLOCK, NOWORDS);
- t->ioact = t->left->ioact;
- t->left->ioact = NULL;
- }
- return t;
- }
-
- word(NOWORD);
- t->op_words = copyw();
-
- return t;
-}
-
-static char **copyw(void)
-{
- char **wd;
-
- wd = getwords(wdlist);
- wdlist = NULL;
- return wd;
-}
-
-static void word(char *cp)
-{
- wdlist = addword(cp, wdlist);
-}
-
-static struct ioword **copyio(void)
-{
- struct ioword **iop;
-
- iop = (struct ioword **) getwords(iolist);
- iolist = NULL;
- return iop;
-}
-
-static struct ioword *io(int u, int f, char *cp)
-{
- struct ioword *iop;
-
- iop = (struct ioword *) tree(sizeof(*iop));
- iop->io_fd = u;
- iop->io_flag = f;
- iop->io_name = cp;
- iolist = addword((char *) iop, iolist);
- return iop;
-}
-
-static int yylex(int cf)
-{
- int c, c1;
- int atstart;
-
- c = peeksym;
- if (c > 0) {
- peeksym = 0;
- if (c == '\n')
- startl = 1;
- return c;
- }
-
- nlseen = 0;
- atstart = startl;
- startl = 0;
- yylval.i = 0;
- global_env.linep = line;
-
-/* MALAMO */
- line[LINELIM - 1] = '\0';
-
- loop:
- while ((c = my_getc(0)) == ' ' || c == '\t') /* Skip whitespace */
- continue;
-
- switch (c) {
- default:
- if (any(c, "0123456789")) {
- c1 = my_getc(0);
- unget(c1);
- if (c1 == '<' || c1 == '>') {
- iounit = c - '0';
- goto loop;
- }
- *global_env.linep++ = c;
- c = c1;
- }
- break;
-
- case '#': /* Comment, skip to next newline or End-of-string */
- while ((c = my_getc(0)) != '\0' && c != '\n')
- continue;
- unget(c);
- goto loop;
-
- case 0:
- DBGPRINTF5(("YYLEX: return 0, c=%d\n", c));
- return c;
-
- case '$':
- DBGPRINTF9(("YYLEX: found $\n"));
- *global_env.linep++ = c;
- c = my_getc(0);
- if (c == '{') {
- c = collect(c, '}');
- if (c != '\0')
- return c;
- goto pack;
- }
- break;
-
- case '`':
- case '\'':
- case '"':
- c = collect(c, c);
- if (c != '\0')
- return c;
- goto pack;
-
- case '|':
- case '&':
- case ';':
- startl = 1;
- /* If more chars process them, else return NULL char */
- c1 = dual(c);
- if (c1 != '\0')
- return c1;
- return c;
-
- case '^':
- startl = 1;
- return '|';
- case '>':
- case '<':
- diag(c);
- return c;
-
- case '\n':
- nlseen++;
- gethere();
- startl = 1;
- if (multiline || cf & CONTIN) {
- if (interactive && global_env.iop <= iostack) {
-#if ENABLE_FEATURE_EDITING
- current_prompt = cprompt->value;
-#else
- prs(cprompt->value);
-#endif
- }
- if (cf & CONTIN)
- goto loop;
- }
- return c;
-
- case '(':
- case ')':
- startl = 1;
- return c;
- }
-
- unget(c);
-
- pack:
- while ((c = my_getc(0)) != '\0' && !any(c, "`$ '\"\t;&<>()|^\n")) {
- if (global_env.linep >= elinep)
- err("word too long");
- else
- *global_env.linep++ = c;
- };
-
- unget(c);
-
- if (any(c, "\"'`$"))
- goto loop;
-
- *global_env.linep++ = '\0';
-
- if (atstart) {
- c = rlookup(line);
- if (c != 0) {
- startl = 1;
- return c;
- }
- }
-
- yylval.cp = strsave(line, areanum);
- return WORD;
-}
-
-
-static int collect(int c, int c1)
-{
- char s[2];
-
- DBGPRINTF8(("COLLECT: enter, c=%d, c1=%d\n", c, c1));
-
- *global_env.linep++ = c;
- while ((c = my_getc(c1)) != c1) {
- if (c == 0) {
- unget(c);
- s[0] = c1;
- s[1] = 0;
- prs("no closing ");
- yyerror(s);
- return YYERRCODE;
- }
- if (interactive && c == '\n' && global_env.iop <= iostack) {
-#if ENABLE_FEATURE_EDITING
- current_prompt = cprompt->value;
-#else
- prs(cprompt->value);
-#endif
- }
- *global_env.linep++ = c;
- }
-
- *global_env.linep++ = c;
-
- DBGPRINTF8(("COLLECT: return 0, line is %s\n", line));
-
- return 0;
-}
-
-/* "multiline commands" helper func */
-/* see if next 2 chars form a shell multiline */
-static int dual(int c)
-{
- char s[3];
- char *cp = s;
-
- DBGPRINTF8(("DUAL: enter, c=%d\n", c));
-
- *cp++ = c; /* c is the given "peek" char */
- *cp++ = my_getc(0); /* get next char of input */
- *cp = '\0'; /* add EOS marker */
-
- c = rlookup(s); /* see if 2 chars form a shell multiline */
- if (c == 0)
- unget(*--cp); /* String is not a shell multiline, put peek char back */
-
- return c; /* String is multiline, return numeric multiline (restab) code */
-}
-
-static void diag(int ec)
-{
- int c;
-
- DBGPRINTF8(("DIAG: enter, ec=%d\n", ec));
-
- c = my_getc(0);
- if (c == '>' || c == '<') {
- if (c != ec)
- zzerr();
- yylval.i = (ec == '>' ? IOWRITE | IOCAT : IOHERE);
- c = my_getc(0);
- } else
- yylval.i = (ec == '>' ? IOWRITE : IOREAD);
- if (c != '&' || yylval.i == IOHERE)
- unget(c);
- else
- yylval.i |= IODUP;
-}
-
-static char *tree(unsigned size)
-{
- char *t;
-
- t = getcell(size);
- if (t == NULL) {
- DBGPRINTF2(("TREE: getcell(%d) failed!\n", size));
- prs("command line too complicated\n");
- fail();
- /* NOTREACHED */
- }
- return t;
-}
-
-
-/* VARARGS1 */
-/* ARGSUSED */
-
-/* -------- exec.c -------- */
-
-static struct op **find1case(struct op *t, const char *w)
-{
- struct op *t1;
- struct op **tp;
- char **wp;
- char *cp;
-
- if (t == NULL) {
- DBGPRINTF3(("FIND1CASE: enter, t==NULL, returning.\n"));
- return NULL;
- }
-
- DBGPRINTF3(("FIND1CASE: enter, t->op_type=%d (%s)\n", t->op_type,
- T_CMD_NAMES[t->op_type]));
-
- if (t->op_type == TLIST) {
- tp = find1case(t->left, w);
- if (tp != NULL) {
- DBGPRINTF3(("FIND1CASE: found one to the left, returning tp=%p\n", tp));
- return tp;
- }
- t1 = t->right; /* TPAT */
- } else
- t1 = t;
-
- for (wp = t1->op_words; *wp;) {
- cp = evalstr(*wp++, DOSUB);
- if (cp && gmatch(w, cp)) {
- DBGPRINTF3(("FIND1CASE: returning &t1->left= %p.\n",
- &t1->left));
- return &t1->left;
- }
- }
-
- DBGPRINTF(("FIND1CASE: returning NULL\n"));
- return NULL;
-}
-
-static struct op *findcase(struct op *t, const char *w)
-{
- struct op **tp;
-
- tp = find1case(t, w);
- return tp != NULL ? *tp : NULL;
-}
-
-/*
- * execute tree
- */
-
-static int execute(struct op *t, int *pin, int *pout, int no_fork)
-{
- struct op *t1;
- volatile int i, rv, a;
- const char *cp;
- char **wp, **wp2;
- struct var *vp;
- struct op *outtree_save;
- struct brkcon bc;
-
-#if __GNUC__
- /* Avoid longjmp clobbering */
- (void) ℘
-#endif
-
- if (t == NULL) {
- DBGPRINTF4(("EXECUTE: enter, t==null, returning.\n"));
- return 0;
- }
-
- DBGPRINTF(("EXECUTE: t=%p, t->op_type=%d (%s), t->op_words is %s\n", t,
- t->op_type, T_CMD_NAMES[t->op_type],
- ((t->op_words == NULL) ? "NULL" : t->op_words[0])));
-
- rv = 0;
- a = areanum++;
- wp2 = t->op_words;
- wp = (wp2 != NULL)
- ? eval(wp2, t->op_type == TCOM ? DOALL : DOALL & ~DOKEY)
- : NULL;
-
- switch (t->op_type) {
- case TDOT:
- DBGPRINTF3(("EXECUTE: TDOT\n"));
-
- outtree_save = outtree;
-
- newfile(evalstr(t->op_words[0], DOALL));
-
- t->left = dowholefile(TLIST /*, 0*/);
- t->right = NULL;
-
- outtree = outtree_save;
-
- if (t->left)
- rv = execute(t->left, pin, pout, /* no_fork: */ 0);
- if (t->right)
- rv = execute(t->right, pin, pout, /* no_fork: */ 0);
- break;
-
- case TPAREN:
- rv = execute(t->left, pin, pout, /* no_fork: */ 0);
- break;
-
- case TCOM:
- rv = forkexec(t, pin, pout, no_fork, wp);
- break;
-
- case TPIPE:
- {
- int pv[2];
-
- rv = openpipe(pv);
- if (rv < 0)
- break;
- pv[0] = remap(pv[0]);
- pv[1] = remap(pv[1]);
- (void) execute(t->left, pin, pv, /* no_fork: */ 0);
- rv = execute(t->right, pv, pout, /* no_fork: */ 0);
- }
- break;
-
- case TLIST:
- (void) execute(t->left, pin, pout, /* no_fork: */ 0);
- rv = execute(t->right, pin, pout, /* no_fork: */ 0);
- break;
-
- case TASYNC:
- {
- smallint hinteractive = interactive;
-
- DBGPRINTF7(("EXECUTE: TASYNC clause, calling vfork()...\n"));
-
- i = vfork();
- if (i == 0) { /* child */
- signal(SIGINT, SIG_IGN);
- signal(SIGQUIT, SIG_IGN);
- if (interactive)
- signal(SIGTERM, SIG_DFL);
- interactive = 0;
- if (pin == NULL) {
- close(0);
- xopen(bb_dev_null, O_RDONLY);
- }
- _exit(execute(t->left, pin, pout, /* no_fork: */ 1));
- }
- interactive = hinteractive;
- if (i != -1) {
- setval(lookup("!"), putn(i));
- closepipe(pin);
- if (interactive) {
- prs(putn(i));
- prs("\n");
- }
- } else
- rv = -1;
- setstatus(rv);
- }
- break;
-
- case TOR:
- case TAND:
- rv = execute(t->left, pin, pout, /* no_fork: */ 0);
- t1 = t->right;
- if (t1 != NULL && (rv == 0) == (t->op_type == TAND))
- rv = execute(t1, pin, pout, /* no_fork: */ 0);
- break;
-
- case TFOR:
- if (wp == NULL) {
- wp = dolv + 1;
- i = dolc;
- if (i < 0)
- i = 0;
- } else {
- i = -1;
- while (*wp++ != NULL)
- continue;
- }
- vp = lookup(t->str);
- while (setjmp(bc.brkpt))
- if (isbreak)
- goto broken;
- brkset(&bc);
- for (t1 = t->left; i-- && *wp != NULL;) {
- setval(vp, *wp++);
- rv = execute(t1, pin, pout, /* no_fork: */ 0);
- }
- brklist = brklist->nextlev;
- break;
-
- case TWHILE:
- case TUNTIL:
- while (setjmp(bc.brkpt))
- if (isbreak)
- goto broken;
- brkset(&bc);
- t1 = t->left;
- while ((execute(t1, pin, pout, /* no_fork: */ 0) == 0) == (t->op_type == TWHILE))
- rv = execute(t->right, pin, pout, /* no_fork: */ 0);
- brklist = brklist->nextlev;
- break;
-
- case TIF:
- case TELIF:
- if (t->right != NULL) {
- rv = !execute(t->left, pin, pout, /* no_fork: */ 0) ?
- execute(t->right->left, pin, pout, /* no_fork: */ 0) :
- execute(t->right->right, pin, pout, /* no_fork: */ 0);
- }
- break;
-
- case TCASE:
- cp = evalstr(t->str, DOSUB | DOTRIM);
- if (cp == NULL)
- cp = "";
-
- DBGPRINTF7(("EXECUTE: TCASE, t->str is %s, cp is %s\n",
- ((t->str == NULL) ? "NULL" : t->str),
- ((cp == NULL) ? "NULL" : cp)));
-
- t1 = findcase(t->left, cp);
- if (t1 != NULL) {
- DBGPRINTF7(("EXECUTE: TCASE, calling execute(t=%p, t1=%p)...\n", t, t1));
- rv = execute(t1, pin, pout, /* no_fork: */ 0);
- DBGPRINTF7(("EXECUTE: TCASE, back from execute(t=%p, t1=%p)...\n", t, t1));
- }
- break;
-
- case TBRACE:
-/*
- iopp = t->ioact;
- if (i)
- while (*iopp)
- if (iosetup(*iopp++, pin!=NULL, pout!=NULL)) {
- rv = -1;
- break;
- }
-*/
- if (rv >= 0) {
- t1 = t->left;
- if (t1) {
- rv = execute(t1, pin, pout, /* no_fork: */ 0);
- }
- }
- break;
-
- };
-
- broken:
-// Restoring op_words is most likely not needed now: see comment in forkexec()
-// (also take a look at exec builtin (doexec) - it touches t->op_words)
- t->op_words = wp2;
- isbreak = 0;
- freehere(areanum);
- freearea(areanum);
- areanum = a;
- if (interactive && intr) {
- closeall();
- fail();
- }
-
- i = trapset;
- if (i != 0) {
- trapset = 0;
- runtrap(i);
- }
-
- DBGPRINTF(("EXECUTE: returning from t=%p, rv=%d\n", t, rv));
- return rv;
-}
-
-static builtin_func_ptr inbuilt(const char *s)
-{
- const struct builtincmd *bp;
-
- for (bp = builtincmds; bp->name; bp++)
- if (strcmp(bp->name, s) == 0)
- return bp->builtinfunc;
- return NULL;
-}
-
-static int forkexec(struct op *t, int *pin, int *pout, int no_fork, char **wp)
-{
- pid_t newpid;
- int i;
- builtin_func_ptr bltin = NULL;
- const char *bltin_name = NULL;
- const char *cp;
- struct ioword **iopp;
- int resetsig;
- char **owp;
- int forked;
-
- int *hpin = pin;
- int *hpout = pout;
- char *hwp;
- smallint hinteractive;
- smallint hintr;
- smallint hexecflg;
- struct brkcon *hbrklist;
-
-#if __GNUC__
- /* Avoid longjmp clobbering */
- (void) &pin;
- (void) &pout;
- (void) ℘
- (void) &bltin;
- (void) &cp;
- (void) &resetsig;
- (void) &owp;
-#endif
-
- DBGPRINTF(("FORKEXEC: t=%p, pin %p, pout %p, no_fork %d\n", t, pin,
- pout, no_fork));
- DBGPRINTF7(("FORKEXEC: t->op_words is %s\n",
- ((t->op_words == NULL) ? "NULL" : t->op_words[0])));
- owp = wp;
- resetsig = 0;
- if (t->op_type == TCOM) {
- while (*wp++ != NULL)
- continue;
- cp = *wp;
-
- /* strip all initial assignments */
- /* FIXME: not correct wrt PATH=yyy command etc */
- if (FLAG['x']) {
- DBGPRINTF9(("FORKEXEC: echo'ing, cp=%p, wp=%p, owp=%p\n",
- cp, wp, owp));
- echo(cp ? wp : owp);
- }
-
- if (cp == NULL) {
- if (t->ioact == NULL) {
- while ((cp = *owp++) != NULL && assign(cp, COPYV))
- continue;
- DBGPRINTF(("FORKEXEC: returning setstatus(0)\n"));
- return setstatus(0);
- }
- } else { /* cp != NULL */
- bltin_name = cp;
- bltin = inbuilt(cp);
- }
- }
-
- forked = 0;
- // We were pointing t->op_words to temporary (expanded) arg list:
- // t->op_words = wp;
- // and restored it later (in execute()), but "break"
- // longjmps away (at "Run builtin" below), leaving t->op_words clobbered!
- // See http://bugs.busybox.net/view.php?id=846.
- // Now we do not touch t->op_words, but separately pass wp as param list
- // to builtins
- DBGPRINTF(("FORKEXEC: bltin %p, no_fork %d, owp %p\n", bltin,
- no_fork, owp));
- /* Don't fork if it is a lone builtin (not in pipe)
- * OR we are told to _not_ fork */
- if ((!bltin || pin || pout) /* not lone bltin AND */
- && !no_fork /* not told to avoid fork */
- ) {
- /* Save values in case child alters them after vfork */
- hpin = pin;
- hpout = pout;
- hwp = *wp;
- hinteractive = interactive;
- hintr = intr;
- hbrklist = brklist;
- hexecflg = execflg;
-
- DBGPRINTF3(("FORKEXEC: calling vfork()...\n"));
- newpid = vfork();
- if (newpid == -1) {
- DBGPRINTF(("FORKEXEC: ERROR, cannot vfork()!\n"));
- return -1;
- }
-
- if (newpid > 0) { /* Parent */
- /* Restore values */
- pin = hpin;
- pout = hpout;
- *wp = hwp;
- interactive = hinteractive;
- intr = hintr;
- brklist = hbrklist;
- execflg = hexecflg;
-
- closepipe(pin);
- return (pout == NULL ? setstatus(waitfor(newpid, 0)) : 0);
- }
-
- /* Child */
- DBGPRINTF(("FORKEXEC: child process, bltin=%p (%s)\n", bltin, bltin_name));
- if (interactive) {
- signal(SIGINT, SIG_IGN);
- signal(SIGQUIT, SIG_IGN);
- resetsig = 1;
- }
- interactive = 0;
- intr = 0;
- forked = 1;
- brklist = 0;
- execflg = 0;
- }
-
- if (owp)
- while ((cp = *owp++) != NULL && assign(cp, COPYV))
- if (!bltin)
- export(lookup(cp));
-
- if (pin) { /* NB: close _first_, then move fds! */
- close(pin[1]);
- xmove_fd(pin[0], 0);
- }
- if (pout) {
- close(pout[0]);
- xmove_fd(pout[1], 1);
- }
-
- iopp = t->ioact;
- if (iopp) {
- if (bltin && bltin != doexec) {
- prs(bltin_name);
- err(": cannot redirect shell command");
- if (forked)
- _exit(-1);
- return -1;
- }
- while (*iopp) {
- if (iosetup(*iopp++, pin != NULL, pout != NULL)) {
- /* system-detected error */
- if (forked)
- _exit(-1);
- return -1;
- }
- }
- }
-
- if (bltin) {
- if (forked || pin || pout) {
- /* Builtin in pipe: disallowed */
- /* TODO: allow "exec"? */
- prs(bltin_name);
- err(": cannot run builtin as part of pipe");
- if (forked)
- _exit(-1);
- return -1;
- }
- /* Run builtin */
- i = setstatus(bltin(t, wp));
- if (forked)
- _exit(i);
- DBGPRINTF(("FORKEXEC: returning i=%d\n", i));
- return i;
- }
-
- /* should use FIOCEXCL */
- for (i = FDBASE; i < NOFILE; i++)
- close(i);
- if (resetsig) {
- signal(SIGINT, SIG_DFL);
- signal(SIGQUIT, SIG_DFL);
- }
-
- if (t->op_type == TPAREN)
- _exit(execute(t->left, NOPIPE, NOPIPE, /* no_fork: */ 1));
- if (wp[0] == NULL)
- _exit(0);
-
- cp = rexecve(wp[0], wp, makenv(0, NULL));
- prs(wp[0]);
- prs(": ");
- err(cp);
- if (!execflg)
- trap[0] = NULL;
-
- DBGPRINTF(("FORKEXEC: calling leave(), pid=%d\n", getpid()));
-
- leave();
- /* NOTREACHED */
- return 0;
-}
-
-/*
- * 0< 1> are ignored as required
- * within pipelines.
- */
-static int iosetup(struct ioword *iop, int pipein, int pipeout)
-{
- int u = -1;
- char *cp = NULL;
- const char *msg;
-
- DBGPRINTF(("IOSETUP: iop %p, pipein %i, pipeout %i\n", iop,
- pipein, pipeout));
-
- if (iop->io_fd == IODEFAULT) /* take default */
- iop->io_fd = iop->io_flag & (IOREAD | IOHERE) ? 0 : 1;
-
- if (pipein && iop->io_fd == 0)
- return 0;
-
- if (pipeout && iop->io_fd == 1)
- return 0;
-
- msg = iop->io_flag & (IOREAD | IOHERE) ? "open" : "create";
- if ((iop->io_flag & IOHERE) == 0) {
- cp = iop->io_name; /* huh?? */
- cp = evalstr(cp, DOSUB | DOTRIM);
- if (cp == NULL)
- return 1;
- }
-
- if (iop->io_flag & IODUP) {
- if (cp[1] || (!isdigit(*cp) && *cp != '-')) {
- prs(cp);
- err(": illegal >& argument");
- return 1;
- }
- if (*cp == '-')
- iop->io_flag = IOCLOSE;
- iop->io_flag &= ~(IOREAD | IOWRITE);
- }
-
- switch (iop->io_flag) {
- case IOREAD:
- u = open(cp, O_RDONLY);
- break;
-
- case IOHERE:
- case IOHERE | IOXHERE:
- u = herein(iop->io_name, iop->io_flag & IOXHERE);
- cp = (char*)"here file";
- break;
-
- case IOWRITE | IOCAT:
- u = open(cp, O_WRONLY);
- if (u >= 0) {
- lseek(u, (long) 0, SEEK_END);
- break;
- }
- /* fall through to creation if >>file doesn't exist */
-
- case IOWRITE:
- u = creat(cp, 0666);
- break;
-
- case IODUP:
- u = dup2(*cp - '0', iop->io_fd);
- break;
-
- case IOCLOSE:
- close(iop->io_fd);
- return 0;
- }
-
- if (u < 0) {
- prs(cp);
- prs(": cannot ");
- warn(msg);
- return 1;
- }
- xmove_fd(u, iop->io_fd);
- return 0;
-}
-
-/*
- * Enter a new loop level (marked for break/continue).
- */
-static void brkset(struct brkcon *bc)
-{
- bc->nextlev = brklist;
- brklist = bc;
-}
-
-/*
- * Wait for the last process created.
- * Print a message for each process found
- * that was killed by a signal.
- * Ignore interrupt signals while waiting
- * unless `canintr' is true.
- */
-static int waitfor(int lastpid, int canintr)
-{
- int pid, rv;
- int s;
- smallint oheedint = heedint;
-
- heedint = 0;
- rv = 0;
- do {
- pid = wait(&s);
- if (pid == -1) {
- if (errno != EINTR || canintr)
- break;
- } else {
- rv = WAITSIG(s);
- if (rv != 0) {
- if (rv < ARRAY_SIZE(signame)) {
- if (signame[rv] != NULL) {
- if (pid != lastpid) {
- prn(pid);
- prs(": ");
- }
- prs(signame[rv]);
- }
- } else {
- if (pid != lastpid) {
- prn(pid);
- prs(": ");
- }
- prs("Signal ");
- prn(rv);
- prs(" ");
- }
- if (WAITCORE(s))
- prs(" - core dumped");
- if (rv >= ARRAY_SIZE(signame) || signame[rv])
- prs("\n");
- rv = -1;
- } else
- rv = WAITVAL(s);
- }
- } while (pid != lastpid);
- heedint = oheedint;
- if (intr) {
- if (interactive) {
- if (canintr)
- intr = 0;
- } else {
- if (exstat == 0)
- exstat = rv;
- onintr(0);
- }
- }
- return rv;
-}
-
-static int setstatus(int s)
-{
- exstat = s;
- setval(lookup("?"), putn(s));
- return s;
-}
-
-/*
- * PATH-searching interface to execve.
- * If getenv("PATH") were kept up-to-date,
- * execvp might be used.
- */
-static const char *rexecve(char *c, char **v, char **envp)
-{
- const char *sp;
- char *tp;
- int asis = 0;
- char *name = c;
-
- if (ENABLE_FEATURE_SH_STANDALONE) {
- if (find_applet_by_name(name) >= 0) {
- /* We have to exec here since we vforked. Running
- * run_applet_and_exit() won't work and bad things
- * will happen. */
- execve(bb_busybox_exec_path, v, envp);
- }
- }
-
- DBGPRINTF(("REXECVE: c=%p, v=%p, envp=%p\n", c, v, envp));
-
- sp = any('/', c) ? "" : path->value;
- asis = (*sp == '\0');
- while (asis || *sp != '\0') {
- asis = 0;
- tp = global_env.linep;
- for (; *sp != '\0'; tp++) {
- *tp = *sp++;
- if (*tp == ':') {
- asis = (*sp == '\0');
- break;
- }
- }
- if (tp != global_env.linep)
- *tp++ = '/';
- strcpy(tp, c);
- //for (i = 0; (*tp++ = c[i++]) != '\0';)
- // continue;
-
- DBGPRINTF3(("REXECVE: global_env.linep is %s\n", global_env.linep));
-
- execve(global_env.linep, v, envp);
-
- switch (errno) {
- case ENOEXEC:
- *v = global_env.linep;
- v--;
- tp = *v;
- *v = global_env.linep;
- execve(DEFAULT_SHELL, v, envp);
- *v = tp;
- return "no shell";
-
- case ENOMEM:
- return (char *) bb_msg_memory_exhausted;
-
- case E2BIG:
- return "argument list too long";
- }
- }
- return errno == ENOENT ? "not found" : "cannot execute";
-}
-
-/*
- * Run the command produced by generator `f'
- * applied to stream `arg'.
- */
-static int run(struct ioarg *argp, int (*f) (struct ioarg *))
-{
- struct op *otree;
- struct wdblock *swdlist;
- struct wdblock *siolist;
- jmp_buf ev, rt;
- xint *ofail;
- int rv;
-
-#if __GNUC__
- /* Avoid longjmp clobbering */
- (void) &rv;
-#endif
-
- DBGPRINTF(("RUN: enter, areanum %d, outtree %p, failpt %p\n",
- areanum, outtree, failpt));
-
- areanum++;
- swdlist = wdlist;
- siolist = iolist;
- otree = outtree;
- ofail = failpt;
- rv = -1;
-
- errpt = ev;
- if (newenv(setjmp(errpt)) == 0) {
- wdlist = NULL;
- iolist = NULL;
- pushio(argp, f);
- global_env.iobase = global_env.iop;
- yynerrs = 0;
- failpt = rt;
- if (setjmp(failpt) == 0 && yyparse() == 0)
- rv = execute(outtree, NOPIPE, NOPIPE, /* no_fork: */ 0);
- quitenv();
- } else {
- DBGPRINTF(("RUN: error from newenv()!\n"));
- }
-
- wdlist = swdlist;
- iolist = siolist;
- failpt = ofail;
- outtree = otree;
- freearea(areanum--);
-
- return rv;
-}
-
-/* -------- do.c -------- */
-
-/*
- * built-in commands: doX
- */
-
-static int dohelp(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED)
-{
- int col;
- const struct builtincmd *x;
-
- puts("\nBuilt-in commands:\n"
- "-------------------");
-
- col = 0;
- x = builtincmds;
- while (x->name) {
- col += printf("%c%s", ((col == 0) ? '\t' : ' '), x->name);
- if (col > 60) {
- bb_putchar('\n');
- col = 0;
- }
- x++;
- }
-#if ENABLE_FEATURE_SH_STANDALONE
- {
- const char *applet = applet_names;
-
- while (*applet) {
- col += printf("%c%s", ((col == 0) ? '\t' : ' '), applet);
- if (col > 60) {
- bb_putchar('\n');
- col = 0;
- }
- applet += strlen(applet) + 1;
- }
- }
-#endif
- puts("\n");
- return EXIT_SUCCESS;
-}
-
-static int dolabel(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED)
-{
- return 0;
-}
-
-static int dochdir(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- const char *cp, *er;
-
- cp = args[1];
- if (cp == NULL) {
- cp = homedir->value;
- if (cp != NULL)
- goto do_cd;
- er = ": no home directory";
- } else {
- do_cd:
- if (chdir(cp) >= 0)
- return 0;
- er = ": bad directory";
- }
- prs(cp != NULL ? cp : "cd");
- err(er);
- return 1;
-}
-
-static int doshift(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- int n;
-
- n = args[1] ? getn(args[1]) : 1;
- if (dolc < n) {
- err("nothing to shift");
- return 1;
- }
- dolv[n] = dolv[0];
- dolv += n;
- dolc -= n;
- setval(lookup("#"), putn(dolc));
- return 0;
-}
-
-/*
- * execute login and newgrp directly
- */
-static int dologin(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- const char *cp;
-
- if (interactive) {
- signal(SIGINT, SIG_DFL);
- signal(SIGQUIT, SIG_DFL);
- }
- cp = rexecve(args[0], args, makenv(0, NULL));
- prs(args[0]);
- prs(": ");
- err(cp);
- return 1;
-}
-
-static int doumask(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- int i;
- char *cp;
-
- cp = args[1];
- if (cp == NULL) {
- i = umask(0);
- umask(i);
- printf("%04o\n", i);
- } else {
- i = bb_strtou(cp, NULL, 8);
- if (errno) {
- err("umask: bad octal number");
- return 1;
- }
- umask(i);
- }
- return 0;
-}
-
-static int doexec(struct op *t, char **args)
-{
- jmp_buf ex;
- xint *ofail;
- char **sv_words;
-
- t->ioact = NULL;
- if (!args[1])
- return 1;
-
- execflg = 1;
- ofail = failpt;
- failpt = ex;
-
- sv_words = t->op_words;
- t->op_words = args + 1;
-// TODO: test what will happen with "exec break" -
-// will it leave t->op_words pointing to garbage?
-// (see http://bugs.busybox.net/view.php?id=846)
- if (setjmp(failpt) == 0)
- execute(t, NOPIPE, NOPIPE, /* no_fork: */ 1);
- t->op_words = sv_words;
-
- failpt = ofail;
- execflg = 0;
-
- return 1;
-}
-
-static int dodot(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- int i;
- const char *sp;
- char *tp;
- char *cp;
- int maltmp;
-
- DBGPRINTF(("DODOT: enter, t=%p, tleft %p, tright %p, global_env.linep is %s\n",
- t, t->left, t->right, ((global_env.linep == NULL) ? "NULL" : global_env.linep)));
-
- cp = args[1];
- if (cp == NULL) {
- DBGPRINTF(("DODOT: bad args, ret 0\n"));
- return 0;
- }
- DBGPRINTF(("DODOT: cp is %s\n", cp));
-
- sp = any('/', cp) ? ":" : path->value;
-
- DBGPRINTF(("DODOT: sp is %s, global_env.linep is %s\n",
- ((sp == NULL) ? "NULL" : sp),
- ((global_env.linep == NULL) ? "NULL" : global_env.linep)));
-
- while (*sp) {
- tp = global_env.linep;
- while (*sp && (*tp = *sp++) != ':')
- tp++;
- if (tp != global_env.linep)
- *tp++ = '/';
- strcpy(tp, cp);
-
- /* Original code */
- i = open(global_env.linep, O_RDONLY);
- if (i >= 0) {
- exstat = 0;
- maltmp = remap(i);
- DBGPRINTF(("DODOT: remap=%d, exstat=%d, global_env.iofd %d, i %d, global_env.linep is %s\n",
- maltmp, exstat, global_env.iofd, i, global_env.linep));
-
- next(maltmp); /* Basically a PUSHIO */
-
- DBGPRINTF(("DODOT: returning exstat=%d\n", exstat));
-
- return exstat;
- }
- } /* while */
-
- prs(cp);
- err(": not found");
-
- return -1;
-}
-
-static int dowait(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- int i;
- char *cp;
-
- cp = args[1];
- if (cp != NULL) {
- i = getn(cp);
- if (i == 0)
- return 0;
- } else
- i = -1;
- setstatus(waitfor(i, 1));
- return 0;
-}
-
-static int doread(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- char *cp, **wp;
- int nb = 0;
- int nl = 0;
-
- if (args[1] == NULL) {
- err("Usage: read name ...");
- return 1;
- }
- for (wp = args + 1; *wp; wp++) {
- for (cp = global_env.linep; !nl && cp < elinep - 1; cp++) {
- nb = nonblock_safe_read(0, cp, sizeof(*cp));
- if (nb != sizeof(*cp))
- break;
- nl = (*cp == '\n');
- if (nl || (wp[1] && any(*cp, ifs->value)))
- break;
- }
- *cp = '\0';
- if (nb <= 0)
- break;
- setval(lookup(*wp), global_env.linep);
- }
- return nb <= 0;
-}
-
-static int doeval(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- return RUN(awordlist, args + 1, wdchar);
-}
-
-static int dotrap(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- int n, i;
- int resetsig;
-
- if (args[1] == NULL) {
- for (i = 0; i <= _NSIG; i++)
- if (trap[i]) {
- prn(i);
- prs(": ");
- prs(trap[i]);
- prs("\n");
- }
- return 0;
- }
- resetsig = isdigit(args[1][0]);
- for (i = resetsig ? 1 : 2; args[i] != NULL; ++i) {
- n = getsig(args[i]);
- freecell(trap[n]);
- trap[n] = 0;
- if (!resetsig) {
- if (args[1][0] != '\0') {
- trap[n] = strsave(args[1], 0);
- setsig(n, sig);
- } else
- setsig(n, SIG_IGN);
- } else {
- if (interactive) {
- if (n == SIGINT)
- setsig(n, onintr);
- else
- setsig(n, n == SIGQUIT ? SIG_IGN : SIG_DFL);
- } else
- setsig(n, SIG_DFL);
- }
- }
- return 0;
-}
-
-static int getsig(char *s)
-{
- int n;
-
- n = getn(s);
- if (n < 0 || n > _NSIG) {
- err("trap: bad signal number");
- n = 0;
- }
- return n;
-}
-
-static void setsig(int n, sighandler_t f)
-{
- if (n == 0)
- return;
- if (signal(n, SIG_IGN) != SIG_IGN || ourtrap[n]) {
- ourtrap[n] = 1;
- signal(n, f);
- }
-}
-
-static int getn(char *as)
-{
- char *s;
- int n, m;
-
- s = as;
- m = 1;
- if (*s == '-') {
- m = -1;
- s++;
- }
- for (n = 0; isdigit(*s); s++)
- n = (n * 10) + (*s - '0');
- if (*s) {
- prs(as);
- err(": bad number");
- }
- return n * m;
-}
-
-static int dobreak(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- return brkcontin(args[1], 1);
-}
-
-static int docontinue(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- return brkcontin(args[1], 0);
-}
-
-static int brkcontin(char *cp, int val)
-{
- struct brkcon *bc;
- int nl;
-
- nl = cp == NULL ? 1 : getn(cp);
- if (nl <= 0)
- nl = 999;
- do {
- bc = brklist;
- if (bc == NULL)
- break;
- brklist = bc->nextlev;
- } while (--nl);
- if (nl) {
- err("bad break/continue level");
- return 1;
- }
- isbreak = (val != 0);
- longjmp(bc->brkpt, 1);
- /* NOTREACHED */
-}
-
-static int doexit(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- char *cp;
-
- execflg = 0;
- cp = args[1];
- if (cp != NULL)
- setstatus(getn(cp));
-
- DBGPRINTF(("DOEXIT: calling leave(), t=%p\n", t));
-
- leave();
- /* NOTREACHED */
- return 0;
-}
-
-static int doexport(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- rdexp(args + 1, export, EXPORT);
- return 0;
-}
-
-static int doreadonly(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- rdexp(args + 1, ronly, RONLY);
- return 0;
-}
-
-static void rdexp(char **wp, void (*f) (struct var *), int key)
-{
- DBGPRINTF6(("RDEXP: enter, wp=%p, func=%p, key=%d\n", wp, f, key));
- DBGPRINTF6(("RDEXP: *wp=%s\n", *wp));
-
- if (*wp != NULL) {
- for (; *wp != NULL; wp++) {
- if (isassign(*wp)) {
- char *cp;
-
- assign(*wp, COPYV);
- for (cp = *wp; *cp != '='; cp++)
- continue;
- *cp = '\0';
- }
- if (checkname(*wp))
- (*f) (lookup(*wp));
- else
- badid(*wp);
- }
- } else
- putvlist(key, 1);
-}
-
-static void badid(char *s)
-{
- prs(s);
- err(": bad identifier");
-}
-
-static int doset(struct op *t ATTRIBUTE_UNUSED, char **args)
-{
- struct var *vp;
- char *cp;
- int n;
-
- cp = args[1];
- if (cp == NULL) {
- for (vp = vlist; vp; vp = vp->next)
- varput(vp->name, 1);
- return 0;
- }
- if (*cp == '-') {
- args++;
- if (*++cp == 0)
- FLAG['x'] = FLAG['v'] = 0;
- else {
- for (; *cp; cp++) {
- switch (*cp) {
- case 'e':
- if (!interactive)
- FLAG['e']++;
- break;
-
- default:
- if (*cp >= 'a' && *cp <= 'z')
- FLAG[(int) *cp]++;
- break;
- }
- }
- }
- setdash();
- }
- if (args[1]) {
- args[0] = dolv[0];
- for (n = 1; args[n]; n++)
- setarea((char *) args[n], 0);
- dolc = n - 1;
- dolv = args;
- setval(lookup("#"), putn(dolc));
- setarea((char *) (dolv - 1), 0);
- }
- return 0;
-}
-
-static void varput(char *s, int out)
-{
- if (isalnum(*s) || *s == '_') {
- write(out, s, strlen(s));
- write(out, "\n", 1);
- }
-}
-
-
-/*
- * Copyright (c) 1999 Herbert Xu <herbert@debian.org>
- * This file contains code for the times builtin.
- */
-static void times_fmt(char *buf, clock_t val, unsigned clk_tck)
-{
- unsigned min, sec;
- if (sizeof(val) > sizeof(int))
- sec = ((unsigned long)val) / clk_tck;
- else
- sec = ((unsigned)val) / clk_tck;
- min = sec / 60;
-#if ENABLE_DESKTOP
- sprintf(buf, "%um%u.%03us", min, (sec - min * 60),
- /* msec: */ ((unsigned)(val - (clock_t)sec * clk_tck)) * 1000 / clk_tck
- );
-#else
- sprintf(buf, "%um%us", min, (sec - min * 60));
-#endif
-}
-
-static int dotimes(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED)
-{
- struct tms buf;
- unsigned clk_tck = sysconf(_SC_CLK_TCK);
- /* How much do we need for "NmN.NNNs" ? */
- enum { TIMEBUF_SIZE = sizeof(int)*3 + sizeof(int)*3 + 6 };
- char u[TIMEBUF_SIZE], s[TIMEBUF_SIZE];
- char cu[TIMEBUF_SIZE], cs[TIMEBUF_SIZE];
-
- times(&buf);
-
- times_fmt(u, buf.tms_utime, clk_tck);
- times_fmt(s, buf.tms_stime, clk_tck);
- times_fmt(cu, buf.tms_cutime, clk_tck);
- times_fmt(cs, buf.tms_cstime, clk_tck);
-
- printf("%s %s\n%s %s\n", u, s, cu, cs);
- return 0;
-}
-
-
-/* -------- eval.c -------- */
-
-/*
- * ${}
- * `command`
- * blank interpretation
- * quoting
- * glob
- */
-
-static char **eval(char **ap, int f)
-{
- struct wdblock *wb;
- char **wp;
- char **wf;
- jmp_buf ev;
-
-#if __GNUC__
- /* Avoid longjmp clobbering */
- (void) ℘
- (void) ≈
-#endif
-
- DBGPRINTF4(("EVAL: enter, f=%d\n", f));
-
- wp = NULL;
- wb = NULL;
- wf = NULL;
- errpt = ev;
- if (newenv(setjmp(errpt)) == 0) {
- while (*ap && isassign(*ap))
- expand(*ap++, &wb, f & ~DOGLOB);
- if (FLAG['k']) {
- for (wf = ap; *wf; wf++) {
- if (isassign(*wf))
- expand(*wf, &wb, f & ~DOGLOB);
- }
- }
- for (wb = addword((char *) NULL, wb); *ap; ap++) {
- if (!FLAG['k'] || !isassign(*ap))
- expand(*ap, &wb, f & ~DOKEY);
- }
- wb = addword((char *) 0, wb);
- wp = getwords(wb);
- quitenv();
- } else
- gflg = 1;
-
- return gflg ? (char **) NULL : wp;
-}
-
-
-/*
- * Make the exported environment from the exported
- * names in the dictionary. Keyword assignments
- * will already have been done.
- */
-static char **makenv(int all, struct wdblock *wb)
-{
- struct var *vp;
-
- DBGPRINTF5(("MAKENV: enter, all=%d\n", all));
-
- for (vp = vlist; vp; vp = vp->next)
- if (all || vp->status & EXPORT)
- wb = addword(vp->name, wb);
- wb = addword((char *) 0, wb);
- return getwords(wb);
-}
-
-static int expand(const char *cp, struct wdblock **wbp, int f)
-{
- jmp_buf ev;
- char *xp;
-
-#if __GNUC__
- /* Avoid longjmp clobbering */
- (void) &cp;
-#endif
-
- DBGPRINTF3(("EXPAND: enter, f=%d\n", f));
-
- gflg = 0;
-
- if (cp == NULL)
- return 0;
-
- if (!anys("$`'\"", cp) && !anys(ifs->value, cp)
- && ((f & DOGLOB) == 0 || !anys("[*?", cp))
- ) {
- xp = strsave(cp, areanum);
- if (f & DOTRIM)
- unquote(xp);
- *wbp = addword(xp, *wbp);
- return 1;
- }
- errpt = ev;
- if (newenv(setjmp(errpt)) == 0) {
- PUSHIO(aword, cp, strchar);
- global_env.iobase = global_env.iop;
- while ((xp = blank(f)) && gflg == 0) {
- global_env.linep = xp;
- xp = strsave(xp, areanum);
- if ((f & DOGLOB) == 0) {
- if (f & DOTRIM)
- unquote(xp);
- *wbp = addword(xp, *wbp);
- } else
- *wbp = glob(xp, *wbp);
- }
- quitenv();
- } else
- gflg = 1;
- return gflg == 0;
-}
-
-static char *evalstr(char *cp, int f)
-{
- struct wdblock *wb;
-
- DBGPRINTF6(("EVALSTR: enter, cp=%p, f=%d\n", cp, f));
-
- wb = NULL;
- if (expand(cp, &wb, f)) {
- if (wb == NULL || wb->w_nword == 0
- || (cp = wb->w_words[0]) == NULL
- ) {
-// TODO: I suspect that
-// char *evalstr(char *cp, int f) is actually
-// const char *evalstr(const char *cp, int f)!
- cp = (char*)"";
- }
- DELETE(wb);
- } else
- cp = NULL;
- return cp;
-}
-
-
-/*
- * Blank interpretation and quoting
- */
-static char *blank(int f)
-{
- int c, c1;
- char *sp;
- int scanequals, foundequals;
-
- DBGPRINTF3(("BLANK: enter, f=%d\n", f));
-
- sp = global_env.linep;
- scanequals = f & DOKEY;
- foundequals = 0;
-
- loop:
- c = subgetc('"', foundequals);
- switch (c) {
- case 0:
- if (sp == global_env.linep)
- return 0;
- *global_env.linep++ = 0;
- return sp;
-
- default:
- if (f & DOBLANK && any(c, ifs->value))
- goto loop;
- break;
-
- case '"':
- case '\'':
- scanequals = 0;
- if (INSUB())
- break;
- for (c1 = c; (c = subgetc(c1, 1)) != c1;) {
- if (c == 0)
- break;
- if (c == '\'' || !any(c, "$`\""))
- c |= QUOTE;
- *global_env.linep++ = c;
- }
- c = 0;
- }
- unget(c);
- if (!isalpha(c) && c != '_')
- scanequals = 0;
- for (;;) {
- c = subgetc('"', foundequals);
- if (c == 0 ||
- f & (DOBLANK && any(c, ifs->value)) ||
- (!INSUB() && any(c, "\"'"))) {
- scanequals = 0;
- unget(c);
- if (any(c, "\"'"))
- goto loop;
- break;
- }
- if (scanequals) {
- if (c == '=') {
- foundequals = 1;
- scanequals = 0;
- } else if (!isalnum(c) && c != '_')
- scanequals = 0;
- }
- *global_env.linep++ = c;
- }
- *global_env.linep++ = 0;
- return sp;
-}
-
-/*
- * Get characters, substituting for ` and $
- */
-static int subgetc(char ec, int quoted)
-{
- char c;
-
- DBGPRINTF3(("SUBGETC: enter, quoted=%d\n", quoted));
-
- again:
- c = my_getc(ec);
- if (!INSUB() && ec != '\'') {
- if (c == '`') {
- if (grave(quoted) == 0)
- return 0;
- global_env.iop->task = XGRAVE;
- goto again;
- }
- if (c == '$') {
- c = dollar(quoted);
- if (c == 0) {
- global_env.iop->task = XDOLL;
- goto again;
- }
- }
- }
- return c;
-}
-
-/*
- * Prepare to generate the string returned by ${} substitution.
- */
-static int dollar(int quoted)
-{
- int otask;
- struct io *oiop;
- char *dolp;
- char *s, c, *cp = NULL;
- struct var *vp;
-
- DBGPRINTF3(("DOLLAR: enter, quoted=%d\n", quoted));
-
- c = readc();
- s = global_env.linep;
- if (c != '{') {
- *global_env.linep++ = c;
- if (isalpha(c) || c == '_') {
- while ((c = readc()) != 0 && (isalnum(c) || c == '_'))
- if (global_env.linep < elinep)
- *global_env.linep++ = c;
- unget(c);
- }
- c = 0;
- } else {
- oiop = global_env.iop;
- otask = global_env.iop->task;
-
- global_env.iop->task = XOTHER;
- while ((c = subgetc('"', 0)) != 0 && c != '}' && c != '\n')
- if (global_env.linep < elinep)
- *global_env.linep++ = c;
- if (oiop == global_env.iop)
- global_env.iop->task = otask;
- if (c != '}') {
- err("unclosed ${");
- gflg = 1;
- return c;
- }
- }
- if (global_env.linep >= elinep) {
- err("string in ${} too long");
- gflg = 1;
- global_env.linep -= 10;
- }
- *global_env.linep = 0;
- if (*s)
- for (cp = s + 1; *cp; cp++)
- if (any(*cp, "=-+?")) {
- c = *cp;
- *cp++ = 0;
- break;
- }
- if (s[1] == 0 && (*s == '*' || *s == '@')) {
- if (dolc > 1) {
- /* currently this does not distinguish $* and $@ */
- /* should check dollar */
- global_env.linep = s;
- PUSHIO(awordlist, dolv + 1, dolchar);
- return 0;
- } else { /* trap the nasty ${=} */
- s[0] = '1';
- s[1] = '\0';
- }
- }
- vp = lookup(s);
- dolp = vp->value;
- if (dolp == null) {
- switch (c) {
- case '=':
- if (isdigit(*s)) {
- err("cannot use ${...=...} with $n");
- gflg = 1;
- break;
- }
- setval(vp, cp);
- dolp = vp->value;
- break;
-
- case '-':
- dolp = strsave(cp, areanum);
- break;
-
- case '?':
- if (*cp == 0) {
- prs("missing value for ");
- err(s);
- } else
- err(cp);
- gflg = 1;
- break;
- }
- } else if (c == '+')
- dolp = strsave(cp, areanum);
- if (FLAG['u'] && dolp == null) {
- prs("unset variable: ");
- err(s);
- gflg = 1;
- }
- global_env.linep = s;
- PUSHIO(aword, dolp, quoted ? qstrchar : strchar);
- return 0;
-}
-
-/*
- * Run the command in `...` and read its output.
- */
-
-static int grave(int quoted)
-{
- /* moved to G: static char child_cmd[LINELIM]; */
-
- const char *cp;
- int i;
- int j;
- int pf[2];
- const char *src;
- char *dest;
- int count;
- int ignore;
- int ignore_once;
- char *argument_list[4];
- struct wdblock *wb = NULL;
-
-#if __GNUC__
- /* Avoid longjmp clobbering */
- (void) &cp;
-#endif
-
- for (cp = global_env.iop->argp->aword; *cp != '`'; cp++) {
- if (*cp == 0) {
- err("no closing `");
- return 0;
- }
- }
-
- /* string copy with dollar expansion */
- src = global_env.iop->argp->aword;
- dest = child_cmd;
- count = 0;
- ignore = 0;
- ignore_once = 0;
- while ((*src != '`') && (count < LINELIM)) {
- if (*src == '\'')
- ignore = !ignore;
- if (*src == '\\')
- ignore_once = 1;
- if (*src == '$' && !ignore && !ignore_once) {
- struct var *vp;
- /* moved to G to reduce stack usage
- char var_name[LINELIM];
- char alt_value[LINELIM];
- */
-#define var_name (G.grave__var_name)
-#define alt_value (G.grave__alt_value)
- int var_index = 0;
- int alt_index = 0;
- char operator = 0;
- int braces = 0;
- char *value;
-
- src++;
- if (*src == '{') {
- braces = 1;
- src++;
- }
-
- var_name[var_index++] = *src++;
- while (isalnum(*src) || *src=='_')
- var_name[var_index++] = *src++;
- var_name[var_index] = 0;
-
- if (braces) {
- switch (*src) {
- case '}':
- break;
- case '-':
- case '=':
- case '+':
- case '?':
- operator = * src;
- break;
- default:
- err("unclosed ${\n");
- return 0;
- }
- if (operator) {
- src++;
- while (*src && (*src != '}')) {
- alt_value[alt_index++] = *src++;
- }
- alt_value[alt_index] = 0;
- if (*src != '}') {
- err("unclosed ${\n");
- return 0;
- }
- }
- src++;
- }
-
- if (isalpha(*var_name)) {
- /* let subshell handle it instead */
-
- char *namep = var_name;
-
- *dest++ = '$';
- if (braces)
- *dest++ = '{';
- while (*namep)
- *dest++ = *namep++;
- if (operator) {
- char *altp = alt_value;
- *dest++ = operator;
- while (*altp)
- *dest++ = *altp++;
- }
- if (braces)
- *dest++ = '}';
-
- wb = addword(lookup(var_name)->name, wb);
- } else {
- /* expand */
-
- vp = lookup(var_name);
- if (vp->value != null)
- value = (operator == '+') ?
- alt_value : vp->value;
- else if (operator == '?') {
- err(alt_value);
- return 0;
- } else if (alt_index && (operator != '+')) {
- value = alt_value;
- if (operator == '=')
- setval(vp, value);
- } else
- continue;
-
- while (*value && (count < LINELIM)) {
- *dest++ = *value++;
- count++;
- }
- }
-#undef var_name
-#undef alt_value
- } else {
- *dest++ = *src++;
- count++;
- ignore_once = 0;
- }
- }
- *dest = '\0';
-
- if (openpipe(pf) < 0)
- return 0;
-
- while ((i = vfork()) == -1 && errno == EAGAIN)
- continue;
-
- DBGPRINTF3(("GRAVE: i is %p\n", io));
-
- if (i < 0) {
- closepipe(pf);
- err((char *) bb_msg_memory_exhausted);
- return 0;
- }
- if (i != 0) {
- waitpid(i, NULL, 0); // safe_waitpid?
- global_env.iop->argp->aword = ++cp;
- close(pf[1]);
- PUSHIO(afile, remap(pf[0]),
- (int (*)(struct ioarg *)) ((quoted) ? qgravechar : gravechar));
- return 1;
- }
- /* allow trapped signals */
- /* XXX - Maybe this signal stuff should go as well? */
- for (j = 0; j <= _NSIG; j++)
- if (ourtrap[j] && signal(j, SIG_IGN) != SIG_IGN)
- signal(j, SIG_DFL);
-
- /* Testcase where below checks are needed:
- * close stdout & run this script:
- * files=`ls`
- * echo "$files" >zz
- */
- xmove_fd(pf[1], 1);
- if (pf[0] != 1)
- close(pf[0]);
-
- argument_list[0] = (char *) DEFAULT_SHELL;
- argument_list[1] = (char *) "-c";
- argument_list[2] = child_cmd;
- argument_list[3] = NULL;
-
- cp = rexecve(argument_list[0], argument_list, makenv(1, wb));
- prs(argument_list[0]);
- prs(": ");
- err(cp);
- _exit(1);
-}
-
-
-static char *unquote(char *as)
-{
- char *s;
-
- s = as;
- if (s != NULL)
- while (*s)
- *s++ &= ~QUOTE;
- return as;
-}
-
-/* -------- glob.c -------- */
-
-/*
- * glob
- */
-
-#define scopy(x) strsave((x), areanum)
-#define BLKSIZ 512
-#define NDENT ((BLKSIZ+sizeof(struct dirent)-1)/sizeof(struct dirent))
-
-static struct wdblock *cl, *nl;
-static const char spcl[] ALIGN1= "[?*";
-
-static struct wdblock *glob(char *cp, struct wdblock *wb)
-{
- int i;
- char *pp;
-
- if (cp == 0)
- return wb;
- i = 0;
- for (pp = cp; *pp; pp++)
- if (any(*pp, spcl))
- i++;
- else if (!any(*pp & ~QUOTE, spcl))
- *pp &= ~QUOTE;
- if (i != 0) {
- for (cl = addword(scopy(cp), NULL); anyspcl(cl); cl = nl) {
- nl = newword(cl->w_nword * 2);
- for (i = 0; i < cl->w_nword; i++) { /* for each argument */
- for (pp = cl->w_words[i]; *pp; pp++)
- if (any(*pp, spcl)) {
- globname(cl->w_words[i], pp);
- break;
- }
- if (*pp == '\0')
- nl = addword(scopy(cl->w_words[i]), nl);
- }
- for (i = 0; i < cl->w_nword; i++)
- DELETE(cl->w_words[i]);
- DELETE(cl);
- }
- if (cl->w_nword) {
- for (i = 0; i < cl->w_nword; i++)
- unquote(cl->w_words[i]);
- qsort_string_vector(cl->w_words, cl->w_nword);
- for (i = 0; i < cl->w_nword; i++)
- wb = addword(cl->w_words[i], wb);
- DELETE(cl);
- return wb;
- }
- }
- wb = addword(unquote(cp), wb);
- return wb;
-}
-
-static void globname(char *we, char *pp)
-{
- char *np, *cp;
- char *name, *gp, *dp;
- int k;
- DIR *dirp;
- struct dirent *de;
- char dname[NAME_MAX + 1];
- struct stat dbuf;
-
- for (np = we; np != pp; pp--)
- if (pp[-1] == '/')
- break;
- dp = cp = get_space((int) (pp - np) + 3);
- while (np < pp)
- *cp++ = *np++;
- *cp++ = '.';
- *cp = '\0';
- gp = cp = get_space(strlen(pp) + 1);
- while (*np && *np != '/')
- *cp++ = *np++;
- *cp = '\0';
- dirp = opendir(dp);
- if (dirp == 0) {
- DELETE(dp);
- DELETE(gp);
- return;
- }
- dname[NAME_MAX] = '\0';
- while ((de = readdir(dirp)) != NULL) {
- /* XXX Hmmm... What this could be? (abial) */
- /*
- if (ent[j].d_ino == 0)
- continue;
- */
- strncpy(dname, de->d_name, NAME_MAX);
- if (dname[0] == '.')
- if (*gp != '.')
- continue;
- for (k = 0; k < NAME_MAX; k++)
- if (any(dname[k], spcl))
- dname[k] |= QUOTE;
- if (gmatch(dname, gp)) {
- name = generate(we, pp, dname, np);
- if (*np && !anys(np, spcl)) {
- if (stat(name, &dbuf)) {
- DELETE(name);
- continue;
- }
- }
- nl = addword(name, nl);
- }
- }
- closedir(dirp);
- DELETE(dp);
- DELETE(gp);
-}
-
-/*
- * generate a pathname as below.
- * start..end1 / middle end
- * the slashes come for free
- */
-static char *generate(char *start1, char *end1, char *middle, char *end)
-{
- char *p;
- char *op, *xp;
-
- p = op = get_space((int)(end1 - start1) + strlen(middle) + strlen(end) + 2);
- xp = start1;
- while (xp != end1)
- *op++ = *xp++;
- xp = middle;
- while (*xp != '\0')
- *op++ = *xp++;
- strcpy(op, end);
- return p;
-}
-
-static int anyspcl(struct wdblock *wb)
-{
- int i;
- char **wd;
-
- wd = wb->w_words;
- for (i = 0; i < wb->w_nword; i++)
- if (anys(spcl, *wd++))
- return 1;
- return 0;
-}
-
-
-/* -------- word.c -------- */
-
-static struct wdblock *newword(int nw)
-{
- struct wdblock *wb;
-
- wb = get_space(sizeof(*wb) + nw * sizeof(char *));
- wb->w_bsize = nw;
- wb->w_nword = 0;
- return wb;
-}
-
-static struct wdblock *addword(char *wd, struct wdblock *wb)
-{
- struct wdblock *wb2;
- int nw;
-
- if (wb == NULL)
- wb = newword(NSTART);
- nw = wb->w_nword;
- if (nw >= wb->w_bsize) {
- wb2 = newword(nw * 2);
- memcpy((char *) wb2->w_words, (char *) wb->w_words,
- nw * sizeof(char *));
- wb2->w_nword = nw;
- DELETE(wb);
- wb = wb2;
- }
- wb->w_words[wb->w_nword++] = wd;
- return wb;
-}
-
-static char **getwords(struct wdblock *wb)
-{
- char **wd;
- int nb;
-
- if (wb == NULL)
- return NULL;
- if (wb->w_nword == 0) {
- DELETE(wb);
- return NULL;
- }
- nb = sizeof(*wd) * wb->w_nword;
- wd = get_space(nb);
- memcpy(wd, wb->w_words, nb);
- DELETE(wb); /* perhaps should done by caller */
- return wd;
-}
-
-
-/* -------- io.c -------- */
-
-/*
- * shell IO
- */
-
-static int my_getc(int ec)
-{
- int c;
-
- if (global_env.linep > elinep) {
- while ((c = readc()) != '\n' && c)
- continue;
- err("input line too long");
- gflg = 1;
- return c;
- }
- c = readc();
- if ((ec != '\'') && (ec != '`') && (global_env.iop->task != XGRAVE)) {
- if (c == '\\') {
- c = readc();
- if (c == '\n' && ec != '\"')
- return my_getc(ec);
- c |= QUOTE;
- }
- }
- return c;
-}
-
-static void unget(int c)
-{
- if (global_env.iop >= global_env.iobase)
- global_env.iop->peekc = c;
-}
-
-static int eofc(void)
-{
- return global_env.iop < global_env.iobase || (global_env.iop->peekc == 0 && global_env.iop->prev == 0);
-}
-
-static int readc(void)
-{
- int c;
-
- RCPRINTF(("READC: global_env.iop %p, global_env.iobase %p\n", global_env.iop, global_env.iobase));
-
- for (; global_env.iop >= global_env.iobase; global_env.iop--) {
- RCPRINTF(("READC: global_env.iop %p, peekc 0x%x\n", global_env.iop, global_env.iop->peekc));
- c = global_env.iop->peekc;
- if (c != '\0') {
- global_env.iop->peekc = 0;
- return c;
- }
- if (global_env.iop->prev != 0) {
- c = (*global_env.iop->iofn)(global_env.iop->argp, global_env.iop);
- if (c != '\0') {
- if (c == -1) {
- global_env.iop++;
- continue;
- }
- if (global_env.iop == iostack)
- ioecho(c);
- global_env.iop->prev = c;
- return c;
- }
- if (global_env.iop->task == XIO && global_env.iop->prev != '\n') {
- global_env.iop->prev = 0;
- if (global_env.iop == iostack)
- ioecho('\n');
- return '\n';
- }
- }
- if (global_env.iop->task == XIO) {
- if (multiline) {
- global_env.iop->prev = 0;
- return 0;
- }
- if (interactive && global_env.iop == iostack + 1) {
-#if ENABLE_FEATURE_EDITING
- current_prompt = prompt->value;
-#else
- prs(prompt->value);
-#endif
- }
- }
- } /* FOR */
-
- if (global_env.iop >= iostack) {
- RCPRINTF(("READC: return 0, global_env.iop %p\n", global_env.iop));
- return 0;
- }
-
- DBGPRINTF(("READC: leave()...\n"));
- leave();
- /* NOTREACHED */
- return 0;
-}
-
-static void ioecho(char c)
-{
- if (FLAG['v'])
- write(2, &c, sizeof c);
-}
-
-static void pushio(struct ioarg *argp, int (*fn) (struct ioarg *))
-{
- DBGPRINTF(("PUSHIO: argp %p, argp->afid 0x%x, global_env.iop %p\n", argp,
- argp->afid, global_env.iop));
-
- /* Set env ptr for io source to next array spot and check for array overflow */
- if (++global_env.iop >= &iostack[NPUSH]) {
- global_env.iop--;
- err("Shell input nested too deeply");
- gflg = 1;
- return;
- }
-
- /* We did not overflow the NPUSH array spots so setup data structs */
-
- global_env.iop->iofn = (int (*)(struct ioarg *, struct io *)) fn; /* Store data source func ptr */
-
- if (argp->afid != AFID_NOBUF)
- global_env.iop->argp = argp;
- else {
-
- global_env.iop->argp = ioargstack + (global_env.iop - iostack); /* MAL - index into stack */
- *global_env.iop->argp = *argp; /* copy data from temp area into stack spot */
-
- /* MAL - mainbuf is for 1st data source (command line?) and all nested use a single shared buffer? */
-
- if (global_env.iop == &iostack[0])
- global_env.iop->argp->afbuf = &mainbuf;
- else
- global_env.iop->argp->afbuf = &sharedbuf;
-
- /* MAL - if not a termimal AND (commandline OR readable file) then give it a buffer id? */
- /* This line appears to be active when running scripts from command line */
- if ((isatty(global_env.iop->argp->afile) == 0)
- && (global_env.iop == &iostack[0]
- || lseek(global_env.iop->argp->afile, 0L, SEEK_CUR) != -1)) {
- if (++bufid == AFID_NOBUF) /* counter rollover check, AFID_NOBUF = 11111111 */
- bufid = AFID_ID; /* AFID_ID = 0 */
-
- global_env.iop->argp->afid = bufid; /* assign buffer id */
- }
-
- DBGPRINTF(("PUSHIO: iostack %p, global_env.iop %p, afbuf %p\n",
- iostack, global_env.iop, global_env.iop->argp->afbuf));
- DBGPRINTF(("PUSHIO: mbuf %p, sbuf %p, bid %d, global_env.iop %p\n",
- &mainbuf, &sharedbuf, bufid, global_env.iop));
-
- }
-
- global_env.iop->prev = ~'\n';
- global_env.iop->peekc = 0;
- global_env.iop->xchar = 0;
- global_env.iop->nlcount = 0;
-
- if (fn == filechar || fn == linechar)
- global_env.iop->task = XIO;
- else if (fn == (int (*)(struct ioarg *)) gravechar
- || fn == (int (*)(struct ioarg *)) qgravechar)
- global_env.iop->task = XGRAVE;
- else
- global_env.iop->task = XOTHER;
-}
-
-static struct io *setbase(struct io *ip)
-{
- struct io *xp;
-
- xp = global_env.iobase;
- global_env.iobase = ip;
- return xp;
-}
-
-/*
- * Input generating functions
- */
-
-/*
- * Produce the characters of a string, then a newline, then NUL.
- */
-static int nlchar(struct ioarg *ap)
-{
- char c;
-
- if (ap->aword == NULL)
- return '\0';
- c = *ap->aword++;
- if (c == '\0') {
- ap->aword = NULL;
- return '\n';
- }
- return c;
-}
-
-/*
- * Given a list of words, produce the characters
- * in them, with a space after each word.
- */
-static int wdchar(struct ioarg *ap)
-{
- char c;
- char **wl;
-
- wl = ap->awordlist;
- if (wl == NULL)
- return 0;
- if (*wl != NULL) {
- c = *(*wl)++;
- if (c != 0)
- return c & 0177;
- ap->awordlist++;
- return ' ';
- }
- ap->awordlist = NULL;
- return '\n';
-}
-
-/*
- * Return the characters of a list of words,
- * producing a space between them.
- */
-static int dolchar(struct ioarg *ap)
-{
- char *wp;
-
- wp = *ap->awordlist++;
- if (wp != NULL) {
- PUSHIO(aword, wp, *ap->awordlist == NULL ? strchar : xxchar);
- return -1;
- }
- return 0;
-}
-
-static int xxchar(struct ioarg *ap)
-{
- int c;
-
- if (ap->aword == NULL)
- return 0;
- c = *ap->aword++;
- if (c == '\0') {
- ap->aword = NULL;
- return ' ';
- }
- return c;
-}
-
-/*
- * Produce the characters from a single word (string).
- */
-static int strchar(struct ioarg *ap)
-{
- if (ap->aword == NULL)
- return 0;
- return *ap->aword++;
-}
-
-/*
- * Produce quoted characters from a single word (string).
- */
-static int qstrchar(struct ioarg *ap)
-{
- int c;
-
- if (ap->aword == NULL)
- return 0;
- c = *ap->aword++;
- if (c)
- c |= QUOTE;
- return c;
-}
-
-/*
- * Return the characters from a file.
- */
-static int filechar(struct ioarg *ap)
-{
- int i;
- char c;
- struct iobuf *bp = ap->afbuf;
-
- if (ap->afid != AFID_NOBUF) {
- i = (ap->afid != bp->id);
- if (i || bp->bufp == bp->ebufp) {
- if (i)
- lseek(ap->afile, ap->afpos, SEEK_SET);
-
- i = nonblock_safe_read(ap->afile, bp->buf, sizeof(bp->buf));
- if (i <= 0) {
- closef(ap->afile);
- return 0;
- }
-
- bp->id = ap->afid;
- bp->bufp = bp->buf;
- bp->ebufp = bp->bufp + i;
- }
-
- ap->afpos++;
- return *bp->bufp++ & 0177;
- }
-#if ENABLE_FEATURE_EDITING
- if (interactive && isatty(ap->afile)) {
- /* moved to G: static char filechar_cmdbuf[BUFSIZ]; */
- static int position = 0, size = 0;
-
- while (size == 0 || position >= size) {
- size = read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state);
- if (size < 0) /* Error/EOF */
- exit(0);
- position = 0;
- /* if Ctrl-C, size == 0 and loop will repeat */
- }
- c = filechar_cmdbuf[position];
- position++;
- return c;
- }
-#endif
- i = nonblock_safe_read(ap->afile, &c, sizeof(c));
- return i == sizeof(c) ? (c & 0x7f) : (closef(ap->afile), 0);
-}
-
-/*
- * Return the characters from a here temp file.
- */
-static int herechar(struct ioarg *ap)
-{
- char c;
-
- if (nonblock_safe_read(ap->afile, &c, sizeof(c)) != sizeof(c)) {
- close(ap->afile);
- c = '\0';
- }
- return c;
-}
-
-/*
- * Return the characters produced by a process (`...`).
- * Quote them if required, and remove any trailing newline characters.
- */
-static int gravechar(struct ioarg *ap, struct io *iop)
-{
- int c;
-
- c = qgravechar(ap, iop) & ~QUOTE;
- if (c == '\n')
- c = ' ';
- return c;
-}
-
-static int qgravechar(struct ioarg *ap, struct io *iop)
-{
- int c;
-
- DBGPRINTF3(("QGRAVECHAR: enter, ap=%p, iop=%p\n", ap, iop));
-
- if (iop->xchar) {
- if (iop->nlcount) {
- iop->nlcount--;
- return '\n' | QUOTE;
- }
- c = iop->xchar;
- iop->xchar = 0;
- } else if ((c = filechar(ap)) == '\n') {
- iop->nlcount = 1;
- while ((c = filechar(ap)) == '\n')
- iop->nlcount++;
- iop->xchar = c;
- if (c == 0)
- return c;
- iop->nlcount--;
- c = '\n';
- }
- return c != 0 ? c | QUOTE : 0;
-}
-
-/*
- * Return a single command (usually the first line) from a file.
- */
-static int linechar(struct ioarg *ap)
-{
- int c;
-
- c = filechar(ap);
- if (c == '\n') {
- if (!multiline) {
- closef(ap->afile);
- ap->afile = -1; /* illegal value */
- }
- }
- return c;
-}
-
-/*
- * remap fd into Shell's fd space
- */
-static int remap(int fd)
-{
- int i;
- int map[NOFILE];
- int newfd;
-
- DBGPRINTF(("REMAP: fd=%d, global_env.iofd=%d\n", fd, global_env.iofd));
-
- if (fd < global_env.iofd) {
- for (i = 0; i < NOFILE; i++)
- map[i] = 0;
-
- do {
- map[fd] = 1;
- newfd = dup(fd);
- fd = newfd;
- } while (fd >= 0 && fd < global_env.iofd);
-
- for (i = 0; i < NOFILE; i++)
- if (map[i])
- close(i);
-
- if (fd < 0)
- err("too many files open in shell");
- }
-
- return fd;
-}
-
-static int openpipe(int *pv)
-{
- int i;
-
- i = pipe(pv);
- if (i < 0)
- err("can't create pipe - try again");
- return i;
-}
-
-static void closepipe(int *pv)
-{
- if (pv != NULL) {
- close(pv[0]);
- close(pv[1]);
- }
-}
-
-
-/* -------- here.c -------- */
-
-/*
- * here documents
- */
-
-static void markhere(char *s, struct ioword *iop)
-{
- struct here *h, *lh;
-
- DBGPRINTF7(("MARKHERE: enter, s=%p\n", s));
-
- h = get_space(sizeof(struct here));
- if (h == NULL)
- return;
-
- h->h_tag = evalstr(s, DOSUB);
- if (h->h_tag == 0)
- return;
-
- h->h_iop = iop;
- iop->io_name = 0;
- h->h_next = NULL;
- if (inhere == 0)
- inhere = h;
- else {
- for (lh = inhere; lh != NULL; lh = lh->h_next) {
- if (lh->h_next == 0) {
- lh->h_next = h;
- break;
- }
- }
- }
- iop->io_flag |= IOHERE | IOXHERE;
- for (s = h->h_tag; *s; s++) {
- if (*s & QUOTE) {
- iop->io_flag &= ~IOXHERE;
- *s &= ~QUOTE;
- }
- }
- h->h_dosub = ((iop->io_flag & IOXHERE) ? '\0' : '\'');
-}
-
-static void gethere(void)
-{
- struct here *h, *hp;
-
- DBGPRINTF7(("GETHERE: enter...\n"));
-
- /* Scan here files first leaving inhere list in place */
- for (hp = h = inhere; h != NULL; hp = h, h = h->h_next)
- readhere(&h->h_iop->io_name, h->h_tag, h->h_dosub /* NUL or ' */);
-
- /* Make inhere list active - keep list intact for scraphere */
- if (hp != NULL) {
- hp->h_next = acthere;
- acthere = inhere;
- inhere = NULL;
- }
-}
-
-static void readhere(char **name, char *s, int ec)
-{
- int tf;
- char tname[30] = ".msh_XXXXXX";
- int c;
- jmp_buf ev;
- char myline[LINELIM + 1];
- char *thenext;
-
- DBGPRINTF7(("READHERE: enter, name=%p, s=%p\n", name, s));
-
- tf = mkstemp(tname);
- if (tf < 0)
- return;
-
- *name = strsave(tname, areanum);
- errpt = ev;
- if (newenv(setjmp(errpt)) != 0)
- unlink(tname);
- else {
- pushio(global_env.iop->argp, (int (*)(struct ioarg *)) global_env.iop->iofn);
- global_env.iobase = global_env.iop;
- for (;;) {
- if (interactive && global_env.iop <= iostack) {
-#if ENABLE_FEATURE_EDITING
- current_prompt = cprompt->value;
-#else
- prs(cprompt->value);
-#endif
- }
- thenext = myline;
- while ((c = my_getc(ec)) != '\n' && c) {
- if (ec == '\'')
- c &= ~QUOTE;
- if (thenext >= &myline[LINELIM]) {
- c = 0;
- break;
- }
- *thenext++ = c;
- }
- *thenext = 0;
- if (strcmp(s, myline) == 0 || c == 0)
- break;
- *thenext++ = '\n';
- write(tf, myline, (int) (thenext - myline));
- }
- if (c == 0) {
- prs("here document `");
- prs(s);
- err("' unclosed");
- }
- quitenv();
- }
- close(tf);
-}
-
-/*
- * open here temp file.
- * if unquoted here, expand here temp file into second temp file.
- */
-static int herein(char *hname, int xdoll)
-{
- int hf;
- int tf;
-
-#if __GNUC__
- /* Avoid longjmp clobbering */
- (void) &tf;
-#endif
- if (hname == NULL)
- return -1;
-
- DBGPRINTF7(("HEREIN: hname is %s, xdoll=%d\n", hname, xdoll));
-
- hf = open(hname, O_RDONLY);
- if (hf < 0)
- return -1;
-
- if (xdoll) {
- char c;
- char tname[30] = ".msh_XXXXXX";
- jmp_buf ev;
-
- tf = mkstemp(tname);
- if (tf < 0)
- return -1;
- errpt = ev;
- if (newenv(setjmp(errpt)) == 0) {
- PUSHIO(afile, hf, herechar);
- setbase(global_env.iop);
- while ((c = subgetc(0, 0)) != 0) {
- c &= ~QUOTE;
- write(tf, &c, sizeof c);
- }
- quitenv();
- } else
- unlink(tname);
- close(tf);
- tf = open(tname, O_RDONLY);
- unlink(tname);
- return tf;
- }
- return hf;
-}
-
-static void scraphere(void)
-{
- struct here *h;
-
- DBGPRINTF7(("SCRAPHERE: enter...\n"));
-
- for (h = inhere; h != NULL; h = h->h_next) {
- if (h->h_iop && h->h_iop->io_name)
- unlink(h->h_iop->io_name);
- }
- inhere = NULL;
-}
-
-/* unlink here temp files before a freearea(area) */
-static void freehere(int area)
-{
- struct here *h, *hl;
-
- DBGPRINTF6(("FREEHERE: enter, area=%d\n", area));
-
- hl = NULL;
- for (h = acthere; h != NULL; h = h->h_next) {
- if (getarea((char *) h) >= area) {
- if (h->h_iop->io_name != NULL)
- unlink(h->h_iop->io_name);
- if (hl == NULL)
- acthere = h->h_next;
- else
- hl->h_next = h->h_next;
- } else {
- hl = h;
- }
- }
-}
-
-
-/* -------- sh.c -------- */
-/*
- * shell
- */
-
-int msh_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int msh_main(int argc, char **argv)
-{
- int f;
- char *s;
- int cflag;
- char *name, **ap;
- int (*iof) (struct ioarg *);
-
- INIT_G();
-
- sharedbuf.id = AFID_NOBUF;
- mainbuf.id = AFID_NOBUF;
- elinep = line + sizeof(line) - 5;
-
-#if ENABLE_FEATURE_EDITING
- line_input_state = new_line_input_t(FOR_SHELL);
-#endif
-
- DBGPRINTF(("MSH_MAIN: argc %d, environ %p\n", argc, environ));
-
- initarea();
- ap = environ;
- if (ap != NULL) {
- while (*ap)
- assign(*ap++, !COPYV);
- for (ap = environ; *ap;)
- export(lookup(*ap++));
- }
- closeall();
- areanum = 1;
-
- shell = lookup("SHELL");
- if (shell->value == null)
- setval(shell, (char *)DEFAULT_SHELL);
- export(shell);
-
- homedir = lookup("HOME");
- if (homedir->value == null)
- setval(homedir, "/");
- export(homedir);
-
- setval(lookup("$"), putn(getpid()));
-
- path = lookup("PATH");
- if (path->value == null) {
- /* Can be merged with same string elsewhere in bbox */
- if (geteuid() == 0)
- setval(path, bb_default_root_path);
- else
- setval(path, bb_default_path);
- }
- export(path);
-
- ifs = lookup("IFS");
- if (ifs->value == null)
- setval(ifs, " \t\n");
-
-#ifdef MSHDEBUG
- mshdbg_var = lookup("MSHDEBUG");
- if (mshdbg_var->value == null)
- setval(mshdbg_var, "0");
-#endif
-
- prompt = lookup("PS1");
-#if ENABLE_FEATURE_EDITING_FANCY_PROMPT
- if (prompt->value == null)
-#endif
- setval(prompt, DEFAULT_USER_PROMPT);
- if (geteuid() == 0) {
- setval(prompt, DEFAULT_ROOT_PROMPT);
- prompt->status &= ~EXPORT;
- }
- cprompt = lookup("PS2");
-#if ENABLE_FEATURE_EDITING_FANCY_PROMPT
- if (cprompt->value == null)
-#endif
- setval(cprompt, "> ");
-
- iof = filechar;
- cflag = 0;
- name = *argv++;
- if (--argc >= 1) {
- if (argv[0][0] == '-' && argv[0][1] != '\0') {
- for (s = argv[0] + 1; *s; s++)
- switch (*s) {
- case 'c':
- prompt->status &= ~EXPORT;
- cprompt->status &= ~EXPORT;
- setval(prompt, "");
- setval(cprompt, "");
- cflag = 1;
- if (--argc > 0)
- PUSHIO(aword, *++argv, iof = nlchar);
- break;
-
- case 'q':
- qflag = SIG_DFL;
- break;
-
- case 's':
- /* standard input */
- break;
-
- case 't':
- prompt->status &= ~EXPORT;
- setval(prompt, "");
- iof = linechar;
- break;
-
- case 'i':
- interactive = 1;
- default:
- if (*s >= 'a' && *s <= 'z')
- FLAG[(int) *s]++;
- }
- } else {
- argv--;
- argc++;
- }
-
- if (iof == filechar && --argc > 0) {
- setval(prompt, "");
- setval(cprompt, "");
- prompt->status &= ~EXPORT;
- cprompt->status &= ~EXPORT;
-
-/* Shell is non-interactive, activate printf-based debug */
-#ifdef MSHDEBUG
- mshdbg = (int) (((char) (mshdbg_var->value[0])) - '0');
- if (mshdbg < 0)
- mshdbg = 0;
-#endif
- DBGPRINTF(("MSH_MAIN: calling newfile()\n"));
-
- name = *++argv;
- if (newfile(name))
- exit(1); /* Exit on error */
- }
- }
-
- setdash();
-
- /* This won't be true if PUSHIO has been called, say from newfile() above */
- if (global_env.iop < iostack) {
- PUSHIO(afile, 0, iof);
- if (isatty(0) && isatty(1) && !cflag) {
- interactive = 1;
-#if !ENABLE_FEATURE_SH_EXTRA_QUIET
-#ifdef MSHDEBUG
- printf("\n\n%s built-in shell (msh with debug)\n", bb_banner);
-#else
- printf("\n\n%s built-in shell (msh)\n", bb_banner);
-#endif
- printf("Enter 'help' for a list of built-in commands.\n\n");
-#endif
- }
- }
-
- signal(SIGQUIT, qflag);
- if (name && name[0] == '-') {
- interactive = 1;
- f = open(".profile", O_RDONLY);
- if (f >= 0)
- next(remap(f));
- f = open("/etc/profile", O_RDONLY);
- if (f >= 0)
- next(remap(f));
- }
- if (interactive)
- signal(SIGTERM, sig);
-
- if (signal(SIGINT, SIG_IGN) != SIG_IGN)
- signal(SIGINT, onintr);
-
-/* Handle "msh SCRIPT VAR=val params..." */
-/* Disabled: bash does not do it! */
-#if 0
- argv++;
- /* skip leading args of the form VAR=val */
- while (*argv && assign(*argv, !COPYV)) {
- argc--;
- argv++;
- }
- argv--;
-#endif
- dolv = argv;
- dolc = argc;
- dolv[0] = name;
-
- setval(lookup("#"), putn((--dolc < 0) ? (dolc = 0) : dolc));
-
- DBGPRINTF(("MSH_MAIN: begin FOR loop, interactive %d, global_env.iop %p, iostack %p\n", interactive, global_env.iop, iostack));
-
- for (;;) {
- if (interactive && global_env.iop <= iostack) {
-#if ENABLE_FEATURE_EDITING
- current_prompt = prompt->value;
-#else
- prs(prompt->value);
-#endif
- }
- onecommand();
- /* Ensure that getenv("PATH") stays current */
- setenv("PATH", path->value, 1);
- }
-
- DBGPRINTF(("MSH_MAIN: returning.\n"));
-}
-
-
-/*
- * Copyright (c) 1987,1997, Prentice Hall
- * All rights reserved.
- *
- * Redistribution and use of the MINIX operating system in source and
- * binary forms, with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * Neither the name of Prentice Hall nor the names of the software
- * authors or contributors may be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS, AUTHORS, AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL PRENTICE HALL OR ANY AUTHORS OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "System Logging Utilities"
-
-config SYSLOGD
- bool "syslogd"
- default n
- help
- The syslogd utility is used to record logs of all the
- significant events that occur on a system. Every
- message that is logged records the date and time of the
- event, and will generally also record the name of the
- application that generated the message. When used in
- conjunction with klogd, messages from the Linux kernel
- can also be recorded. This is terribly useful,
- especially for finding what happened when something goes
- wrong. And something almost always will go wrong if
- you wait long enough....
-
-config FEATURE_ROTATE_LOGFILE
- bool "Rotate message files"
- default n
- depends on SYSLOGD
- help
- This enables syslogd to rotate the message files
- on his own. No need to use an external rotatescript.
-
-config FEATURE_REMOTE_LOG
- bool "Remote Log support"
- default n
- depends on SYSLOGD
- help
- When you enable this feature, the syslogd utility can
- be used to send system log messages to another system
- connected via a network. This allows the remote
- machine to log all the system messages, which can be
- terribly useful for reducing the number of serial
- cables you use. It can also be a very good security
- measure to prevent system logs from being tampered with
- by an intruder.
-
-config FEATURE_SYSLOGD_DUP
- bool "Support -D (drop dups) option"
- default n
- depends on SYSLOGD
- help
- Option -D instructs syslogd to drop consecutive messages
- which are totally the same.
-
-config FEATURE_IPC_SYSLOG
- bool "Circular Buffer support"
- default n
- depends on SYSLOGD
- help
- When you enable this feature, the syslogd utility will
- use a circular buffer to record system log messages.
- When the buffer is filled it will continue to overwrite
- the oldest messages. This can be very useful for
- systems with little or no permanent storage, since
- otherwise system logs can eventually fill up your
- entire filesystem, which may cause your system to
- break badly.
-
-config FEATURE_IPC_SYSLOG_BUFFER_SIZE
- int "Circular buffer size in Kbytes (minimum 4KB)"
- default 16
- range 4 2147483647
- depends on FEATURE_IPC_SYSLOG
- help
- This option sets the size of the circular buffer
- used to record system log messages.
-
-config LOGREAD
- bool "logread"
- default y
- depends on FEATURE_IPC_SYSLOG
- help
- If you enabled Circular Buffer support, you almost
- certainly want to enable this feature as well. This
- utility will allow you to read the messages that are
- stored in the syslogd circular buffer.
-
-config FEATURE_LOGREAD_REDUCED_LOCKING
- bool "Double buffering"
- default n
- depends on LOGREAD
- help
- 'logread' ouput to slow serial terminals can have
- side effects on syslog because of the semaphore.
- This option make logread to double buffer copy
- from circular buffer, minimizing semaphore
- contention at some minor memory expense.
-
-config KLOGD
- bool "klogd"
- default n
- help
- klogd is a utility which intercepts and logs all
- messages from the Linux kernel and sends the messages
- out to the 'syslogd' utility so they can be logged. If
- you wish to record the messages produced by the kernel,
- you should enable this option.
-
-config LOGGER
- bool "logger"
- default n
- select FEATURE_SYSLOG
- help
- The logger utility allows you to send arbitrary text
- messages to the system log (i.e. the 'syslogd' utility) so
- they can be logged. This is generally used to help locate
- problems that occur within programs and scripts.
-
-endmenu
-
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_KLOGD) += klogd.o
-lib-$(CONFIG_LOGGER) += logger.o
-lib-$(CONFIG_LOGREAD) += logread.o
-lib-$(CONFIG_SYSLOGD) += syslogd.o
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see scripts/kbuild/config-language.txt.
-#
-
-menu "Linux System Utilities"
-
-config DMESG
- bool "dmesg"
- default n
- help
- dmesg is used to examine or control the kernel ring buffer. When the
- Linux kernel prints messages to the system log, they are stored in
- the kernel ring buffer. You can use dmesg to print the kernel's ring
- buffer, clear the kernel ring buffer, change the size of the kernel
- ring buffer, and change the priority level at which kernel messages
- are also logged to the system console. Enable this option if you
- wish to enable the 'dmesg' utility.
-
-config FEATURE_DMESG_PRETTY
- bool "Pretty dmesg output"
- default y
- depends on DMESG
- help
- If you wish to scrub the syslog level from the output, say 'Y' here.
- The syslog level is a string prefixed to every line with the form "<#>".
-
- With this option you will see:
- # dmesg
- Linux version 2.6.17.4 .....
- BIOS-provided physical RAM map:
- BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
-
- Without this option you will see:
- # dmesg
- <5>Linux version 2.6.17.4 .....
- <6>BIOS-provided physical RAM map:
- <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
-
-config FBSET
- bool "fbset"
- default n
- help
- fbset is used to show or change the settings of a Linux frame buffer
- device. The frame buffer device provides a simple and unique
- interface to access a graphics display. Enable this option
- if you wish to enable the 'fbset' utility.
-
-config FEATURE_FBSET_FANCY
- bool "Turn on extra fbset options"
- default n
- depends on FBSET
- help
- This option enables extended fbset options, allowing one to set the
- framebuffer size, color depth, etc. interface to access a graphics
- display. Enable this option if you wish to enable extended fbset
- options.
-
-config FEATURE_FBSET_READMODE
- bool "Turn on fbset readmode support"
- default n
- depends on FBSET
- help
- This option allows fbset to read the video mode database stored by
- default as /etc/fb.modes, which can be used to set frame buffer
- device to pre-defined video modes.
-
-config FDFLUSH
- bool "fdflush"
- default n
- help
- fdflush is only needed when changing media on slightly-broken
- removable media drives. It is used to make Linux believe that a
- hardware disk-change switch has been actuated, which causes Linux to
- forget anything it has cached from the previous media. If you have
- such a slightly-broken drive, you will need to run fdflush every time
- you change a disk. Most people have working hardware and can safely
- leave this disabled.
-
-config FDFORMAT
- bool "fdformat"
- default n
- help
- fdformat is used to low-level format a floppy disk.
-
-config FDISK
- bool "fdisk"
- default n
- help
- The fdisk utility is used to divide hard disks into one or more
- logical disks, which are generally called partitions. This utility
- can be used to list and edit the set of partitions or BSD style
- 'disk slices' that are defined on a hard drive.
-
-config FDISK_SUPPORT_LARGE_DISKS
- bool "Support over 4GB disks"
- default y
- depends on FDISK
- help
- Enable this option to support large disks > 4GB.
-
-config FEATURE_FDISK_WRITABLE
- bool "Write support"
- default y
- depends on FDISK
- help
- Enabling this option allows you to create or change a partition table
- and write those changes out to disk. If you leave this option
- disabled, you will only be able to view the partition table.
-
-config FEATURE_AIX_LABEL
- bool "Support AIX disklabels"
- default n
- depends on FDISK && FEATURE_FDISK_WRITABLE
- help
- Enabling this option allows you to create or change AIX disklabels.
- Most people can safely leave this option disabled.
-
-config FEATURE_SGI_LABEL
- bool "Support SGI disklabels"
- default n
- depends on FDISK && FEATURE_FDISK_WRITABLE
- help
- Enabling this option allows you to create or change SGI disklabels.
- Most people can safely leave this option disabled.
-
-config FEATURE_SUN_LABEL
- bool "Support SUN disklabels"
- default n
- depends on FDISK && FEATURE_FDISK_WRITABLE
- help
- Enabling this option allows you to create or change SUN disklabels.
- Most people can safely leave this option disabled.
-
-config FEATURE_OSF_LABEL
- bool "Support BSD disklabels"
- default n
- depends on FDISK && FEATURE_FDISK_WRITABLE
- help
- Enabling this option allows you to create or change BSD disklabels
- and define and edit BSD disk slices.
-
-config FEATURE_FDISK_ADVANCED
- bool "Support expert mode"
- default n
- depends on FDISK && FEATURE_FDISK_WRITABLE
- help
- Enabling this option allows you to do terribly unsafe things like
- define arbitrary drive geometry, move the beginning of data in a
- partition, and similarly evil things. Unless you have a very good
- reason you would be wise to leave this disabled.
-
-config FINDFS
- bool "findfs"
- default n
- select VOLUMEID
- help
- This is similar to the findfs program that is part of the e2fsprogs
- package. However, the e2fsprogs version only support ext2/3. This
- version supports those in addition to FAT, swap, and ReiserFS.
- WARNING:
- With all submodules selected, it will add ~8k to busybox.
-
-config FREERAMDISK
- bool "freeramdisk"
- default n
- help
- Linux allows you to create ramdisks. This utility allows you to
- delete them and completely free all memory that was used for the
- ramdisk. For example, if you boot Linux into a ramdisk and later
- pivot_root, you may want to free the memory that is allocated to the
- ramdisk. If you have no use for freeing memory from a ramdisk, leave
- this disabled.
-
-config FSCK_MINIX
- bool "fsck_minix"
- default n
- help
- The minix filesystem is a nice, small, compact, read-write filesystem
- with little overhead. It is not a journaling filesystem however and
- can experience corruption if it is not properly unmounted or if the
- power goes off in the middle of a write. This utility allows you to
- check for and attempt to repair any corruption that occurs to a minix
- filesystem.
-
-config MKFS_MINIX
- bool "mkfs_minix"
- default n
- help
- The minix filesystem is a nice, small, compact, read-write filesystem
- with little overhead. If you wish to be able to create minix filesystems
- this utility will do the job for you.
-
-comment "Minix filesystem support"
- depends on FSCK_MINIX || MKFS_MINIX
-
-config FEATURE_MINIX2
- bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
- default y
- depends on FSCK_MINIX || MKFS_MINIX
- help
- If you wish to be able to create version 2 minix filesystems, enable this.
- If you enabled 'mkfs_minix' then you almost certainly want to be using the
- version 2 filesystem support.
-
-config GETOPT
- bool "getopt"
- default n
- help
- The getopt utility is used to break up (parse) options in command
- lines to make it easy to write complex shell scripts that also check
- for legal (and illegal) options. If you want to write horribly
- complex shell scripts, or use some horribly complex shell script
- written by others, this utility may be for you. Most people will
- wisely leave this disabled.
-
-config HEXDUMP
- bool "hexdump"
- default n
- help
- The hexdump utility is used to display binary data in a readable
- way that is comparable to the output from most hex editors.
-
-config FEATURE_HEXDUMP_REVERSE
- bool "Support -R, reverse of 'hexdump -Cv'"
- default n
- depends on HEXDUMP
- help
- The hexdump utility is used to display binary data in an ascii
- readable way. This option creates binary data from an ascii input.
- NB: this option is non-standard. It's unwise to use it in scripts
- aimed to be portable.
-
-config HD
- bool "hd"
- default n
- select HEXDUMP
- help
- hd is an alias to hexdump -C.
-
-config HWCLOCK
- bool "hwclock"
- default n
- help
- The hwclock utility is used to read and set the hardware clock
- on a system. This is primarily used to set the current time on
- shutdown in the hardware clock, so the hardware will keep the
- correct time when Linux is _not_ running.
-
-config FEATURE_HWCLOCK_LONG_OPTIONS
- bool "Support long options (--hctosys,...)"
- default n
- depends on HWCLOCK && 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 FEATURE_HWCLOCK_ADJTIME_FHS
- bool "Use FHS /var/lib/hwclock/adjtime"
- default y
- depends on 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 IPCRM
- bool "ipcrm"
- default n
- select 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 IPCS
- bool "ipcs"
- default n
- select FEATURE_SUID
- help
- The ipcs utility is used to provide information on the currently
- allocated System V interprocess (IPC) objects in the system.
-
-config LOSETUP
- bool "losetup"
- default n
- help
- losetup is used to associate or detach a loop device with a regular
- file or block device, and to query the status of a loop device. This
- version does not currently support enabling data encryption.
-
-config MDEV
- bool "mdev"
- default n
- help
- mdev is a mini-udev implementation for dynamically creating device
- nodes in the /dev directory.
-
- For more information, please see docs/mdev.txt
-
-config FEATURE_MDEV_CONF
- bool "Support /etc/mdev.conf"
- default n
- depends on MDEV
- help
- Add support for the mdev config file to control ownership and
- permissions of the device nodes.
-
- For more information, please see docs/mdev.txt
-
-config FEATURE_MDEV_RENAME
- bool "Support subdirs/symlinks"
- default n
- depends on FEATURE_MDEV_CONF
- help
- Add support for renaming devices and creating symlinks.
-
- For more information, please see docs/mdev.txt
-
-config FEATURE_MDEV_EXEC
- bool "Support command execution at device addition/removal"
- default n
- depends on FEATURE_MDEV_CONF
- help
- This adds support for an optional field to /etc/mdev.conf for
- executing commands when devices are created/removed.
-
- For more information, please see docs/mdev.txt
-
-config FEATURE_MDEV_LOAD_FIRMWARE
- bool "Support loading of firmwares"
- default n
- depends on MDEV
- help
- Some devices need to load firmware before they can be usable.
-
- These devices will request userspace look up the files in
- /lib/firmware/ and if it exists, send it to the kernel for
- loading into the hardware.
-
-config MKSWAP
- bool "mkswap"
- default n
- help
- The mkswap utility is used to configure a file or disk partition as
- Linux swap space. This allows Linux to use the entire file or
- partition as if it were additional RAM, which can greatly increase
- the capability of low-memory machines. This additional memory is
- much slower than real RAM, but can be very helpful at preventing your
- applications being killed by the Linux out of memory (OOM) killer.
- Once you have created swap space using 'mkswap' you need to enable
- the swap space using the 'swapon' utility.
-
-config FEATURE_MKSWAP_V0
- bool "Version 0 support"
- default n
- depends on MKSWAP
-# depends on MKSWAP && 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 MORE
- bool "more"
- default n
- help
- more is a simple utility which allows you to read text one screen
- sized page at a time. If you want to read text that is larger than
- the screen, and you are using anything faster than a 300 baud modem,
- you will probably find this utility very helpful. If you don't have
- any need to reading text files, you can leave this disabled.
-
-config FEATURE_USE_TERMIOS
- bool "Use termios to manipulate the screen"
- default y
- depends on MORE || TOP
- help
- This option allows utilities such as 'more' and 'top' to determine
- the size of the screen. If you leave this disabled, your utilities
- that display things on the screen will be especially primitive and
- will be unable to determine the current screen size, and will be
- unable to move the cursor.
-
-config VOLUMEID
- bool "Routines for detecting label and uuid on common filesystems"
- default n
- help
- TODO
-
-config FEATURE_VOLUMEID_EXT
- bool "Ext filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-config FEATURE_VOLUMEID_REISERFS
- bool "Reiser filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-config FEATURE_VOLUMEID_FAT
- bool "fat filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-config FEATURE_VOLUMEID_HFS
- bool "hfs filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-config FEATURE_VOLUMEID_JFS
- bool "jfs filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-### config FEATURE_VOLUMEID_UFS
-### bool "ufs filesystem"
-### default n
-### depends on VOLUMEID
-### help
-### TODO
-
-config FEATURE_VOLUMEID_XFS
- bool "xfs filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-config FEATURE_VOLUMEID_NTFS
- bool "ntfs filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-config FEATURE_VOLUMEID_ISO9660
- bool "iso9660 filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-config FEATURE_VOLUMEID_UDF
- bool "udf filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-config FEATURE_VOLUMEID_LUKS
- bool "luks filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-config FEATURE_VOLUMEID_LINUXSWAP
- bool "linux swap filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-### config FEATURE_VOLUMEID_LVM
-### bool "lvm"
-### default n
-### depends on VOLUMEID
-### help
-### TODO
-
-config FEATURE_VOLUMEID_CRAMFS
- bool "cramfs filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-### config FEATURE_VOLUMEID_HPFS
-### bool "hpfs filesystem"
-### default n
-### depends on VOLUMEID
-### help
-### TODO
-
-config FEATURE_VOLUMEID_ROMFS
- bool "romfs filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-config FEATURE_VOLUMEID_SYSV
- bool "sysv filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-### config FEATURE_VOLUMEID_MINIX
-### bool "minix filesystem"
-### default n
-### depends on VOLUMEID
-### help
-### TODO
-
-### These only detect partition tables - not used (yet?)
-### config FEATURE_VOLUMEID_MAC
-### bool "mac filesystem"
-### default n
-### depends on VOLUMEID
-### help
-### TODO
-###
-### config FEATURE_VOLUMEID_MSDOS
-### bool "msdos filesystem"
-### default n
-### depends on VOLUMEID
-### help
-### TODO
-
-config FEATURE_VOLUMEID_OCFS2
- bool "ocfs2 filesystem"
- default n
- depends on VOLUMEID
- help
- TODO
-
-### config FEATURE_VOLUMEID_HIGHPOINTRAID
-### bool "highpoint raid"
-### default n
-### depends on VOLUMEID
-### help
-### TODO
-
-### config FEATURE_VOLUMEID_ISWRAID
-### bool "intel raid"
-### default n
-### depends on VOLUMEID
-### help
-### TODO
-
-### config FEATURE_VOLUMEID_LSIRAID
-### bool "lsi raid"
-### default n
-### depends on VOLUMEID
-### help
-### TODO
-
-### config FEATURE_VOLUMEID_VIARAID
-### bool "via raid"
-### default n
-### depends on VOLUMEID
-### help
-### TODO
-
-### config FEATURE_VOLUMEID_SILICONRAID
-### bool "silicon raid"
-### default n
-### depends on VOLUMEID
-### help
-### TODO
-
-### config FEATURE_VOLUMEID_NVIDIARAID
-### bool "nvidia raid"
-### default n
-### depends on VOLUMEID
-### help
-### TODO
-
-### config FEATURE_VOLUMEID_PROMISERAID
-### bool "promise raid"
-### default n
-### depends on VOLUMEID
-### help
-### TODO
-
-config FEATURE_VOLUMEID_LINUXRAID
- bool "linuxraid"
- default n
- depends on VOLUMEID
- help
- TODO
-
-config MOUNT
- bool "mount"
- default n
- 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 FEATURE_MOUNT_FAKE
- bool "Support option -f"
- default n
- depends on MOUNT
- help
- Enable support for faking a file system mount.
-
-config FEATURE_MOUNT_VERBOSE
- bool "Support option -v"
- default n
- depends on MOUNT
- help
- Enable multi-level -v[vv...] verbose messages. Useful if you
- debug mount problems and want to see what is exactly passed
- to the kernel.
-
-config FEATURE_MOUNT_HELPERS
- bool "Support mount helpers"
- default n
- depends on MOUNT
- help
- Enable mounting of virtual file systems via external helpers.
- E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call
- "obexfs -b00.11.22.33.44.55 /mnt"
- Also "mount -t sometype [-o opts] fs /mnt" will try
- "sometype [-o opts] fs /mnt" if simple mount syscall fails.
- The idea is to use such virtual filesystems in /etc/fstab.
-
-config FEATURE_MOUNT_LABEL
- bool "Support specifiying devices by label or UUID"
- default n
- depends on MOUNT
- select VOLUMEID
- help
- This allows for specifying a device by label or uuid, rather than by
- name. This feature utilizes the same functionality as findfs.
-
-config FEATURE_MOUNT_NFS
- bool "Support mounting NFS file systems"
- default n
- depends on MOUNT
- select FEATURE_HAVE_RPC
- select FEATURE_SYSLOG
- help
- Enable mounting of NFS file systems.
-
-config FEATURE_MOUNT_CIFS
- bool "Support mounting CIFS/SMB file systems"
- default n
- depends on MOUNT
- help
- Enable support for samba mounts.
-
-config FEATURE_MOUNT_FLAGS
- depends on MOUNT
- bool "Support lots of -o flags in mount"
- default y
- help
- Without this, mount only supports ro/rw/remount. With this, it
- supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime,
- noatime, diratime, nodiratime, loud, bind, move, shared, slave,
- private, unbindable, rshared, rslave, rprivate, and runbindable.
-
-config FEATURE_MOUNT_FSTAB
- depends on MOUNT
- bool "Support /etc/fstab and -a"
- default y
- help
- Support mount all and looking for files in /etc/fstab.
-
-config PIVOT_ROOT
- bool "pivot_root"
- default n
- help
- The pivot_root utility swaps the mount points for the root filesystem
- with some other mounted filesystem. This allows you to do all sorts
- 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 RDATE
- bool "rdate"
- default n
- help
- The rdate utility allows you to synchronize the date and time of your
- system clock with the date and time of a remote networked system using
- the RFC868 protocol, which is built into the inetd daemon on most
- systems.
-
-config READPROFILE
- bool "readprofile"
- default n
- help
- This allows you to parse /proc/profile for basic profiling.
-
-config RTCWAKE
- bool "rtcwake"
- default n
- help
- Enter a system sleep state until specified wakeup time.
-
-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 SWAPONOFF
- bool "swaponoff"
- default n
- help
- This option enables both the 'swapon' and the 'swapoff' utilities.
- Once you have created some swap space using 'mkswap', you also need
- to enable your swap space with the 'swapon' utility. The 'swapoff'
- utility is used, typically at system shutdown, to disable any swap
- space. If you are not using any swap space, you can leave this
- option disabled.
-
-config SWITCH_ROOT
- bool "switch_root"
- default n
- help
- 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.)
-
- 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 UMOUNT
- bool "umount"
- default n
- help
- When you want to remove a mounted filesystem from its current mount point,
- for example when you are shutting down the system, the 'umount' utility is
- the tool to use. If you enabled the 'mount' utility, you almost certainly
- also want to enable 'umount'.
-
-config FEATURE_UMOUNT_ALL
- bool "Support option -a"
- default n
- depends on UMOUNT
- help
- Support -a option to unmount all currently mounted filesystems.
-
-comment "Common options for mount/umount"
- depends on MOUNT || UMOUNT
-
-config FEATURE_MOUNT_LOOP
- bool "Support loopback mounts"
- default n
- depends on MOUNT || UMOUNT
- help
- 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 FEATURE_MTAB_SUPPORT
- bool "Support for the old /etc/mtab file"
- default n
- depends on MOUNT || UMOUNT
- select FEATURE_MOUNT_FAKE
- help
- 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, 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
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-lib-$(CONFIG_DMESG) += dmesg.o
-lib-$(CONFIG_FBSET) += fbset.o
-lib-$(CONFIG_FDFLUSH) += freeramdisk.o
-lib-$(CONFIG_FDFORMAT) += fdformat.o
-lib-$(CONFIG_FDISK) += fdisk.o
-lib-$(CONFIG_FINDFS) += findfs.o
-lib-$(CONFIG_FREERAMDISK) += freeramdisk.o
-lib-$(CONFIG_FSCK_MINIX) += fsck_minix.o
-lib-$(CONFIG_GETOPT) += getopt.o
-lib-$(CONFIG_HEXDUMP) += hexdump.o
-lib-$(CONFIG_HWCLOCK) += hwclock.o
-lib-$(CONFIG_IPCRM) += ipcrm.o
-lib-$(CONFIG_IPCS) += ipcs.o
-lib-$(CONFIG_LOSETUP) += losetup.o
-lib-$(CONFIG_MDEV) += mdev.o
-lib-$(CONFIG_MKFS_MINIX) += mkfs_minix.o
-lib-$(CONFIG_MKSWAP) += mkswap.o
-lib-$(CONFIG_MORE) += more.o
-lib-$(CONFIG_MOUNT) += mount.o
-lib-$(CONFIG_PIVOT_ROOT) += pivot_root.o
-lib-$(CONFIG_RDATE) += rdate.o
-lib-$(CONFIG_READPROFILE) += readprofile.o
-lib-$(CONFIG_RTCWAKE) += rtcwake.o
-lib-$(CONFIG_SCRIPT) += script.o
-lib-$(CONFIG_SETARCH) += setarch.o
-lib-$(CONFIG_SWAPONOFF) += swaponoff.o
-lib-$(CONFIG_SWITCH_ROOT) += switch_root.o
-lib-$(CONFIG_UMOUNT) += umount.o
+++ /dev/null
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-lib-y:=
-
-lib-$(CONFIG_FINDFS) += get_devname.o
-lib-$(CONFIG_FEATURE_MOUNT_LABEL) += get_devname.o
-
-lib-$(CONFIG_VOLUMEID) += volume_id.o util.o
-lib-$(CONFIG_FEATURE_VOLUMEID_EXT) += ext.o
-lib-$(CONFIG_FEATURE_VOLUMEID_FAT) += fat.o
-lib-$(CONFIG_FEATURE_VOLUMEID_HFS) += hfs.o
-### lib-$(CONFIG_FEATURE_VOLUMEID_HIGHPOINTRAID) += highpoint.o
-### lib-$(CONFIG_FEATURE_VOLUMEID_ISWRAID) += isw_raid.o
-### lib-$(CONFIG_FEATURE_VOLUMEID_LSIRAID) += lsi_raid.o
-### lib-$(CONFIG_FEATURE_VOLUMEID_VIARAID) += via_raid.o
-### lib-$(CONFIG_FEATURE_VOLUMEID_SILICONRAID) += silicon_raid.o
-### lib-$(CONFIG_FEATURE_VOLUMEID_NVIDIARAID) += nvidia_raid.o
-### lib-$(CONFIG_FEATURE_VOLUMEID_PROMISERAID) += promise_raid.o
-lib-$(CONFIG_FEATURE_VOLUMEID_ISO9660) += iso9660.o
-lib-$(CONFIG_FEATURE_VOLUMEID_JFS) += jfs.o
-lib-$(CONFIG_FEATURE_VOLUMEID_LINUXRAID) += linux_raid.o
-lib-$(CONFIG_FEATURE_VOLUMEID_LINUXSWAP) += linux_swap.o
-### lib-$(CONFIG_FEATURE_VOLUMEID_LVM) += lvm.o
-### lib-$(CONFIG_FEATURE_VOLUMEID_MAC) += mac.o
-### lib-$(CONFIG_FEATURE_VOLUMEID_MSDOS) += msdos.o
-lib-$(CONFIG_FEATURE_VOLUMEID_NTFS) += ntfs.o
-lib-$(CONFIG_FEATURE_VOLUMEID_REISERFS) += reiserfs.o
-lib-$(CONFIG_FEATURE_VOLUMEID_UDF) += udf.o
-### lib-$(CONFIG_FEATURE_VOLUMEID_UFS) += ufs.o
-lib-$(CONFIG_FEATURE_VOLUMEID_XFS) += xfs.o
-lib-$(CONFIG_FEATURE_VOLUMEID_CRAMFS) += cramfs.o
-### lib-$(CONFIG_FEATURE_VOLUMEID_HPFS) += hpfs.o
-lib-$(CONFIG_FEATURE_VOLUMEID_ROMFS) += romfs.o
-lib-$(CONFIG_FEATURE_VOLUMEID_SYSV) += sysv.o
-### lib-$(CONFIG_FEATURE_VOLUMEID_MINIX) += minix.o
-lib-$(CONFIG_FEATURE_VOLUMEID_LUKS) += luks.o
-lib-$(CONFIG_FEATURE_VOLUMEID_OCFS2) += ocfs2.o