aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-07-10 20:11:42 +0000
committerRoy Marples <roy@marples.name>2007-07-10 20:11:42 +0000
commit2aa7ebfe0d05bb94708e890268ab2c0701312f71 (patch)
treec0387a3d60db32119f3692b7fa6a0f734b4a8872 /src
parent023d66578b051fda123df4d2c07ae8492a71da93 (diff)
Allow non root users to describe
Diffstat (limited to 'src')
-rw-r--r--src/runscript.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/runscript.c b/src/runscript.c
index 2e41d59e..77747e5f 100644
--- a/src/runscript.c
+++ b/src/runscript.c
@@ -1192,7 +1192,10 @@ int main (int argc, char **argv)
setenv ("RC_CMD", optarg, 1);
doneone = true;
- if (strcmp (optarg, "help") == 0) {
+
+ if (strcmp (optarg, "describe") == 0) {
+ svc_exec (optarg, NULL);
+ } else if (strcmp (optarg, "help") == 0) {
execl (RCSCRIPT_HELP, RCSCRIPT_HELP, service, "help", (char *) NULL);
eerrorx ("%s: failed to exec `" RCSCRIPT_HELP "': %s",
applet, strerror (errno));
@@ -1218,6 +1221,7 @@ int main (int argc, char **argv)
} else if (strcmp (optarg, "status") == 0) {
rc_service_state_t r = svc_status (service);
retval = (int) r;
+
} else if (strcmp (optarg, "help") == 0) {
execl (RCSCRIPT_HELP, RCSCRIPT_HELP, service, "help", (char *) NULL);
eerrorx ("%s: failed to exec `" RCSCRIPT_HELP "': %s",
@@ -1258,7 +1262,7 @@ int main (int argc, char **argv)
einfo ("Manually resetting %s to stopped state", applet);
rc_mark_service (applet, rc_service_stopped);
uncoldplug ();
- }else
+ } else
svc_exec (optarg, NULL);
/* Flush our buffered output if any */