From f3b013bc0a0b779224d9060f6f49b21f24a9130b Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 6 May 2026 23:50:12 +0200 Subject: [PATCH] runparts: improve usage text Signed-off-by: Joachim Wiberg --- src/runparts.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/runparts.c b/src/runparts.c index 84c52c98..2645ed05 100644 --- a/src/runparts.c +++ b/src/runparts.c @@ -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 are called with 'start', K 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 Sname and Kname scripts\n" + "\n"); return rc; }