summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko2008-05-18 21:17:52 +0000
committerDenis Vlasenko2008-05-18 21:17:52 +0000
commite125a683a77d14401644d15f38b7f578db723924 (patch)
tree2beb60ca4b40bb96c017c02d4d9cefff85df1db9 /include
parentfaf334aeb87ccc6680987bbd1fae8faf81969fed (diff)
downloadbusybox-e125a683a77d14401644d15f38b7f578db723924.zip
busybox-e125a683a77d14401644d15f38b7f578db723924.tar.gz
start_stop_daemon: add -test, fix -x to not match by inode,
vastly improve hext text. (mostly by Roy Marples <roy AT marples.name>) function old new delta packed_usage 24124 24190 +66 start_stop_daemon_main 959 991 +32 start_stop_daemon_longopts 149 156 +7 check 1632 1589 -43 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 105/-43) Total: 62 bytes
Diffstat (limited to 'include')
-rw-r--r--include/usage.h83
1 files changed, 51 insertions, 32 deletions
diff --git a/include/usage.h b/include/usage.h
index f912d7b..56198cf 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -3613,46 +3613,65 @@
USE_GETOPT_LONG("--start|--stop") SKIP_GETOPT_LONG("-S|-K") \
"] ... [-- arguments...]"
#define start_stop_daemon_full_usage "\n\n" \
- "Start and stop services\n" \
- "\nOptions:" \
+ "Search for matching processes, and then\n" \
+ "-S: stop all matching processes.\n" \
+ "-K: start a process unless a matching process is found.\n" \
USE_GETOPT_LONG( \
- "\n -S,--start Start" \
- "\n -K,--stop Stop" \
- "\n -a,--startas pathname Start process specified by pathname" \
- "\n -b,--background Put process into background" \
- "\n -u,--user username|uid Stop this user's processes" \
- "\n -x,--exec executable Program to either start or check" \
- "\n -n,--name process-name Stop processes with this name" \
- "\n -p,--pidfile pid-file Save or load pid using a pid-file" \
- "\n -m,--make-pidfile Create the -p file and enter pid in it" \
- "\n -q,--quiet Quiet" \
+ "\nProcess matching:" \
+ "\n -u,--user USERNAME|UID Match only this user's processes" \
+ "\n -n,--name NAME Match processes with NAME" \
+ "\n in comm field in /proc/PID/stat" \
+ "\n -x,--exec EXECUTABLE Match processes with this command" \
+ "\n in /proc/PID/cmdline" \
+ "\n -p,--pidfile FILE Match a process with PID from the file" \
+ "\n All specified conditions must match" \
+ "\n-K only:" \
+ "\n -x,--exec EXECUTABLE Program to run" \
+ "\n -a,--startas NAME Zeroth argument" \
+ "\n -b,--background Background" \
USE_FEATURE_START_STOP_DAEMON_FANCY( \
- "\n -o,--oknodo Exit status 0 if nothing done" \
- "\n -v,--verbose Verbose" \
- "\n -N,--nicelevel N Add N to process's nice level" \
+ "\n -N,--nicelevel N Change nice level" \
) \
- "\n -s,--signal signal Signal to send (default TERM)" \
- "\n -c,--chuid user[:[grp]] Change to specified user/group" \
+ "\n -c,--chuid USER[:[GRP]] Change to user/group" \
+ "\n -m,--make-pidfile Write PID to the pidfile specified by -p" \
+ "\n-S only:" \
+ "\n -s,--signal SIG Signal to send" \
+ "\n -t,--test Match only, exit with 0 if a process is found" \
+ "\nOther:" \
+ USE_FEATURE_START_STOP_DAEMON_FANCY( \
+ "\n -o,--oknodo Exit with status 0 if nothing is done" \
+ "\n -q,--quiet Quiet" \
+ ) \
+ "\n -v,--verbose Verbose" \
) \
SKIP_GETOPT_LONG( \
- "\n -S Start" \
- "\n -K Stop" \
- "\n -a pathname Start process specified by pathname" \
- "\n -b Put process into background" \
- "\n -u username|uid Stop this user's processes" \
- "\n -x executable Program to either start or check" \
- "\n -n process-name Stop processes with this name" \
- "\n -p pid-file Save or load pid using a pid-file" \
- "\n -m Create the -p file and enter pid in it" \
- "\n -q Quiet" \
+ "\nProcess matching:" \
+ "\n -u USERNAME|UID Match only this user's processes" \
+ "\n -n NAME Match processes with NAME" \
+ "\n in comm field in /proc/PID/stat" \
+ "\n -x EXECUTABLE Match processes with this command" \
+ "\n command in /proc/PID/cmdline" \
+ "\n -p FILE Match a process with PID from the file" \
+ "\n All specified conditions must match" \
+ "\n-K only:" \
+ "\n -x EXECUTABLE Program to run" \
+ "\n -a NAME Zeroth argument" \
+ "\n -b Background" \
+ USE_FEATURE_START_STOP_DAEMON_FANCY( \
+ "\n -N N Change nice level" \
+ ) \
+ "\n -c USER[:[GRP]] Change to user/group" \
+ "\n -m Write PID to the pidfile specified by -p" \
+ "\n-S only:" \
+ "\n -s SIG Signal to send" \
+ "\n -t Match only, exit with 0 if a process is found" \
+ "\nOther:" \
USE_FEATURE_START_STOP_DAEMON_FANCY( \
- "\n -o Exit status 0 if nothing done" \
+ "\n -o Exit with status 0 if nothing is done" \
+ "\n -q Quiet" \
+ ) \
"\n -v Verbose" \
- "\n -N N Add N to process's nice level" \
) \
- "\n -s signal Signal to send (default TERM)" \
- "\n -c user[:[grp]] Change to specified user/group" \
- )
#define stat_trivial_usage \
"[OPTION] FILE..."