aboutsummaryrefslogtreecommitdiff
path: root/src/rc/rc-applets.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-07-27 11:30:49 +0000
committerRoy Marples <roy@marples.name>2008-07-27 11:30:49 +0000
commitcea206014d80e61e16f53a6c61577d063a7b75b8 (patch)
tree41767f8334a0d2f91f88760dc912d4e9bcf3da0b /src/rc/rc-applets.c
parent46a74f244e60e30b90f2869b586a27a4405c91cc (diff)
Attempt to make s-s-d simpler by not enforcing the need for a full path and maybe working better with interpreted scripts.
Diffstat (limited to 'src/rc/rc-applets.c')
-rw-r--r--src/rc/rc-applets.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/rc/rc-applets.c b/src/rc/rc-applets.c
index 6a6216c4..2b7d1909 100644
--- a/src/rc/rc-applets.c
+++ b/src/rc/rc-applets.c
@@ -243,9 +243,9 @@ static int do_e(int argc, char **argv)
static int do_service(int argc, char **argv)
{
bool ok = false;
- char *service = NULL;
+ char *service;
+ char *exec;
int idx = 0;
- char *d[] = { NULL, NULL };
if (argc > 1)
service = argv[1];
@@ -270,21 +270,19 @@ static int do_service(int argc, char **argv)
else if (strcmp(applet, "service_wasinactive") == 0)
ok = (rc_service_state(service) & RC_SERVICE_WASINACTIVE);
else if (strcmp(applet, "service_started_daemon") == 0) {
- d[0] = argv[1];
-
service = getenv("RC_SVCNAME");
+ exec = argv[1];
if (argc > 3) {
service = argv[1];
- d[0] = argv[2];
+ exec = argv[2];
sscanf(argv[3], "%d", &idx);
} else if (argc == 3) {
if (sscanf(argv[2], "%d", &idx) != 1) {
service = argv[1];
- d[0] = argv[2];
+ exec = argv[2];
}
}
- ok = rc_service_started_daemon(service,
- (const char * const *)d, idx);
+ ok = rc_service_started_daemon(service, exec, NULL, idx);
} else
eerrorx("%s: unknown applet", applet);