Run parts applet by Emanuele Aina <faina.mail@tiscalinet.it>
authorEric Andersen <andersen@codepoet.org>
Wed, 31 Oct 2001 10:24:36 +0000 (10:24 -0000)
committerEric Andersen <andersen@codepoet.org>
Wed, 31 Oct 2001 10:24:36 +0000 (10:24 -0000)
AUTHORS
Makefile
applets/usage.h
docs/busybox.sgml
include/applets.h
include/usage.h
init/Makefile
init/config.in

diff --git a/AUTHORS b/AUTHORS
index 5d77149711e4a6c3368e68b45be12d35a97aca43..811a5834ea13899448001c62111dfdd31a47b2c3 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -88,3 +88,6 @@ Charles P. Wright <cpwright@villagenet.com>
 Enrique Zanardi <ezanardi@ull.es>
     tarcat (since removed), loadkmap, various fixes, Debian maintenance
 
+Emanuele Aina <emanuele.aina@tiscali.it>
+       run-parts
+
index 0ff3afff680e5831224d3b1e7b0147d59be4f5e1..acd527c4150bd3e6dd992197f6ac9bd1b775e7d6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -147,7 +147,7 @@ ifeq ($(strip $(DODEBUG)),true)
     LDFLAGS += -Wl,-warn-common
     STRIPCMD    =
 else
-    CFLAGS  += $(WARNINGS) $(OPTIMIZATION) -fomit-frame-pointer -D_GNU_SOURCE
+    CFLAGS  += $(WARNINGS) $(OPTIMIZATION) -fomit-frame-pointer -mpreferred-stack-boundary=2 -D_GNU_SOURCE
     LDFLAGS += -s -Wl,-warn-common
     STRIPCMD    = $(STRIP) --remove-section=.note --remove-section=.comment $(PROG)
 endif
index 1de29666ed6bd2ca603147a934fb6d7c330d0c8b..bbed44d0c22276b8f72f7a35bed7bff9f239aa65 100644 (file)
        "\t-s\t\tShort\n" \
        "\t-i\t\tAddresses for the hostname\n" \
        "\t-d\t\tDNS domain name\n" \
+       "\t-f\t\tFully qualified domain name\n" \
        "\t-F, --file FILE\tUse the contents of FILE to specify the hostname"
 #define hostname_example_usage \
        "$ hostname\n" \
 #define rpm2cpio_full_usage \
        "Outputs a cpio archive of the rpm file."
 
+#define run_parts_trivial_usage \
+       "[-t] [-a ARG] [-u MASK] DIRECTORY"
+#define run_parts_full_usage \
+       "Run a bunch of scripts in a directory.\n\n" \
+       "Options:\n" \
+       "\t-t\t\tTest only what file will be executed, without execute them.\n" \
+       "\t-a ARG\tPass ARG as an argument for every program invoked.\n" \
+       "\t-u MASK\tSet the umask to MASK before executing every program."
+
 #define sed_trivial_usage \
        "[-nef] pattern [files...]"
 #define sed_full_usage \
index 2d372506b190a3ccd2591b3c00e22b87f845c0ac..34559dab45023cf831dddaa09543ddc591d0d518 100644 (file)
                loadacm, loadfont, loadkmap, logger, logname, ls, lsmod,
                makedevs, mkdir, mkfifo, mkfs.minix, mknod, mkswap, mktemp,
                more, mount, mt, mv, nc, nslookup, ping, poweroff, printf, ps,
-               pwd, reboot, renice, reset, rm, rmdir, rmmod, sed, setkeycodes, sh, sleep,
+               pwd, reboot, renice, reset, rm, rmdir, rmmod, run-parts, sed, setkeycodes, sh, sleep,
                sort, swapoff, swapon, sync, syslogd, tail, tar, tee, telnet,
                test, touch, tr, true, tty, umount, uname, uniq, update,
                uptime, usleep, uudecode, uuencode, wc, which, whoami, yes,
                </para>
        </sect1>
 
+    <sect1 id="run-parts">
+       <title>run-parts</title>
+       
+               <para>
+               Usage: run-parts [-t] [-a ARG] [-u MASK] DIRECTORY
+               </para>
+       
+               <para>
+               Run a bunch of scripts in a directory.
+               </para>
+       
+               <para>
+               Options:
+               </para>
+       
+               <para>
+               <screen>
+                       -t       Test only. It only print the file to be executed,
+                       without execute them.
+                       -a ARG   Pass ARG as an a argument to the programs executed.
+                       -u MASK  Set the umask to MASK before executing the programs.
+               </screen>
+               </para>
+       </sect1>
+       
+
+       
        <sect1 id="sed">
            <title>sed</title>
 
index effbb5233d2e96cfb46b57e75442ae587b9cae8c..b0536ac01e9af0ef18b3e06b37043cfd63388048 100644 (file)
 #ifdef CONFIG_RPM2CPIO
        APPLET(rpm2cpio, rpm2cpio_main, _BB_DIR_USR_BIN)
 #endif
+#ifdef CONFIG_RUN_PARTS
+       APPLET_ODDNAME("run-parts", run_parts_main, _BB_DIR_BIN, run_parts)
+#endif 
 #ifdef CONFIG_SED
        APPLET(sed, sed_main, _BB_DIR_BIN)
 #endif
index 1de29666ed6bd2ca603147a934fb6d7c330d0c8b..bbed44d0c22276b8f72f7a35bed7bff9f239aa65 100644 (file)
        "\t-s\t\tShort\n" \
        "\t-i\t\tAddresses for the hostname\n" \
        "\t-d\t\tDNS domain name\n" \
+       "\t-f\t\tFully qualified domain name\n" \
        "\t-F, --file FILE\tUse the contents of FILE to specify the hostname"
 #define hostname_example_usage \
        "$ hostname\n" \
 #define rpm2cpio_full_usage \
        "Outputs a cpio archive of the rpm file."
 
+#define run_parts_trivial_usage \
+       "[-t] [-a ARG] [-u MASK] DIRECTORY"
+#define run_parts_full_usage \
+       "Run a bunch of scripts in a directory.\n\n" \
+       "Options:\n" \
+       "\t-t\t\tTest only what file will be executed, without execute them.\n" \
+       "\t-a ARG\tPass ARG as an argument for every program invoked.\n" \
+       "\t-u MASK\tSet the umask to MASK before executing every program."
+
 #define sed_trivial_usage \
        "[-nef] pattern [files...]"
 #define sed_full_usage \
index 472fb02b1281dd403eb0a76412fd8824b45251ff..76f49794db49f732ee31b28cabb9cc0581122435 100644 (file)
@@ -29,6 +29,7 @@ obj-$(CONFIG_INIT)            += init.o
 obj-$(CONFIG_POWEROFF)         += poweroff.o
 obj-$(CONFIG_REBOOT)           += reboot.o
 obj-$(CONFIG_START_STOP_DAEMON)        += start_stop_daemon.o
+obj-$(CONFIG_RUN_PARTS)                += run_parts.o
 
 
 # Hand off to toplevel Rules.mak
index 1d4760c2c21248d97f9dd982edac355051da441f..1174e21d53dc16dcc92845964c84a580e028a711 100644 (file)
@@ -21,5 +21,7 @@ if [ "$CONFIG_INIT" = "y" ]; then
     bool 'start-stop-daemon'       CONFIG_START_STOP_DAEMON
 fi
 
+bool 'run-parts'           CONFIG_RUN_PARTS
+       
 endmenu