aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-28 13:16:33 +0000
committerRoy Marples <roy@marples.name>2008-01-28 13:16:33 +0000
commit9ce3086bf5658caf4f1d97ed489e2f96ff7b6282 (patch)
treea2737b0b1d1a1665fed6bd409b74ebe88995a63b /src
parentae6929fa3080bf3f784cf8683d5b5f19cad79d40 (diff)
Fix service_started_daemon, bug #11
Diffstat (limited to 'src')
-rw-r--r--src/librc/librc-daemon.c2
-rw-r--r--src/rc/rc-applets.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c
index a972bd7a..d697a681 100644
--- a/src/librc/librc-daemon.c
+++ b/src/librc/librc-daemon.c
@@ -431,7 +431,7 @@ bool rc_service_started_daemon (const char *service, const char *exec,
} else {
if ((dp = opendir (dirpath))) {
while ((d = readdir (dp))) {
- if (d->d_name[0] == ',')
+ if (d->d_name[0] == '.')
continue;
retval = _match_daemon (dirpath, d->d_name, mexec, NULL, NULL);
if (retval)
diff --git a/src/rc/rc-applets.c b/src/rc/rc-applets.c
index 7d7d04e5..12519982 100644
--- a/src/rc/rc-applets.c
+++ b/src/rc/rc-applets.c
@@ -229,11 +229,14 @@ static int do_service (int argc, char **argv)
service = getenv ("SVCNAME");
if (argc > 3) {
- service = argv[0];
+ service = argv[1];
d = argv[2];
sscanf (argv[3], "%d", &idx);
} else if (argc == 3) {
- sscanf (argv[2], "%d", &idx);
+ if (sscanf (argv[2], "%d", &idx) != 1) {
+ service = argv[1];
+ d = argv[2];
+ }
}
exit (rc_service_started_daemon (service, d, idx) ? 0 : 1);
} else