From 9ce3086bf5658caf4f1d97ed489e2f96ff7b6282 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 28 Jan 2008 13:16:33 +0000 Subject: Fix service_started_daemon, bug #11 --- src/rc/rc-applets.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/rc') 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 -- cgit v1.2.3