diff options
author | Guillem Jover <guillem@debian.org> | 2012-11-20 22:38:42 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2016-04-01 00:42:25 +0200 |
commit | 1fb6ccf6688321dc7d663ea2b1c86459efe91250 (patch) | |
tree | db46861ef13284d82c22c436217108b012ee33cd /utils/start-stop-daemon.c | |
parent | 026c72c3a205547f99de05e0adcc5684a7a094fa (diff) | |
download | dpkg-1fb6ccf6688321dc7d663ea2b1c86459efe91250.tar.gz |
s-s-d: Unify --help output with the rest of the tools
Diffstat (limited to 'utils/start-stop-daemon.c')
-rw-r--r-- | utils/start-stop-daemon.c | 90 |
1 files changed, 52 insertions, 38 deletions
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index c844f2e94..c558969de 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -545,61 +545,75 @@ static void usage(void) { printf( -"Usage: start-stop-daemon [<option> ...] <command>\n" -"\n" +"Usage: start-stop-daemon [<option>...] <command>\n" +"\n"); + + printf( "Commands:\n" -" -S|--start -- <argument> ... start a program and pass <arguments> to it\n" -" -K|--stop stop a program\n" -" -T|--status get the program status\n" -" -H|--help print help information\n" -" -V|--version print version\n" -"\n" +" -S, --start -- <argument>... start a program and pass <arguments> to it\n" +" -K, --stop stop a program\n" +" -T, --status get the program status\n" +" -H, --help print help information\n" +" -V, --version print version\n" +"\n"); + + printf( "Matching options (at least one is required):\n" -" --pid <pid> pid to check\n" -" --ppid <ppid> parent pid to check\n" -" -p|--pidfile <pid-file> pid file to check\n" -" -x|--exec <executable> program to start/check if it is running\n" -" -n|--name <process-name> process name to check\n" -" -u|--user <username|uid> process owner to check\n" -"\n" +" --pid <pid> pid to check\n" +" --ppid <ppid> parent pid to check\n" +" -p, --pidfile <pid-file> pid file to check\n" +" -x, --exec <executable> program to start/check if it is running\n" +" -n, --name <process-name> process name to check\n" +" -u, --user <username|uid> process owner to check\n" +"\n"); + + printf( "Options:\n" -" -g|--group <group|gid> run process as this group\n" -" -c|--chuid <name|uid[:group|gid]>\n" +" -g, --group <group|gid> run process as this group\n" +" -c, --chuid <name|uid[:group|gid]>\n" " change to this user/group before starting\n" " process\n" -" -s|--signal <signal> signal to send (default TERM)\n" -" -a|--startas <pathname> program to start (default is <executable>)\n" -" -r|--chroot <directory> chroot to <directory> before starting\n" -" -d|--chdir <directory> change to <directory> (default is /)\n" -" -N|--nicelevel <incr> add incr to the process' nice level\n" -" -P|--procsched <policy[:prio]>\n" +" -s, --signal <signal> signal to send (default TERM)\n" +" -a, --startas <pathname> program to start (default is <executable>)\n" +" -r, --chroot <directory> chroot to <directory> before starting\n" +" -d, --chdir <directory> change to <directory> (default is /)\n" +" -N, --nicelevel <incr> add incr to the process' nice level\n" +" -P, --procsched <policy[:prio]>\n" " use <policy> with <prio> for the kernel\n" " process scheduler (default prio is 0)\n" -" -I|--iosched <class[:prio]> use <class> with <prio> to set the IO\n" +" -I, --iosched <class[:prio]> use <class> with <prio> to set the IO\n" " scheduler (default prio is 4)\n" -" -k|--umask <mask> change the umask to <mask> before starting\n" -" -b|--background force the process to detach\n" -" -C|--no-close do not close any file descriptor\n" -" -m|--make-pidfile create the pidfile before starting\n" -" |--remove-pidfile delete the pidfile after stopping\n" -" -R|--retry <schedule> check whether processes die, and retry\n" -" -t|--test test mode, don't do anything\n" -" -o|--oknodo exit status 0 (not 1) if nothing done\n" -" -q|--quiet be more quiet\n" -" -v|--verbose be more verbose\n" -"\n" +" -k, --umask <mask> change the umask to <mask> before starting\n" +" -b, --background force the process to detach\n" +" -C, --no-close do not close any file descriptor\n" +" -m, --make-pidfile create the pidfile before starting\n" +" --remove-pidfile delete the pidfile after stopping\n" +" -R, --retry <schedule> check whether processes die, and retry\n" +" -t, --test test mode, don't do anything\n" +" -o, --oknodo exit status 0 (not 1) if nothing done\n" +" -q, --quiet be more quiet\n" +" -v, --verbose be more verbose\n" +"\n"); + + printf( "Retry <schedule> is <item>|/<item>/... where <item> is one of\n" " -<signal-num>|[-]<signal-name> send that signal\n" " <timeout> wait that many seconds\n" " forever repeat remainder forever\n" "or <schedule> may be just <timeout>, meaning <signal>/<timeout>/KILL/<timeout>\n" -"\n" +"\n"); + + printf( "The process scheduler <policy> can be one of:\n" " other, fifo or rr\n" -"\n" +"\n"); + + printf( "The IO scheduler <class> can be one of:\n" " real-time, best-effort or idle\n" -"\n" +"\n"); + + printf( "Exit status:\n" " 0 = done\n" " 1 = nothing done (=> 0 if --oknodo)\n" |