summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen2001-10-31 10:24:36 +0000
committerEric Andersen2001-10-31 10:24:36 +0000
commit6cf47a79acfef8dbe4e651560f59200978b656b1 (patch)
tree3ae009b33f74d131da1747d558ab357511136f7d
parent2bc4dec7a15998fa37c03005a9612c7f22df4f7a (diff)
downloadbusybox-6cf47a79acfef8dbe4e651560f59200978b656b1.zip
busybox-6cf47a79acfef8dbe4e651560f59200978b656b1.tar.gz
Run parts applet by Emanuele Aina <faina.mail@tiscalinet.it>
-rw-r--r--AUTHORS3
-rw-r--r--Makefile2
-rw-r--r--applets/usage.h10
-rw-r--r--docs/busybox.sgml29
-rw-r--r--include/applets.h3
-rw-r--r--include/usage.h10
-rw-r--r--init/Makefile1
-rw-r--r--init/config.in2
8 files changed, 58 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index 5d77149..811a583 100644
--- 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
+
diff --git a/Makefile b/Makefile
index 0ff3aff..acd527c 100644
--- 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
diff --git a/applets/usage.h b/applets/usage.h
index 1de2966..bbed44d 100644
--- a/applets/usage.h
+++ b/applets/usage.h
@@ -660,6 +660,7 @@
"\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" \
@@ -1382,6 +1383,15 @@
#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 \
diff --git a/docs/busybox.sgml b/docs/busybox.sgml
index 2d37250..34559da 100644
--- a/docs/busybox.sgml
+++ b/docs/busybox.sgml
@@ -144,7 +144,7 @@
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,
@@ -2799,6 +2799,33 @@
</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>
diff --git a/include/applets.h b/include/applets.h
index effbb52..b0536ac 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -365,6 +365,9 @@
#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
diff --git a/include/usage.h b/include/usage.h
index 1de2966..bbed44d 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -660,6 +660,7 @@
"\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" \
@@ -1382,6 +1383,15 @@
#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 \
diff --git a/init/Makefile b/init/Makefile
index 472fb02..76f4979 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -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
diff --git a/init/config.in b/init/config.in
index 1d4760c..1174e21 100644
--- a/init/config.in
+++ b/init/config.in
@@ -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