runparts: improve usage text

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2026-08-16 21:43:26 +02:00
parent 8e2492fc87
commit f3b013bc0a
+13 -1
View File
@@ -193,7 +193,19 @@ int run_parts(char *dir, char *cmd, const char *env[], int progress, int sysv)
#ifndef __FINIT__
static int usage(int rc)
{
warnx("usage: runparts [-bdhps?] DIRECTORY");
fprintf(stderr,
"Usage: runparts [OPTIONS] DIRECTORY\n"
"\n"
"Run all executable scripts in DIRECTORY in alphabetical order.\n"
"Scripts prefixed S<NUM> are called with 'start', K<NUM> with 'stop'.\n"
"\n"
"Options:\n"
" -b Batch mode, disable progress output and ANSI colors\n"
" -d Enable debug output\n"
" -h This help text\n"
" -p Show progress and exit status for each script\n"
" -s SysV compat, only run S<NUM>name and K<NUM>name scripts\n"
"\n");
return rc;
}