summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2025-05-08 01:34:48 +0200
committerAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2025-06-07 22:47:20 +0200
commitba618fd0a5232d0e2f681c269e527067681080ae (patch)
treebe58a7573eb35f175d2ac360ad1b728d4e00b904
parent8dc4626e1b6b9336a351dc55aa1e748435759094 (diff)
*: move --user flags to only the programs that it makes senseorigin/cmdline
checkpath and other helpers shouldn't really get called with --user
-rw-r--r--src/openrc-run/openrc-run.c3
-rw-r--r--src/openrc/rc.c3
-rw-r--r--src/rc-depend/rc-depend.c3
-rw-r--r--src/rc-service/rc-service.c3
-rw-r--r--src/rc-status/rc-status.c3
-rw-r--r--src/rc-update/rc-update.c3
-rw-r--r--src/shared/_usage.h1
7 files changed, 12 insertions, 7 deletions
diff --git a/src/openrc-run/openrc-run.c b/src/openrc-run/openrc-run.c
index ac24d713..fc0f2565 100644
--- a/src/openrc-run/openrc-run.c
+++ b/src/openrc-run/openrc-run.c
@@ -69,7 +69,8 @@ const char *extraopts = "stop | start | restart | status | describe | zap";
opt(s, ifstarted, no_argument, "only run commands when started") \
opt(S, ifstopped, no_argument, "only run commands when stopped") \
opt(D, nodeps, no_argument, "ignore dependencies") \
- opt(l, lockfd, required_argument, "fd of the exclusive lock from rc")
+ opt(l, lockfd, required_argument, "fd of the exclusive lock from rc") \
+ opt(U, user, no_argument, "Run in user mode")
cmdline_opts(opts)
static char *service, *runlevel, *ibsave, *prefix;
diff --git a/src/openrc/rc.c b/src/openrc/rc.c
index 0d851387..bc1bb58d 100644
--- a/src/openrc/rc.c
+++ b/src/openrc/rc.c
@@ -54,7 +54,8 @@
opt(o, override, required_argument, "override the next runlevel to change into\n" \
"when leaving single user or boot runlevels") \
opt(s, service, required_argument, "runs the service specified with the rest of the arguments") \
- opt(S, sys, no_argument, "output the RC system type, if any")
+ opt(S, sys, no_argument, "output the RC system type, if any") \
+ opt(U, user, no_argument, "Run in user mode")
cmdline_opts(opts)
const char *extraopts = NULL;
diff --git a/src/rc-depend/rc-depend.c b/src/rc-depend/rc-depend.c
index 4736cc12..2a9c374b 100644
--- a/src/rc-depend/rc-depend.c
+++ b/src/rc-depend/rc-depend.c
@@ -39,7 +39,8 @@ const char *extraopts = NULL;
opt(T, notrace, no_argument, "Don't trace service dependencies") \
opt(s, strict, no_argument, "Only use what is in the runlevels") \
opt(u, update, no_argument, "Force an update of the dependency tree") \
- opt(F, deptree-file, required_argument, "File to load cached deptree from")
+ opt(F, deptree-file, required_argument, "File to load cached deptree from") \
+ opt(U, user, no_argument, "Run in user mode")
cmdline_opts(opts)
const char *usagestring = NULL;
diff --git a/src/rc-service/rc-service.c b/src/rc-service/rc-service.c
index bfd78e94..3eb84f00 100644
--- a/src/rc-service/rc-service.c
+++ b/src/rc-service/rc-service.c
@@ -43,7 +43,8 @@ const char *extraopts = NULL;
opt(S, ifstopped, no_argument, "if the service is stopped run the command") \
opt(l, list, no_argument, "list all available services") \
opt(r, resolve, required_argument, "resolve the service name to an init script") \
- opt(Z, dry-run, no_argument, "dry run (show what would happen)")
+ opt(Z, dry-run, no_argument, "dry run (show what would happen)") \
+ opt(U, user, no_argument, "Run in user mode")
cmdline_opts(opts)
const char *usagestring = ""
diff --git a/src/rc-status/rc-status.c b/src/rc-status/rc-status.c
index 1dd74730..21a0ccd1 100644
--- a/src/rc-status/rc-status.c
+++ b/src/rc-status/rc-status.c
@@ -49,7 +49,8 @@ const char *extraopts = NULL;
opt(r, runlevel, no_argument, "Show the name of the current runlevel") \
opt(s, servicelist, no_argument, "Show service list") \
opt(S, supervised, no_argument, "show supervised services") \
- opt(u, unused, no_argument, "Show services not assigned to any runlevel")
+ opt(u, unused, no_argument, "Show services not assigned to any runlevel") \
+ opt(U, user, no_argument, "Run in user mode")
cmdline_opts(opts)
const char *usagestring = ""
"Usage: rc-status [-C] [-f ini] [-i state] [runlevel]\n"
diff --git a/src/rc-update/rc-update.c b/src/rc-update/rc-update.c
index 43ea50c2..41b1fb79 100644
--- a/src/rc-update/rc-update.c
+++ b/src/rc-update/rc-update.c
@@ -39,7 +39,8 @@ const char *usagestring = ""
#define opts(opt, opt_long) \
opt(a, all, no_argument, "Process all runlevels") \
opt(s, stack, no_argument, "Stack a runlevel instead of a service") \
- opt(u, update, no_argument, "Force an update of the dependency tree")
+ opt(u, update, no_argument, "Force an update of the dependency tree") \
+ opt(U, user, no_argument, "Run in user mode")
cmdline_opts(opts)
/* Return the number of changes made:
diff --git a/src/shared/_usage.h b/src/shared/_usage.h
index fff757f3..f4b1df58 100644
--- a/src/shared/_usage.h
+++ b/src/shared/_usage.h
@@ -29,7 +29,6 @@
opt(V, version, no_argument, "Display software version") \
opt(v, verbose, no_argument, "Run verbosely") \
opt(q, quiet, no_argument, "Run quietly (repeat to suppress errors)") \
- opt(U, user, no_argument, "Run in user mode")
#define cmdline_opts(opts) \
const struct option longopts[] = { opts(longopt, longopt_only) common_opts(longopt) }; \