diff options
Diffstat (limited to '')
-rw-r--r-- | debianutils/run_parts.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index b93a5a917..0c2302696 100644 --- a/debianutils/run_parts.c +++ b/debianutils/run_parts.c | |||
@@ -30,6 +30,32 @@ | |||
30 | * -u MASK umask. Set the umask of the program executed to MASK. | 30 | * -u MASK umask. Set the umask of the program executed to MASK. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | //usage:#define run_parts_trivial_usage | ||
34 | //usage: "[-t] "IF_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY" | ||
35 | //usage:#define run_parts_full_usage "\n\n" | ||
36 | //usage: "Run a bunch of scripts in DIRECTORY\n" | ||
37 | //usage: "\nOptions:" | ||
38 | //usage: "\n -t Print what would be run, but don't actually run anything" | ||
39 | //usage: "\n -a ARG Pass ARG as argument for every program" | ||
40 | //usage: "\n -u MASK Set the umask to MASK before running every program" | ||
41 | //usage: IF_FEATURE_RUN_PARTS_FANCY( | ||
42 | //usage: "\n -l Print names of all matching files even if they are not executable" | ||
43 | //usage: ) | ||
44 | //usage: | ||
45 | //usage:#define run_parts_example_usage | ||
46 | //usage: "$ run-parts -a start /etc/init.d\n" | ||
47 | //usage: "$ run-parts -a stop=now /etc/init.d\n\n" | ||
48 | //usage: "Let's assume you have a script foo/dosomething:\n" | ||
49 | //usage: "#!/bin/sh\n" | ||
50 | //usage: "for i in $*; do eval $i; done; unset i\n" | ||
51 | //usage: "case \"$1\" in\n" | ||
52 | //usage: "start*) echo starting something;;\n" | ||
53 | //usage: "stop*) set -x; shutdown -h $stop;;\n" | ||
54 | //usage: "esac\n\n" | ||
55 | //usage: "Running this yields:\n" | ||
56 | //usage: "$run-parts -a stop=+4m foo/\n" | ||
57 | //usage: "+ shutdown -h +4m" | ||
58 | |||
33 | #include "libbb.h" | 59 | #include "libbb.h" |
34 | 60 | ||
35 | struct globals { | 61 | struct globals { |