aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPere Orga <gotrunks@gmail.com>2011-04-01 22:56:30 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-04-03 01:33:55 +0200
commit6a3e01d5a9f979f7d6e52665c2bf6c74e2592980 (patch)
treeb7d40d6e0c6042f0d102101ff7b5784d2f0536ba
parentfa9126e68904b16aee2a0fc47688ffe17403152a (diff)
downloadbusybox-w32-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.tar.gz
busybox-w32-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.tar.bz2
busybox-w32-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.zip
move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors/*.c loginutils/*.c mailutils/*.c
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/length.c.disabled9
-rw-r--r--debianutils/pipe_progress.c4
-rw-r--r--debianutils/run_parts.c26
-rw-r--r--debianutils/start_stop_daemon.c63
-rw-r--r--debianutils/which.c9
-rw-r--r--e2fsprogs/chattr.c24
-rw-r--r--e2fsprogs/fsck.c14
-rw-r--r--e2fsprogs/lsattr.c11
-rw-r--r--editors/awk.c8
-rw-r--r--editors/cmp.c9
-rw-r--r--editors/diff.c22
-rw-r--r--editors/ed.c3
-rw-r--r--editors/sed.c17
-rw-r--r--editors/vi.c13
-rw-r--r--include/usage.src.h400
-rw-r--r--loginutils/addgroup.c9
-rw-r--r--loginutils/adduser.c15
-rw-r--r--loginutils/chpasswd.c14
-rw-r--r--loginutils/cryptpw.c39
-rw-r--r--loginutils/deluser.c12
-rw-r--r--loginutils/login.c10
-rw-r--r--loginutils/passwd.c12
-rw-r--r--loginutils/sulogin.c7
-rw-r--r--loginutils/vlock.c7
-rw-r--r--mailutils/mime.c27
-rw-r--r--mailutils/popmaildir.c34
26 files changed, 418 insertions, 400 deletions
diff --git a/coreutils/length.c.disabled b/coreutils/length.c.disabled
index 7f0b48ccd..aee898d22 100644
--- a/coreutils/length.c.disabled
+++ b/coreutils/length.c.disabled
@@ -5,6 +5,15 @@
5 5
6/* BB_AUDIT SUSv3 N/A -- Apparently a busybox (obsolete?) extension. */ 6/* BB_AUDIT SUSv3 N/A -- Apparently a busybox (obsolete?) extension. */
7 7
8//usage:#define length_trivial_usage
9//usage: "STRING"
10//usage:#define length_full_usage "\n\n"
11//usage: "Print STRING's length"
12//usage:
13//usage:#define length_example_usage
14//usage: "$ length Hello\n"
15//usage: "5\n"
16
8#include "libbb.h" 17#include "libbb.h"
9 18
10/* This is a NOFORK applet. Be very careful! */ 19/* This is a NOFORK applet. Be very careful! */
diff --git a/debianutils/pipe_progress.c b/debianutils/pipe_progress.c
index 1e57dc241..2c7444f31 100644
--- a/debianutils/pipe_progress.c
+++ b/debianutils/pipe_progress.c
@@ -6,6 +6,10 @@
6 * 6 *
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9
10//usage:#define pipe_progress_trivial_usage NOUSAGE_STR
11//usage:#define pipe_progress_full_usage ""
12
9#include "libbb.h" 13#include "libbb.h"
10 14
11#define PIPE_PROGRESS_SIZE 4096 15#define PIPE_PROGRESS_SIZE 4096
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
35struct globals { 61struct globals {
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c
index d2ee95068..30dd9709d 100644
--- a/debianutils/start_stop_daemon.c
+++ b/debianutils/start_stop_daemon.c
@@ -56,6 +56,69 @@ Misc options:
56 -v,--verbose Verbose 56 -v,--verbose Verbose
57*/ 57*/
58 58
59//usage:#define start_stop_daemon_trivial_usage
60//usage: "[OPTIONS] [-S|-K] ... [-- ARGS...]"
61//usage:#define start_stop_daemon_full_usage "\n\n"
62//usage: "Search for matching processes, and then\n"
63//usage: "-K: stop all matching processes.\n"
64//usage: "-S: start a process unless a matching process is found.\n"
65//usage: IF_FEATURE_START_STOP_DAEMON_LONG_OPTIONS(
66//usage: "\nProcess matching:"
67//usage: "\n -u,--user USERNAME|UID Match only this user's processes"
68//usage: "\n -n,--name NAME Match processes with NAME"
69//usage: "\n in comm field in /proc/PID/stat"
70//usage: "\n -x,--exec EXECUTABLE Match processes with this command"
71//usage: "\n in /proc/PID/cmdline"
72//usage: "\n -p,--pidfile FILE Match a process with PID from the file"
73//usage: "\n All specified conditions must match"
74//usage: "\n-S only:"
75//usage: "\n -x,--exec EXECUTABLE Program to run"
76//usage: "\n -a,--startas NAME Zeroth argument"
77//usage: "\n -b,--background Background"
78//usage: IF_FEATURE_START_STOP_DAEMON_FANCY(
79//usage: "\n -N,--nicelevel N Change nice level"
80//usage: )
81//usage: "\n -c,--chuid USER[:[GRP]] Change to user/group"
82//usage: "\n -m,--make-pidfile Write PID to the pidfile specified by -p"
83//usage: "\n-K only:"
84//usage: "\n -s,--signal SIG Signal to send"
85//usage: "\n -t,--test Match only, exit with 0 if a process is found"
86//usage: "\nOther:"
87//usage: IF_FEATURE_START_STOP_DAEMON_FANCY(
88//usage: "\n -o,--oknodo Exit with status 0 if nothing is done"
89//usage: "\n -v,--verbose Verbose"
90//usage: )
91//usage: "\n -q,--quiet Quiet"
92//usage: )
93//usage: IF_NOT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS(
94//usage: "\nProcess matching:"
95//usage: "\n -u USERNAME|UID Match only this user's processes"
96//usage: "\n -n NAME Match processes with NAME"
97//usage: "\n in comm field in /proc/PID/stat"
98//usage: "\n -x EXECUTABLE Match processes with this command"
99//usage: "\n command in /proc/PID/cmdline"
100//usage: "\n -p FILE Match a process with PID from the file"
101//usage: "\n All specified conditions must match"
102//usage: "\n-S only:"
103//usage: "\n -x EXECUTABLE Program to run"
104//usage: "\n -a NAME Zeroth argument"
105//usage: "\n -b Background"
106//usage: IF_FEATURE_START_STOP_DAEMON_FANCY(
107//usage: "\n -N N Change nice level"
108//usage: )
109//usage: "\n -c USER[:[GRP]] Change to user/group"
110//usage: "\n -m Write PID to the pidfile specified by -p"
111//usage: "\n-K only:"
112//usage: "\n -s SIG Signal to send"
113//usage: "\n -t Match only, exit with 0 if a process is found"
114//usage: "\nOther:"
115//usage: IF_FEATURE_START_STOP_DAEMON_FANCY(
116//usage: "\n -o Exit with status 0 if nothing is done"
117//usage: "\n -v Verbose"
118//usage: )
119//usage: "\n -q Quiet"
120//usage: )
121
59#include <sys/resource.h> 122#include <sys/resource.h>
60 123
61/* Override ENABLE_FEATURE_PIDFILE */ 124/* Override ENABLE_FEATURE_PIDFILE */
diff --git a/debianutils/which.c b/debianutils/which.c
index a82641909..15fd598b7 100644
--- a/debianutils/which.c
+++ b/debianutils/which.c
@@ -10,6 +10,15 @@
10 * Based on which from debianutils 10 * Based on which from debianutils
11 */ 11 */
12 12
13//usage:#define which_trivial_usage
14//usage: "[COMMAND]..."
15//usage:#define which_full_usage "\n\n"
16//usage: "Locate a COMMAND"
17//usage:
18//usage:#define which_example_usage
19//usage: "$ which login\n"
20//usage: "/bin/login\n"
21
13#include "libbb.h" 22#include "libbb.h"
14 23
15int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 24int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/e2fsprogs/chattr.c b/e2fsprogs/chattr.c
index ab52cb009..b1c77faad 100644
--- a/e2fsprogs/chattr.c
+++ b/e2fsprogs/chattr.c
@@ -19,6 +19,30 @@
19 * 98/12/29 - Display version info only when -V specified (G M Sipe) 19 * 98/12/29 - Display version info only when -V specified (G M Sipe)
20 */ 20 */
21 21
22//usage:#define chattr_trivial_usage
23//usage: "[-R] [-+=AacDdijsStTu] [-v VERSION] [FILE]..."
24//usage:#define chattr_full_usage "\n\n"
25//usage: "Change file attributes on an ext2 fs\n"
26//usage: "\nModifiers:"
27//usage: "\n - Remove attributes"
28//usage: "\n + Add attributes"
29//usage: "\n = Set attributes"
30//usage: "\nAttributes:"
31//usage: "\n A Don't track atime"
32//usage: "\n a Append mode only"
33//usage: "\n c Enable compress"
34//usage: "\n D Write dir contents synchronously"
35//usage: "\n d Don't backup with dump"
36//usage: "\n i Cannot be modified (immutable)"
37//usage: "\n j Write all data to journal first"
38//usage: "\n s Zero disk storage when deleted"
39//usage: "\n S Write file contents synchronously"
40//usage: "\n t Disable tail-merging of partial blocks with other files"
41//usage: "\n u Allow file to be undeleted"
42//usage: "\nOptions:"
43//usage: "\n -R Recurse"
44//usage: "\n -v Set the file's version/generation number"
45
22#include "libbb.h" 46#include "libbb.h"
23#include "e2fs_lib.h" 47#include "e2fs_lib.h"
24 48
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index a86a9d96f..b4257a2ad 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -34,6 +34,20 @@
34 * It doesn't guess filesystem types from on-disk format. 34 * It doesn't guess filesystem types from on-disk format.
35 */ 35 */
36 36
37//usage:#define fsck_trivial_usage
38//usage: "[-ANPRTV] [-C FD] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]..."
39//usage:#define fsck_full_usage "\n\n"
40//usage: "Check and repair filesystems\n"
41//usage: "\nOptions:"
42//usage: "\n -A Walk /etc/fstab and check all filesystems"
43//usage: "\n -N Don't execute, just show what would be done"
44//usage: "\n -P With -A, check filesystems in parallel"
45//usage: "\n -R With -A, skip the root filesystem"
46//usage: "\n -T Don't show title on startup"
47//usage: "\n -V Verbose"
48//usage: "\n -C n Write status information to specified filedescriptor"
49//usage: "\n -t TYPE List of filesystem types to check"
50
37#include "libbb.h" 51#include "libbb.h"
38 52
39/* "progress indicator" code is somewhat buggy and ext[23] specific. 53/* "progress indicator" code is somewhat buggy and ext[23] specific.
diff --git a/e2fsprogs/lsattr.c b/e2fsprogs/lsattr.c
index 7d475a969..964e8d026 100644
--- a/e2fsprogs/lsattr.c
+++ b/e2fsprogs/lsattr.c
@@ -18,6 +18,17 @@
18 * 98/12/29 - Display version info only when -V specified (G M Sipe) 18 * 98/12/29 - Display version info only when -V specified (G M Sipe)
19 */ 19 */
20 20
21//usage:#define lsattr_trivial_usage
22//usage: "[-Radlv] [FILE]..."
23//usage:#define lsattr_full_usage "\n\n"
24//usage: "List file attributes on an ext2 fs\n"
25//usage: "\nOptions:"
26//usage: "\n -R Recurse"
27//usage: "\n -a Don't hide entries starting with ."
28//usage: "\n -d List directory entries instead of contents"
29//usage: "\n -l List long flag names"
30//usage: "\n -v List the file's version/generation number"
31
21#include "libbb.h" 32#include "libbb.h"
22#include "e2fs_lib.h" 33#include "e2fs_lib.h"
23 34
diff --git a/editors/awk.c b/editors/awk.c
index 2eeb9d77a..9d38b1f88 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -7,6 +7,14 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9 9
10//usage:#define awk_trivial_usage
11//usage: "[OPTIONS] [AWK_PROGRAM] [FILE]..."
12//usage:#define awk_full_usage "\n\n"
13//usage: "Options:"
14//usage: "\n -v VAR=VAL Set variable"
15//usage: "\n -F SEP Use SEP as field separator"
16//usage: "\n -f FILE Read program from FILE"
17
10#include "libbb.h" 18#include "libbb.h"
11#include "xregex.h" 19#include "xregex.h"
12#include <math.h> 20#include <math.h>
diff --git a/editors/cmp.c b/editors/cmp.c
index f84a56e3e..3a0f5aa4f 100644
--- a/editors/cmp.c
+++ b/editors/cmp.c
@@ -10,6 +10,15 @@
10/* BB_AUDIT SUSv3 (virtually) compliant -- uses nicer GNU format for -l. */ 10/* BB_AUDIT SUSv3 (virtually) compliant -- uses nicer GNU format for -l. */
11/* http://www.opengroup.org/onlinepubs/007904975/utilities/cmp.html */ 11/* http://www.opengroup.org/onlinepubs/007904975/utilities/cmp.html */
12 12
13//usage:#define cmp_trivial_usage
14//usage: "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]"
15//usage:#define cmp_full_usage "\n\n"
16//usage: "Compare FILE1 with FILE2 (or stdin)\n"
17//usage: "\nOptions:"
18//usage: "\n -l Write the byte numbers (decimal) and values (octal)"
19//usage: "\n for all differing bytes"
20//usage: "\n -s Quiet"
21
13#include "libbb.h" 22#include "libbb.h"
14 23
15static const char fmt_eof[] ALIGN1 = "cmp: EOF on %s\n"; 24static const char fmt_eof[] ALIGN1 = "cmp: EOF on %s\n";
diff --git a/editors/diff.c b/editors/diff.c
index 3719bb49f..daa58af9b 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -76,6 +76,28 @@
76 * 6n words for files of length n. 76 * 6n words for files of length n.
77 */ 77 */
78 78
79//usage:#define diff_trivial_usage
80//usage: "[-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2"
81//usage:#define diff_full_usage "\n\n"
82//usage: "Compare files line by line and output the differences between them.\n"
83//usage: "This implementation supports unified diffs only.\n"
84//usage: "\nOptions:"
85//usage: "\n -a Treat all files as text"
86//usage: "\n -b Ignore changes in the amount of whitespace"
87//usage: "\n -B Ignore changes whose lines are all blank"
88//usage: "\n -d Try hard to find a smaller set of changes"
89//usage: "\n -i Ignore case differences"
90//usage: "\n -L Use LABEL instead of the filename in the unified header"
91//usage: "\n -N Treat absent files as empty"
92//usage: "\n -q Output only whether files differ"
93//usage: "\n -r Recurse"
94//usage: "\n -S Start with FILE when comparing directories"
95//usage: "\n -T Make tabs line up by prefixing a tab when necessary"
96//usage: "\n -s Report when two files are the same"
97//usage: "\n -t Expand tabs to spaces in output"
98//usage: "\n -U Output LINES lines of context"
99//usage: "\n -w Ignore all whitespace"
100
79#include "libbb.h" 101#include "libbb.h"
80 102
81#if 0 103#if 0
diff --git a/editors/ed.c b/editors/ed.c
index b1b6a8d27..41ac88c32 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -7,6 +7,9 @@
7 * The "ed" built-in command (much simplified) 7 * The "ed" built-in command (much simplified)
8 */ 8 */
9 9
10//usage:#define ed_trivial_usage ""
11//usage:#define ed_full_usage ""
12
10#include "libbb.h" 13#include "libbb.h"
11 14
12typedef struct LINE { 15typedef struct LINE {
diff --git a/editors/sed.c b/editors/sed.c
index d3555243f..9ab758bd7 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -58,6 +58,23 @@
58 Reference http://www.opengroup.org/onlinepubs/007904975/utilities/sed.html 58 Reference http://www.opengroup.org/onlinepubs/007904975/utilities/sed.html
59*/ 59*/
60 60
61//usage:#define sed_trivial_usage
62//usage: "[-efinr] SED_CMD [FILE]..."
63//usage:#define sed_full_usage "\n\n"
64//usage: "Options:"
65//usage: "\n -e CMD Add CMD to sed commands to be executed"
66//usage: "\n -f FILE Add FILE contents to sed commands to be executed"
67//usage: "\n -i Edit files in-place (else sends result to stdout)"
68//usage: "\n -n Suppress automatic printing of pattern space"
69//usage: "\n -r Use extended regex syntax"
70//usage: "\n"
71//usage: "\nIf no -e or -f, the first non-option argument is the sed command string."
72//usage: "\nRemaining arguments are input files (stdin if none)."
73//usage:
74//usage:#define sed_example_usage
75//usage: "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n"
76//usage: "bar\n"
77
61#include "libbb.h" 78#include "libbb.h"
62#include "xregex.h" 79#include "xregex.h"
63 80
diff --git a/editors/vi.c b/editors/vi.c
index 602fc61d9..fd8bd0f78 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -21,6 +21,19 @@
21 * An "ex" line oriented mode- maybe using "cmdedit" 21 * An "ex" line oriented mode- maybe using "cmdedit"
22 */ 22 */
23 23
24//usage:#define vi_trivial_usage
25//usage: "[OPTIONS] [FILE]..."
26//usage:#define vi_full_usage "\n\n"
27//usage: "Edit FILE\n"
28//usage: "\nOptions:"
29//usage: IF_FEATURE_VI_COLON(
30//usage: "\n -c Initial command to run ($EXINIT also available)"
31//usage: )
32//usage: IF_FEATURE_VI_READONLY(
33//usage: "\n -R Read-only"
34//usage: )
35//usage: "\n -H Short help regarding available features"
36
24#include "libbb.h" 37#include "libbb.h"
25 38
26/* the CRASHME code is unmaintained, and doesn't currently build */ 39/* the CRASHME code is unmaintained, and doesn't currently build */
diff --git a/include/usage.src.h b/include/usage.src.h
index d8360931f..2c88c46a1 100644
--- a/include/usage.src.h
+++ b/include/usage.src.h
@@ -40,28 +40,6 @@ INSERT
40 "# acpid -l /var/log/my-acpi-log\n" \ 40 "# acpid -l /var/log/my-acpi-log\n" \
41 "# acpid -e /proc/acpi/event\n" 41 "# acpid -e /proc/acpi/event\n"
42 42
43#define addgroup_trivial_usage \
44 "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[USER] ") "GROUP"
45#define addgroup_full_usage "\n\n" \
46 "Add a group " IF_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n" \
47 "\nOptions:" \
48 "\n -g GID Group id" \
49 "\n -S Create a system group" \
50
51#define adduser_trivial_usage \
52 "[OPTIONS] USER"
53#define adduser_full_usage "\n\n" \
54 "Add a user\n" \
55 "\nOptions:" \
56 "\n -h DIR Home directory" \
57 "\n -g GECOS GECOS field" \
58 "\n -s SHELL Login shell" \
59 "\n -G GRP Add user to existing group" \
60 "\n -S Create a system user" \
61 "\n -D Don't assign a password" \
62 "\n -H Don't create home directory" \
63 "\n -u UID User id" \
64
65#define adjtimex_trivial_usage \ 43#define adjtimex_trivial_usage \
66 "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]" 44 "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]"
67#define adjtimex_full_usage "\n\n" \ 45#define adjtimex_full_usage "\n\n" \
@@ -110,14 +88,6 @@ INSERT
110 "\n -s SRC_IP Sender IP address" \ 88 "\n -s SRC_IP Sender IP address" \
111 "\n DST_IP Target IP address" \ 89 "\n DST_IP Target IP address" \
112 90
113#define awk_trivial_usage \
114 "[OPTIONS] [AWK_PROGRAM] [FILE]..."
115#define awk_full_usage "\n\n" \
116 "Options:" \
117 "\n -v VAR=VAL Set variable" \
118 "\n -F SEP Use SEP as field separator" \
119 "\n -f FILE Read program from FILE" \
120
121#define beep_trivial_usage \ 91#define beep_trivial_usage \
122 "-f FREQ -l LEN -d DELAY -r COUNT -n" 92 "-f FREQ -l LEN -d DELAY -r COUNT -n"
123#define beep_full_usage "\n\n" \ 93#define beep_full_usage "\n\n" \
@@ -167,30 +137,6 @@ INSERT
167 "each pair is a pair of arguments. Example:\n" \ 137 "each pair is a pair of arguments. Example:\n" \
168 "chat '' ATZ OK ATD123456 CONNECT '' ogin: pppuser word: ppppass '~'" \ 138 "chat '' ATZ OK ATD123456 CONNECT '' ogin: pppuser word: ppppass '~'" \
169 139
170#define chattr_trivial_usage \
171 "[-R] [-+=AacDdijsStTu] [-v VERSION] [FILE]..."
172#define chattr_full_usage "\n\n" \
173 "Change file attributes on an ext2 fs\n" \
174 "\nModifiers:" \
175 "\n - Remove attributes" \
176 "\n + Add attributes" \
177 "\n = Set attributes" \
178 "\nAttributes:" \
179 "\n A Don't track atime" \
180 "\n a Append mode only" \
181 "\n c Enable compress" \
182 "\n D Write dir contents synchronously" \
183 "\n d Don't backup with dump" \
184 "\n i Cannot be modified (immutable)" \
185 "\n j Write all data to journal first" \
186 "\n s Zero disk storage when deleted" \
187 "\n S Write file contents synchronously" \
188 "\n t Disable tail-merging of partial blocks with other files" \
189 "\n u Allow file to be undeleted" \
190 "\nOptions:" \
191 "\n -R Recurse" \
192 "\n -v Set the file's version/generation number" \
193
194#define chcon_trivial_usage \ 140#define chcon_trivial_usage \
195 "[OPTIONS] CONTEXT FILE..." \ 141 "[OPTIONS] CONTEXT FILE..." \
196 "\n chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..." \ 142 "\n chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..." \
@@ -284,15 +230,6 @@ INSERT
284 "\n -t N Limit CPU time, process receives" \ 230 "\n -t N Limit CPU time, process receives" \
285 "\n a SIGXCPU after N seconds" \ 231 "\n a SIGXCPU after N seconds" \
286 232
287#define cmp_trivial_usage \
288 "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]"
289#define cmp_full_usage "\n\n" \
290 "Compare FILE1 with FILE2 (or stdin)\n" \
291 "\nOptions:" \
292 "\n -l Write the byte numbers (decimal) and values (octal)" \
293 "\n for all differing bytes" \
294 "\n -s Quiet" \
295
296#define bbconfig_trivial_usage \ 233#define bbconfig_trivial_usage \
297 "" 234 ""
298#define bbconfig_full_usage "\n\n" \ 235#define bbconfig_full_usage "\n\n" \
@@ -355,57 +292,6 @@ INSERT
355 "\n -r Delete crontab" \ 292 "\n -r Delete crontab" \
356 "\n FILE Replace crontab by FILE ('-': stdin)" \ 293 "\n FILE Replace crontab by FILE ('-': stdin)" \
357 294
358#define cryptpw_trivial_usage \
359 "[OPTIONS] [PASSWORD] [SALT]"
360/* We do support -s, we just don't mention it */
361#define cryptpw_full_usage "\n\n" \
362 "Crypt the PASSWORD using crypt(3)\n" \
363 "\nOptions:" \
364 IF_LONG_OPTS( \
365 "\n -P,--password-fd=N Read password from fd N" \
366/* "\n -s,--stdin Use stdin; like -P0" */ \
367 "\n -m,--method=TYPE Encryption method TYPE" \
368 "\n -S,--salt=SALT" \
369 ) \
370 IF_NOT_LONG_OPTS( \
371 "\n -P N Read password from fd N" \
372/* "\n -s Use stdin; like -P0" */ \
373 "\n -m TYPE Encryption method TYPE" \
374 "\n -S SALT" \
375 ) \
376
377/* mkpasswd is an alias to cryptpw */
378
379#define mkpasswd_trivial_usage \
380 "[OPTIONS] [PASSWORD] [SALT]"
381/* We do support -s, we just don't mention it */
382#define mkpasswd_full_usage "\n\n" \
383 "Crypt the PASSWORD using crypt(3)\n" \
384 "\nOptions:" \
385 IF_LONG_OPTS( \
386 "\n -P,--password-fd=N Read password from fd N" \
387/* "\n -s,--stdin Use stdin; like -P0" */ \
388 "\n -m,--method=TYPE Encryption method TYPE" \
389 "\n -S,--salt=SALT" \
390 ) \
391 IF_NOT_LONG_OPTS( \
392 "\n -P N Read password from fd N" \
393/* "\n -s Use stdin; like -P0" */ \
394 "\n -m TYPE Encryption method TYPE" \
395 "\n -S SALT" \
396 ) \
397
398#define delgroup_trivial_usage \
399 IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
400#define delgroup_full_usage "\n\n" \
401 "Delete group GROUP from the system" \
402 IF_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
403
404#define deluser_trivial_usage \
405 "USER"
406#define deluser_full_usage "\n\n" \
407 "Delete USER from the system"
408
409#define devmem_trivial_usage \ 295#define devmem_trivial_usage \
410 "ADDRESS [WIDTH [VALUE]]" 296 "ADDRESS [WIDTH [VALUE]]"
411 297
@@ -435,28 +321,6 @@ INSERT
435#define dhcprelay_full_usage "\n\n" \ 321#define dhcprelay_full_usage "\n\n" \
436 "Relay DHCP requests between clients and server" \ 322 "Relay DHCP requests between clients and server" \
437 323
438#define diff_trivial_usage \
439 "[-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2"
440#define diff_full_usage "\n\n" \
441 "Compare files line by line and output the differences between them.\n" \
442 "This implementation supports unified diffs only.\n" \
443 "\nOptions:" \
444 "\n -a Treat all files as text" \
445 "\n -b Ignore changes in the amount of whitespace" \
446 "\n -B Ignore changes whose lines are all blank" \
447 "\n -d Try hard to find a smaller set of changes" \
448 "\n -i Ignore case differences" \
449 "\n -L Use LABEL instead of the filename in the unified header" \
450 "\n -N Treat absent files as empty" \
451 "\n -q Output only whether files differ" \
452 "\n -r Recurse" \
453 "\n -S Start with FILE when comparing directories" \
454 "\n -T Make tabs line up by prefixing a tab when necessary" \
455 "\n -s Report when two files are the same" \
456 "\n -t Expand tabs to spaces in output" \
457 "\n -U Output LINES lines of context" \
458 "\n -w Ignore all whitespace" \
459
460#define dmesg_trivial_usage \ 324#define dmesg_trivial_usage \
461 "[-c] [-n LEVEL] [-s SIZE]" 325 "[-c] [-n LEVEL] [-s SIZE]"
462#define dmesg_full_usage "\n\n" \ 326#define dmesg_full_usage "\n\n" \
@@ -531,9 +395,6 @@ INSERT
531 "\n -t Close tray" \ 395 "\n -t Close tray" \
532 "\n -T Open/close tray (toggle)" \ 396 "\n -T Open/close tray (toggle)" \
533 397
534#define ed_trivial_usage ""
535#define ed_full_usage ""
536
537#define ether_wake_trivial_usage \ 398#define ether_wake_trivial_usage \
538 "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC" 399 "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC"
539#define ether_wake_full_usage "\n\n" \ 400#define ether_wake_full_usage "\n\n" \
@@ -679,20 +540,6 @@ INSERT
679#define freeramdisk_example_usage \ 540#define freeramdisk_example_usage \
680 "$ freeramdisk /dev/ram2\n" 541 "$ freeramdisk /dev/ram2\n"
681 542
682#define fsck_trivial_usage \
683 "[-ANPRTV] [-C FD] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]..."
684#define fsck_full_usage "\n\n" \
685 "Check and repair filesystems\n" \
686 "\nOptions:" \
687 "\n -A Walk /etc/fstab and check all filesystems" \
688 "\n -N Don't execute, just show what would be done" \
689 "\n -P With -A, check filesystems in parallel" \
690 "\n -R With -A, skip the root filesystem" \
691 "\n -T Don't show title on startup" \
692 "\n -V Verbose" \
693 "\n -C n Write status information to specified filedescriptor" \
694 "\n -t TYPE List of filesystem types to check" \
695
696#define fsck_minix_trivial_usage \ 543#define fsck_minix_trivial_usage \
697 "[-larvsmf] BLOCKDEV" 544 "[-larvsmf] BLOCKDEV"
698#define fsck_minix_full_usage "\n\n" \ 545#define fsck_minix_full_usage "\n\n" \
@@ -1279,15 +1126,6 @@ INSERT
1279#define logger_example_usage \ 1126#define logger_example_usage \
1280 "$ logger \"hello\"\n" 1127 "$ logger \"hello\"\n"
1281 1128
1282#define login_trivial_usage \
1283 "[-p] [-h HOST] [[-f] USER]"
1284#define login_full_usage "\n\n" \
1285 "Begin a new session on the system\n" \
1286 "\nOptions:" \
1287 "\n -f Don't authenticate (user already authenticated)" \
1288 "\n -h Name of the remote host" \
1289 "\n -p Preserve environment" \
1290
1291#define logread_trivial_usage \ 1129#define logread_trivial_usage \
1292 "[-f]" 1130 "[-f]"
1293#define logread_full_usage "\n\n" \ 1131#define logread_full_usage "\n\n" \
@@ -1344,17 +1182,6 @@ INSERT
1344 "\n -h Print banner page too" \ 1182 "\n -h Print banner page too" \
1345 "\n -V Verbose" \ 1183 "\n -V Verbose" \
1346 1184
1347#define lsattr_trivial_usage \
1348 "[-Radlv] [FILE]..."
1349#define lsattr_full_usage "\n\n" \
1350 "List file attributes on an ext2 fs\n" \
1351 "\nOptions:" \
1352 "\n -R Recurse" \
1353 "\n -a Don't hide entries starting with ." \
1354 "\n -d List directory entries instead of contents" \
1355 "\n -l List long flag names" \
1356 "\n -v List the file's version/generation number" \
1357
1358#define lspci_trivial_usage \ 1185#define lspci_trivial_usage \
1359 "[-mk]" 1186 "[-mk]"
1360#define lspci_full_usage "\n\n" \ 1187#define lspci_full_usage "\n\n" \
@@ -1424,21 +1251,6 @@ INSERT
1424 "/dev/hda[0-15]\n" 1251 "/dev/hda[0-15]\n"
1425#endif 1252#endif
1426 1253
1427#define makemime_trivial_usage \
1428 "[OPTIONS] [FILE]..."
1429#define makemime_full_usage "\n\n" \
1430 "Create multipart MIME-encoded message from FILEs\n" \
1431/* "Transfer encoding is base64, disposition is inline (not attachment)\n" */ \
1432 "\nOptions:" \
1433 "\n -o FILE Output. Default: stdout" \
1434 "\n -a HDR Add header. Examples:" \
1435 "\n \"From: user@host.org\", \"Date: `date -R`\"" \
1436 "\n -c CT Content type. Default: text/plain" \
1437 "\n -C CS Charset. Default: " CONFIG_FEATURE_MIME_CHARSET \
1438/* "\n -e ENC Transfer encoding. Ignored. base64 is assumed" */ \
1439 "\n" \
1440 "\nOther options are silently ignored" \
1441
1442#define man_trivial_usage \ 1254#define man_trivial_usage \
1443 "[-aw] [MANPAGE]..." 1255 "[-aw] [MANPAGE]..."
1444#define man_full_usage "\n\n" \ 1256#define man_full_usage "\n\n" \
@@ -1712,31 +1524,6 @@ INSERT
1712#define parse_full_usage "" 1524#define parse_full_usage ""
1713*/ 1525*/
1714 1526
1715#define passwd_trivial_usage \
1716 "[OPTIONS] [USER]"
1717#define passwd_full_usage "\n\n" \
1718 "Change USER's password. If no USER is specified,\n" \
1719 "changes the password for the current user.\n" \
1720 "\nOptions:" \
1721 "\n -a ALG Algorithm to use for password (des, md5)" /* ", sha1)" */ \
1722 "\n -d Delete password for the account" \
1723 "\n -l Lock (disable) account" \
1724 "\n -u Unlock (re-enable) account" \
1725
1726#define chpasswd_trivial_usage \
1727 IF_LONG_OPTS("[--md5|--encrypted]") IF_NOT_LONG_OPTS("[-m|-e]")
1728#define chpasswd_full_usage "\n\n" \
1729 "Read user:password from stdin and update /etc/passwd\n" \
1730 "\nOptions:" \
1731 IF_LONG_OPTS( \
1732 "\n -e,--encrypted Supplied passwords are in encrypted form" \
1733 "\n -m,--md5 Use MD5 encryption instead of DES" \
1734 ) \
1735 IF_NOT_LONG_OPTS( \
1736 "\n -e Supplied passwords are in encrypted form" \
1737 "\n -m Use MD5 encryption instead of DES" \
1738 )
1739
1740#define pgrep_trivial_usage \ 1527#define pgrep_trivial_usage \
1741 "[-flnovx] [-s SID|-P PPID|PATTERN]" 1528 "[-flnovx] [-s SID|-P PPID|PATTERN]"
1742#define pgrep_full_usage "\n\n" \ 1529#define pgrep_full_usage "\n\n" \
@@ -1779,9 +1566,6 @@ INSERT
1779 IF_FEATURE_PIDOF_OMIT( \ 1566 IF_FEATURE_PIDOF_OMIT( \
1780 "$ pidof /bin/sh -o %PPID\n20351 5950") 1567 "$ pidof /bin/sh -o %PPID\n20351 5950")
1781 1568
1782#define pipe_progress_trivial_usage NOUSAGE_STR
1783#define pipe_progress_full_usage ""
1784
1785#define pivot_root_trivial_usage \ 1569#define pivot_root_trivial_usage \
1786 "NEW_ROOT PUT_OLD" 1570 "NEW_ROOT PUT_OLD"
1787#define pivot_root_full_usage "\n\n" \ 1571#define pivot_root_full_usage "\n\n" \
@@ -1802,38 +1586,6 @@ INSERT
1802 "\n -s Match session ID (0 for current)" \ 1586 "\n -s Match session ID (0 for current)" \
1803 "\n -P Match parent process ID" \ 1587 "\n -P Match parent process ID" \
1804 1588
1805#define popmaildir_trivial_usage \
1806 "[OPTIONS] MAILDIR [CONN_HELPER ARGS]"
1807#define popmaildir_full_usage "\n\n" \
1808 "Fetch content of remote mailbox to local maildir\n" \
1809 "\nOptions:" \
1810/* "\n -b Binary mode. Ignored" */ \
1811/* "\n -d Debug. Ignored" */ \
1812/* "\n -m Show used memory. Ignored" */ \
1813/* "\n -V Show version. Ignored" */ \
1814/* "\n -c Use tcpclient. Ignored" */ \
1815/* "\n -a Use APOP protocol. Implied. If server supports APOP -> use it" */ \
1816 "\n -s Skip authorization" \
1817 "\n -T Get messages with TOP instead of RETR" \
1818 "\n -k Keep retrieved messages on the server" \
1819 "\n -t SEC Network timeout" \
1820 IF_FEATURE_POPMAILDIR_DELIVERY( \
1821 "\n -F \"PROG ARGS\" Filter program (may be repeated)" \
1822 "\n -M \"PROG ARGS\" Delivery program" \
1823 ) \
1824 "\n" \
1825 "\nFetch from plain POP3 server:" \
1826 "\npopmaildir -k DIR nc pop3.server.com 110 <user_and_pass.txt" \
1827 "\nFetch from SSLed POP3 server and delete fetched emails:" \
1828 "\npopmaildir DIR -- openssl s_client -quiet -connect pop3.server.com:995 <user_and_pass.txt"
1829/* "\n -R BYTES Remove old messages on the server >= BYTES. Ignored" */
1830/* "\n -Z N1-N2 Remove messages from N1 to N2 (dangerous). Ignored" */
1831/* "\n -L BYTES Don't retrieve new messages >= BYTES. Ignored" */
1832/* "\n -H LINES Type first LINES of a message. Ignored" */
1833#define popmaildir_example_usage \
1834 "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n" \
1835 "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n"
1836
1837 1589
1838#if ENABLE_DESKTOP 1590#if ENABLE_DESKTOP
1839 1591
@@ -1937,17 +1689,6 @@ INSERT
1937 "\n -r Reset all the counters (root only)" \ 1689 "\n -r Reset all the counters (root only)" \
1938 "\n -n Disable byte order auto-detection" \ 1690 "\n -n Disable byte order auto-detection" \
1939 1691
1940#define reformime_trivial_usage \
1941 "[OPTIONS] [FILE]..."
1942#define reformime_full_usage "\n\n" \
1943 "Parse MIME-encoded message\n" \
1944 "\nOptions:" \
1945 "\n -x PREFIX Extract content of MIME sections to files" \
1946 "\n -X PROG ARGS Filter content of MIME sections through PROG" \
1947 "\n Must be the last option" \
1948 "\n" \
1949 "\nOther options are silently ignored" \
1950
1951#define scriptreplay_trivial_usage \ 1692#define scriptreplay_trivial_usage \
1952 "timingfile [typescript [divisor]]" 1693 "timingfile [typescript [divisor]]"
1953#define scriptreplay_full_usage "\n\n" \ 1694#define scriptreplay_full_usage "\n\n" \
@@ -2034,32 +1775,6 @@ INSERT
2034 "\n -l RNG Levelrange" \ 1775 "\n -l RNG Levelrange" \
2035 ) 1776 )
2036 1777
2037#define run_parts_trivial_usage \
2038 "[-t] "IF_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY"
2039#define run_parts_full_usage "\n\n" \
2040 "Run a bunch of scripts in DIRECTORY\n" \
2041 "\nOptions:" \
2042 "\n -t Print what would be run, but don't actually run anything" \
2043 "\n -a ARG Pass ARG as argument for every program" \
2044 "\n -u MASK Set the umask to MASK before running every program" \
2045 IF_FEATURE_RUN_PARTS_FANCY( \
2046 "\n -l Print names of all matching files even if they are not executable" \
2047 )
2048
2049#define run_parts_example_usage \
2050 "$ run-parts -a start /etc/init.d\n" \
2051 "$ run-parts -a stop=now /etc/init.d\n\n" \
2052 "Let's assume you have a script foo/dosomething:\n" \
2053 "#!/bin/sh\n" \
2054 "for i in $*; do eval $i; done; unset i\n" \
2055 "case \"$1\" in\n" \
2056 "start*) echo starting something;;\n" \
2057 "stop*) set -x; shutdown -h $stop;;\n" \
2058 "esac\n\n" \
2059 "Running this yields:\n" \
2060 "$run-parts -a stop=+4m foo/\n" \
2061 "+ shutdown -h +4m"
2062
2063#define runlevel_trivial_usage \ 1778#define runlevel_trivial_usage \
2064 "[FILE]" 1779 "[FILE]"
2065#define runlevel_full_usage "\n\n" \ 1780#define runlevel_full_usage "\n\n" \
@@ -2102,23 +1817,6 @@ INSERT
2102 "\n -t Send timing to stderr" \ 1817 "\n -t Send timing to stderr" \
2103 ) 1818 )
2104 1819
2105#define sed_trivial_usage \
2106 "[-efinr] SED_CMD [FILE]..."
2107#define sed_full_usage "\n\n" \
2108 "Options:" \
2109 "\n -e CMD Add CMD to sed commands to be executed" \
2110 "\n -f FILE Add FILE contents to sed commands to be executed" \
2111 "\n -i Edit files in-place (else sends result to stdout)" \
2112 "\n -n Suppress automatic printing of pattern space" \
2113 "\n -r Use extended regex syntax" \
2114 "\n" \
2115 "\nIf no -e or -f, the first non-option argument is the sed command string." \
2116 "\nRemaining arguments are input files (stdin if none)."
2117
2118#define sed_example_usage \
2119 "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \
2120 "bar\n"
2121
2122#define selinuxenabled_trivial_usage NOUSAGE_STR 1820#define selinuxenabled_trivial_usage NOUSAGE_STR
2123#define selinuxenabled_full_usage "" 1821#define selinuxenabled_full_usage ""
2124 1822
@@ -2205,69 +1903,6 @@ INSERT
2205 "\n -L Enable 3-wire operation" \ 1903 "\n -L Enable 3-wire operation" \
2206 "\n -F Disable RTS/CTS flow control" \ 1904 "\n -F Disable RTS/CTS flow control" \
2207 1905
2208#define start_stop_daemon_trivial_usage \
2209 "[OPTIONS] [-S|-K] ... [-- ARGS...]"
2210#define start_stop_daemon_full_usage "\n\n" \
2211 "Search for matching processes, and then\n" \
2212 "-K: stop all matching processes.\n" \
2213 "-S: start a process unless a matching process is found.\n" \
2214 IF_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
2215 "\nProcess matching:" \
2216 "\n -u,--user USERNAME|UID Match only this user's processes" \
2217 "\n -n,--name NAME Match processes with NAME" \
2218 "\n in comm field in /proc/PID/stat" \
2219 "\n -x,--exec EXECUTABLE Match processes with this command" \
2220 "\n in /proc/PID/cmdline" \
2221 "\n -p,--pidfile FILE Match a process with PID from the file" \
2222 "\n All specified conditions must match" \
2223 "\n-S only:" \
2224 "\n -x,--exec EXECUTABLE Program to run" \
2225 "\n -a,--startas NAME Zeroth argument" \
2226 "\n -b,--background Background" \
2227 IF_FEATURE_START_STOP_DAEMON_FANCY( \
2228 "\n -N,--nicelevel N Change nice level" \
2229 ) \
2230 "\n -c,--chuid USER[:[GRP]] Change to user/group" \
2231 "\n -m,--make-pidfile Write PID to the pidfile specified by -p" \
2232 "\n-K only:" \
2233 "\n -s,--signal SIG Signal to send" \
2234 "\n -t,--test Match only, exit with 0 if a process is found" \
2235 "\nOther:" \
2236 IF_FEATURE_START_STOP_DAEMON_FANCY( \
2237 "\n -o,--oknodo Exit with status 0 if nothing is done" \
2238 "\n -v,--verbose Verbose" \
2239 ) \
2240 "\n -q,--quiet Quiet" \
2241 ) \
2242 IF_NOT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
2243 "\nProcess matching:" \
2244 "\n -u USERNAME|UID Match only this user's processes" \
2245 "\n -n NAME Match processes with NAME" \
2246 "\n in comm field in /proc/PID/stat" \
2247 "\n -x EXECUTABLE Match processes with this command" \
2248 "\n command in /proc/PID/cmdline" \
2249 "\n -p FILE Match a process with PID from the file" \
2250 "\n All specified conditions must match" \
2251 "\n-S only:" \
2252 "\n -x EXECUTABLE Program to run" \
2253 "\n -a NAME Zeroth argument" \
2254 "\n -b Background" \
2255 IF_FEATURE_START_STOP_DAEMON_FANCY( \
2256 "\n -N N Change nice level" \
2257 ) \
2258 "\n -c USER[:[GRP]] Change to user/group" \
2259 "\n -m Write PID to the pidfile specified by -p" \
2260 "\n-K only:" \
2261 "\n -s SIG Signal to send" \
2262 "\n -t Match only, exit with 0 if a process is found" \
2263 "\nOther:" \
2264 IF_FEATURE_START_STOP_DAEMON_FANCY( \
2265 "\n -o Exit with status 0 if nothing is done" \
2266 "\n -v Verbose" \
2267 ) \
2268 "\n -q Quiet" \
2269 ) \
2270
2271#define strings_trivial_usage \ 1906#define strings_trivial_usage \
2272 "[-afo] [-n LEN] [FILE]..." 1907 "[-afo] [-n LEN] [FILE]..."
2273#define strings_full_usage "\n\n" \ 1908#define strings_full_usage "\n\n" \
@@ -2278,13 +1913,6 @@ INSERT
2278 "\n -n LEN At least LEN characters form a string (default 4)" \ 1913 "\n -n LEN At least LEN characters form a string (default 4)" \
2279 "\n -o Precede strings with decimal offsets" \ 1914 "\n -o Precede strings with decimal offsets" \
2280 1915
2281#define sulogin_trivial_usage \
2282 "[-t N] [TTY]"
2283#define sulogin_full_usage "\n\n" \
2284 "Single user login\n" \
2285 "\nOptions:" \
2286 "\n -t N Timeout" \
2287
2288#define sv_trivial_usage \ 1916#define sv_trivial_usage \
2289 "[-v] [-w SEC] CMD SERVICE_DIR..." 1917 "[-v] [-w SEC] CMD SERVICE_DIR..."
2290#define sv_full_usage "\n\n" \ 1918#define sv_full_usage "\n\n" \
@@ -2650,26 +2278,6 @@ INSERT
2650 "\n set_ingress_map [vlan-name] [skb_priority] [vlan_qos]" \ 2278 "\n set_ingress_map [vlan-name] [skb_priority] [vlan_qos]" \
2651 "\n set_name_type [name-type]" \ 2279 "\n set_name_type [name-type]" \
2652 2280
2653#define vi_trivial_usage \
2654 "[OPTIONS] [FILE]..."
2655#define vi_full_usage "\n\n" \
2656 "Edit FILE\n" \
2657 "\nOptions:" \
2658 IF_FEATURE_VI_COLON( \
2659 "\n -c Initial command to run ($EXINIT also available)" \
2660 ) \
2661 IF_FEATURE_VI_READONLY( \
2662 "\n -R Read-only" \
2663 ) \
2664 "\n -H Short help regarding available features" \
2665
2666#define vlock_trivial_usage \
2667 "[-a]"
2668#define vlock_full_usage "\n\n" \
2669 "Lock a virtual terminal. A password is required to unlock.\n" \
2670 "\nOptions:" \
2671 "\n -a Lock all VTs" \
2672
2673#define volname_trivial_usage \ 2281#define volname_trivial_usage \
2674 "[DEVICE]" 2282 "[DEVICE]"
2675#define volname_full_usage "\n\n" \ 2283#define volname_full_usage "\n\n" \
@@ -2708,14 +2316,6 @@ INSERT
2708 "\n" \ 2316 "\n" \
2709 "\nUse 500ms to specify period in milliseconds" \ 2317 "\nUse 500ms to specify period in milliseconds" \
2710 2318
2711#define which_trivial_usage \
2712 "[COMMAND]..."
2713#define which_full_usage "\n\n" \
2714 "Locate a COMMAND"
2715#define which_example_usage \
2716 "$ which login\n" \
2717 "/bin/login\n"
2718
2719#define zcip_trivial_usage \ 2319#define zcip_trivial_usage \
2720 "[OPTIONS] IFACE SCRIPT" 2320 "[OPTIONS] IFACE SCRIPT"
2721#define zcip_full_usage "\n\n" \ 2321#define zcip_full_usage "\n\n" \
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c
index 5a0714501..2d6736f1a 100644
--- a/loginutils/addgroup.c
+++ b/loginutils/addgroup.c
@@ -9,6 +9,15 @@
9 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 9 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
10 * 10 *
11 */ 11 */
12
13//usage:#define addgroup_trivial_usage
14//usage: "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[USER] ") "GROUP"
15//usage:#define addgroup_full_usage "\n\n"
16//usage: "Add a group " IF_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n"
17//usage: "\nOptions:"
18//usage: "\n -g GID Group id"
19//usage: "\n -S Create a system group"
20
12#include "libbb.h" 21#include "libbb.h"
13 22
14#if CONFIG_LAST_SYSTEM_ID < CONFIG_FIRST_SYSTEM_ID 23#if CONFIG_LAST_SYSTEM_ID < CONFIG_FIRST_SYSTEM_ID
diff --git a/loginutils/adduser.c b/loginutils/adduser.c
index 0c675caf9..1944d9d56 100644
--- a/loginutils/adduser.c
+++ b/loginutils/adduser.c
@@ -7,6 +7,21 @@
7 * 7 *
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10
11//usage:#define adduser_trivial_usage
12//usage: "[OPTIONS] USER"
13//usage:#define adduser_full_usage "\n\n"
14//usage: "Add a user\n"
15//usage: "\nOptions:"
16//usage: "\n -h DIR Home directory"
17//usage: "\n -g GECOS GECOS field"
18//usage: "\n -s SHELL Login shell"
19//usage: "\n -G GRP Add user to existing group"
20//usage: "\n -S Create a system user"
21//usage: "\n -D Don't assign a password"
22//usage: "\n -H Don't create home directory"
23//usage: "\n -u UID User id"
24
10#include "libbb.h" 25#include "libbb.h"
11 26
12#if CONFIG_LAST_SYSTEM_ID < CONFIG_FIRST_SYSTEM_ID 27#if CONFIG_LAST_SYSTEM_ID < CONFIG_FIRST_SYSTEM_ID
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c
index 48cf9b130..c2d86664d 100644
--- a/loginutils/chpasswd.c
+++ b/loginutils/chpasswd.c
@@ -7,6 +7,20 @@
7 */ 7 */
8#include "libbb.h" 8#include "libbb.h"
9 9
10//usage:#define chpasswd_trivial_usage
11//usage: IF_LONG_OPTS("[--md5|--encrypted]") IF_NOT_LONG_OPTS("[-m|-e]")
12//usage:#define chpasswd_full_usage "\n\n"
13//usage: "Read user:password from stdin and update /etc/passwd\n"
14//usage: "\nOptions:"
15//usage: IF_LONG_OPTS(
16//usage: "\n -e,--encrypted Supplied passwords are in encrypted form"
17//usage: "\n -m,--md5 Use MD5 encryption instead of DES"
18//usage: )
19//usage: IF_NOT_LONG_OPTS(
20//usage: "\n -e Supplied passwords are in encrypted form"
21//usage: "\n -m Use MD5 encryption instead of DES"
22//usage: )
23
10#if ENABLE_LONG_OPTS 24#if ENABLE_LONG_OPTS
11static const char chpasswd_longopts[] ALIGN1 = 25static const char chpasswd_longopts[] ALIGN1 =
12 "encrypted\0" No_argument "e" 26 "encrypted\0" No_argument "e"
diff --git a/loginutils/cryptpw.c b/loginutils/cryptpw.c
index 6c801f9fa..72388c492 100644
--- a/loginutils/cryptpw.c
+++ b/loginutils/cryptpw.c
@@ -10,6 +10,45 @@
10 * Licensed under GPLv2, see file LICENSE in this source tree. 10 * Licensed under GPLv2, see file LICENSE in this source tree.
11 */ 11 */
12 12
13//usage:#define cryptpw_trivial_usage
14//usage: "[OPTIONS] [PASSWORD] [SALT]"
15/* We do support -s, we just don't mention it */
16//usage:#define cryptpw_full_usage "\n\n"
17//usage: "Crypt the PASSWORD using crypt(3)\n"
18//usage: "\nOptions:"
19//usage: IF_LONG_OPTS(
20//usage: "\n -P,--password-fd=N Read password from fd N"
21/* //usage: "\n -s,--stdin Use stdin; like -P0" */
22//usage: "\n -m,--method=TYPE Encryption method TYPE"
23//usage: "\n -S,--salt=SALT"
24//usage: )
25//usage: IF_NOT_LONG_OPTS(
26//usage: "\n -P N Read password from fd N"
27/* //usage: "\n -s Use stdin; like -P0" */
28//usage: "\n -m TYPE Encryption method TYPE"
29//usage: "\n -S SALT"
30//usage: )
31
32/* mkpasswd is an alias to cryptpw */
33//usage:#define mkpasswd_trivial_usage
34//usage: "[OPTIONS] [PASSWORD] [SALT]"
35/* We do support -s, we just don't mention it */
36//usage:#define mkpasswd_full_usage "\n\n"
37//usage: "Crypt the PASSWORD using crypt(3)\n"
38//usage: "\nOptions:"
39//usage: IF_LONG_OPTS(
40//usage: "\n -P,--password-fd=N Read password from fd N"
41/* //usage: "\n -s,--stdin Use stdin; like -P0" */
42//usage: "\n -m,--method=TYPE Encryption method TYPE"
43//usage: "\n -S,--salt=SALT"
44//usage: )
45//usage: IF_NOT_LONG_OPTS(
46//usage: "\n -P N Read password from fd N"
47/* //usage: "\n -s Use stdin; like -P0" */
48//usage: "\n -m TYPE Encryption method TYPE"
49//usage: "\n -S SALT"
50//usage: )
51
13#include "libbb.h" 52#include "libbb.h"
14 53
15/* Debian has 'mkpasswd' utility, manpage says: 54/* Debian has 'mkpasswd' utility, manpage says:
diff --git a/loginutils/deluser.c b/loginutils/deluser.c
index 47a10fe14..e39ac5506 100644
--- a/loginutils/deluser.c
+++ b/loginutils/deluser.c
@@ -9,6 +9,18 @@
9 * Licensed under GPLv2, see file LICENSE in this source tree. 9 * Licensed under GPLv2, see file LICENSE in this source tree.
10 * 10 *
11 */ 11 */
12
13//usage:#define deluser_trivial_usage
14//usage: "USER"
15//usage:#define deluser_full_usage "\n\n"
16//usage: "Delete USER from the system"
17
18//usage:#define delgroup_trivial_usage
19//usage: IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
20//usage:#define delgroup_full_usage "\n\n"
21//usage: "Delete group GROUP from the system"
22//usage: IF_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
23
12#include "libbb.h" 24#include "libbb.h"
13 25
14int deluser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 26int deluser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/loginutils/login.c b/loginutils/login.c
index ce0d1741f..f2563dc09 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -2,6 +2,16 @@
2/* 2/*
3 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 3 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
4 */ 4 */
5
6//usage:#define login_trivial_usage
7//usage: "[-p] [-h HOST] [[-f] USER]"
8//usage:#define login_full_usage "\n\n"
9//usage: "Begin a new session on the system\n"
10//usage: "\nOptions:"
11//usage: "\n -f Don't authenticate (user already authenticated)"
12//usage: "\n -h Name of the remote host"
13//usage: "\n -p Preserve environment"
14
5#include "libbb.h" 15#include "libbb.h"
6#include <syslog.h> 16#include <syslog.h>
7#include <sys/resource.h> 17#include <sys/resource.h>
diff --git a/loginutils/passwd.c b/loginutils/passwd.c
index f3928cecc..8b6a63eec 100644
--- a/loginutils/passwd.c
+++ b/loginutils/passwd.c
@@ -2,6 +2,18 @@
2/* 2/*
3 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 3 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
4 */ 4 */
5
6//usage:#define passwd_trivial_usage
7//usage: "[OPTIONS] [USER]"
8//usage:#define passwd_full_usage "\n\n"
9//usage: "Change USER's password. If no USER is specified,\n"
10//usage: "changes the password for the current user.\n"
11//usage: "\nOptions:"
12//usage: "\n -a ALG Algorithm to use for password (des, md5)" /* ", sha1)" */
13//usage: "\n -d Delete password for the account"
14//usage: "\n -l Lock (disable) account"
15//usage: "\n -u Unlock (re-enable) account"
16
5#include "libbb.h" 17#include "libbb.h"
6#include <syslog.h> 18#include <syslog.h>
7 19
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c
index 0e5b59433..28edf067c 100644
--- a/loginutils/sulogin.c
+++ b/loginutils/sulogin.c
@@ -5,6 +5,13 @@
5 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 5 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
6 */ 6 */
7 7
8//usage:#define sulogin_trivial_usage
9//usage: "[-t N] [TTY]"
10//usage:#define sulogin_full_usage "\n\n"
11//usage: "Single user login\n"
12//usage: "\nOptions:"
13//usage: "\n -t N Timeout"
14
8#include "libbb.h" 15#include "libbb.h"
9#include <syslog.h> 16#include <syslog.h>
10 17
diff --git a/loginutils/vlock.c b/loginutils/vlock.c
index 3299afa50..efad63ff3 100644
--- a/loginutils/vlock.c
+++ b/loginutils/vlock.c
@@ -15,6 +15,13 @@
15/* Fixed by Erik Andersen to do passwords the tinylogin way... 15/* Fixed by Erik Andersen to do passwords the tinylogin way...
16 * It now works with md5, sha1, etc passwords. */ 16 * It now works with md5, sha1, etc passwords. */
17 17
18//usage:#define vlock_trivial_usage
19//usage: "[-a]"
20//usage:#define vlock_full_usage "\n\n"
21//usage: "Lock a virtual terminal. A password is required to unlock.\n"
22//usage: "\nOptions:"
23//usage: "\n -a Lock all VTs"
24
18#include "libbb.h" 25#include "libbb.h"
19 26
20#ifdef __linux__ 27#ifdef __linux__
diff --git a/mailutils/mime.c b/mailutils/mime.c
index 1e393ed31..0aff8b1d7 100644
--- a/mailutils/mime.c
+++ b/mailutils/mime.c
@@ -7,6 +7,33 @@
7 * 7 *
8 * Licensed under GPLv2, see file LICENSE in this source tree. 8 * Licensed under GPLv2, see file LICENSE in this source tree.
9 */ 9 */
10
11//usage:#define makemime_trivial_usage
12//usage: "[OPTIONS] [FILE]..."
13//usage:#define makemime_full_usage "\n\n"
14//usage: "Create multipart MIME-encoded message from FILEs\n"
15/* //usage: "Transfer encoding is base64, disposition is inline (not attachment)\n" */
16//usage: "\nOptions:"
17//usage: "\n -o FILE Output. Default: stdout"
18//usage: "\n -a HDR Add header. Examples:"
19//usage: "\n \"From: user@host.org\", \"Date: `date -R`\""
20//usage: "\n -c CT Content type. Default: text/plain"
21//usage: "\n -C CS Charset. Default: " CONFIG_FEATURE_MIME_CHARSET
22/* //usage: "\n -e ENC Transfer encoding. Ignored. base64 is assumed" */
23//usage: "\n"
24//usage: "\nOther options are silently ignored"
25
26//usage:#define reformime_trivial_usage
27//usage: "[OPTIONS] [FILE]..."
28//usage:#define reformime_full_usage "\n\n"
29//usage: "Parse MIME-encoded message\n"
30//usage: "\nOptions:"
31//usage: "\n -x PREFIX Extract content of MIME sections to files"
32//usage: "\n -X PROG ARGS Filter content of MIME sections through PROG"
33//usage: "\n Must be the last option"
34//usage: "\n"
35//usage: "\nOther options are silently ignored"
36
10#include "libbb.h" 37#include "libbb.h"
11#include "mail.h" 38#include "mail.h"
12 39
diff --git a/mailutils/popmaildir.c b/mailutils/popmaildir.c
index 6b733441f..642657919 100644
--- a/mailutils/popmaildir.c
+++ b/mailutils/popmaildir.c
@@ -9,6 +9,40 @@
9 * 9 *
10 * Licensed under GPLv2, see file LICENSE in this source tree. 10 * Licensed under GPLv2, see file LICENSE in this source tree.
11 */ 11 */
12
13//usage:#define popmaildir_trivial_usage
14//usage: "[OPTIONS] MAILDIR [CONN_HELPER ARGS]"
15//usage:#define popmaildir_full_usage "\n\n"
16//usage: "Fetch content of remote mailbox to local maildir\n"
17//usage: "\nOptions:"
18/* //usage: "\n -b Binary mode. Ignored" */
19/* //usage: "\n -d Debug. Ignored" */
20/* //usage: "\n -m Show used memory. Ignored" */
21/* //usage: "\n -V Show version. Ignored" */
22/* //usage: "\n -c Use tcpclient. Ignored" */
23/* //usage: "\n -a Use APOP protocol. Implied. If server supports APOP -> use it" */
24//usage: "\n -s Skip authorization"
25//usage: "\n -T Get messages with TOP instead of RETR"
26//usage: "\n -k Keep retrieved messages on the server"
27//usage: "\n -t SEC Network timeout"
28//usage: IF_FEATURE_POPMAILDIR_DELIVERY(
29//usage: "\n -F \"PROG ARGS\" Filter program (may be repeated)"
30//usage: "\n -M \"PROG ARGS\" Delivery program"
31//usage: )
32//usage: "\n"
33//usage: "\nFetch from plain POP3 server:"
34//usage: "\npopmaildir -k DIR nc pop3.server.com 110 <user_and_pass.txt"
35//usage: "\nFetch from SSLed POP3 server and delete fetched emails:"
36//usage: "\npopmaildir DIR -- openssl s_client -quiet -connect pop3.server.com:995 <user_and_pass.txt"
37/* //usage: "\n -R BYTES Remove old messages on the server >= BYTES. Ignored" */
38/* //usage: "\n -Z N1-N2 Remove messages from N1 to N2 (dangerous). Ignored" */
39/* //usage: "\n -L BYTES Don't retrieve new messages >= BYTES. Ignored" */
40/* //usage: "\n -H LINES Type first LINES of a message. Ignored" */
41//usage:
42//usage:#define popmaildir_example_usage
43//usage: "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n"
44//usage: "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n"
45
12#include "libbb.h" 46#include "libbb.h"
13#include "mail.h" 47#include "mail.h"
14 48