From 5bc8c005a8e15c43285bc595a8d404de67a482ac Mon Sep 17 00:00:00 2001 From: Pere Orga Date: Mon, 11 Apr 2011 03:29:49 +0200 Subject: move remaining help text from include/usage.src.h Signed-off-by: Pere Orga Signed-off-by: Denys Vlasenko --- runit/chpst.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ runit/runsv.c | 5 +++++ runit/runsvdir.c | 7 +++++++ runit/sv.c | 16 ++++++++++++++ 4 files changed, 92 insertions(+) (limited to 'runit') diff --git a/runit/chpst.c b/runit/chpst.c index dc8a26aeb..63da4797f 100644 --- a/runit/chpst.c +++ b/runit/chpst.c @@ -28,6 +28,70 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* Busyboxed by Denys Vlasenko */ /* Dependencies on runit_lib.c removed */ +//usage:#define chpst_trivial_usage +//usage: "[-vP012] [-u USER[:GRP]] [-U USER[:GRP]] [-e DIR]\n" +//usage: " [-/ DIR] [-n NICE] [-m BYTES] [-d BYTES] [-o N]\n" +//usage: " [-p N] [-f BYTES] [-c BYTES] PROG ARGS" +//usage:#define chpst_full_usage "\n\n" +//usage: "Change the process state, run PROG\n" +//usage: "\nOptions:" +//usage: "\n -u USER[:GRP] Set uid and gid" +//usage: "\n -U USER[:GRP] Set $UID and $GID in environment" +//usage: "\n -e DIR Set environment variables as specified by files" +//usage: "\n in DIR: file=1st_line_of_file" +//usage: "\n -/ DIR Chroot to DIR" +//usage: "\n -n NICE Add NICE to nice value" +//usage: "\n -m BYTES Same as -d BYTES -s BYTES -l BYTES" +//usage: "\n -d BYTES Limit data segment" +//usage: "\n -o N Limit number of open files per process" +//usage: "\n -p N Limit number of processes per uid" +//usage: "\n -f BYTES Limit output file sizes" +//usage: "\n -c BYTES Limit core file size" +//usage: "\n -v Verbose" +//usage: "\n -P Create new process group" +//usage: "\n -0 Close stdin" +//usage: "\n -1 Close stdout" +//usage: "\n -2 Close stderr" +//usage: +//usage:#define envdir_trivial_usage +//usage: "DIR PROG ARGS" +//usage:#define envdir_full_usage "\n\n" +//usage: "Set various environment variables as specified by files\n" +//usage: "in the directory DIR, run PROG" +//usage: +//usage:#define envuidgid_trivial_usage +//usage: "USER PROG ARGS" +//usage:#define envuidgid_full_usage "\n\n" +//usage: "Set $UID to USER's uid and $GID to USER's gid, run PROG" +//usage: +//usage:#define setuidgid_trivial_usage +//usage: "USER PROG ARGS" +//usage:#define setuidgid_full_usage "\n\n" +//usage: "Set uid and gid to USER's uid and gid, drop supplementary group ids,\n" +//usage: "run PROG" +//usage: +//usage:#define softlimit_trivial_usage +//usage: "[-a BYTES] [-m BYTES] [-d BYTES] [-s BYTES] [-l BYTES]\n" +//usage: " [-f BYTES] [-c BYTES] [-r BYTES] [-o N] [-p N] [-t N]\n" +//usage: " PROG ARGS" +//usage:#define softlimit_full_usage "\n\n" +//usage: "Set soft resource limits, then run PROG\n" +//usage: "\nOptions:" +//usage: "\n -a BYTES Limit total size of all segments" +//usage: "\n -m BYTES Same as -d BYTES -s BYTES -l BYTES -a BYTES" +//usage: "\n -d BYTES Limit data segment" +//usage: "\n -s BYTES Limit stack segment" +//usage: "\n -l BYTES Limit locked memory size" +//usage: "\n -o N Limit number of open files per process" +//usage: "\n -p N Limit number of processes per uid" +//usage: "\nOptions controlling file sizes:" +//usage: "\n -f BYTES Limit output file sizes" +//usage: "\n -c BYTES Limit core file size" +//usage: "\nEfficiency opts:" +//usage: "\n -r BYTES Limit resident set size" +//usage: "\n -t N Limit CPU time, process receives" +//usage: "\n a SIGXCPU after N seconds" + #include "libbb.h" /* diff --git a/runit/runsv.c b/runit/runsv.c index e76572daa..ad8d84f74 100644 --- a/runit/runsv.c +++ b/runit/runsv.c @@ -28,6 +28,11 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* Busyboxed by Denys Vlasenko */ /* TODO: depends on runit_lib.c - review and reduce/eliminate */ +//usage:#define runsv_trivial_usage +//usage: "DIR" +//usage:#define runsv_full_usage "\n\n" +//usage: "Start and monitor a service and optionally an appendant log service" + #include #include #include "libbb.h" diff --git a/runit/runsvdir.c b/runit/runsvdir.c index 166664237..9495a2a4f 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c @@ -28,6 +28,13 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* Busyboxed by Denys Vlasenko */ /* TODO: depends on runit_lib.c - review and reduce/eliminate */ +//usage:#define runsvdir_trivial_usage +//usage: "[-P] [-s SCRIPT] DIR" +//usage:#define runsvdir_full_usage "\n\n" +//usage: "Start a runsv process for each subdirectory. If it exits, restart it.\n" +//usage: "\n -P Put each runsv in a new session" +//usage: "\n -s SCRIPT Run SCRIPT after signal is processed" + #include #include #include "libbb.h" diff --git a/runit/sv.c b/runit/sv.c index c420a91a6..322688a36 100644 --- a/runit/sv.c +++ b/runit/sv.c @@ -153,6 +153,22 @@ Exit Codes /* Busyboxed by Denys Vlasenko */ /* TODO: depends on runit_lib.c - review and reduce/eliminate */ +//usage:#define sv_trivial_usage +//usage: "[-v] [-w SEC] CMD SERVICE_DIR..." +//usage:#define sv_full_usage "\n\n" +//usage: "Control services monitored by runsv supervisor.\n" +//usage: "Commands (only first character is enough):\n" +//usage: "\n" +//usage: "status: query service status\n" +//usage: "up: if service isn't running, start it. If service stops, restart it\n" +//usage: "once: like 'up', but if service stops, don't restart it\n" +//usage: "down: send TERM and CONT signals. If ./run exits, start ./finish\n" +//usage: " if it exists. After it stops, don't restart service\n" +//usage: "exit: send TERM and CONT signals to service and log service. If they exit,\n" +//usage: " runsv exits too\n" +//usage: "pause, cont, hup, alarm, interrupt, quit, 1, 2, term, kill: send\n" +//usage: "STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, KILL signal to service" + #include #include #include "libbb.h" -- cgit v1.2.3