Author: mladen.turk(a)jboss.com
Date: 2007-10-11 09:41:32 -0400 (Thu, 11 Oct 2007)
New Revision: 1099
Modified:
trunk/sight/native/os/solaris/scm.c
trunk/sight/native/os/solaris/service.c
Log:
Add missing protos
Modified: trunk/sight/native/os/solaris/scm.c
===================================================================
--- trunk/sight/native/os/solaris/scm.c 2007-10-11 13:31:46 UTC (rev 1098)
+++ trunk/sight/native/os/solaris/scm.c 2007-10-11 13:41:32 UTC (rev 1099)
@@ -35,6 +35,8 @@
#include "sight_types.h"
#include "sight_private.h"
+#include <sys/stat.h>
+
static const struct {
const char *flavor; /* Linux flavor */
const char *idpath; /* Path of the init.d scripts */
Modified: trunk/sight/native/os/solaris/service.c
===================================================================
--- trunk/sight/native/os/solaris/service.c 2007-10-11 13:31:46 UTC (rev 1098)
+++ trunk/sight/native/os/solaris/service.c 2007-10-11 13:41:32 UTC (rev 1099)
@@ -146,6 +146,7 @@
scm_instance_t *si;
SIGHT_ALLOC_CSTRING(name);
int rc = 0;
+ int state = SIGHT_SS_DISABLED;
char rlpath[PATH_MAX];
DIR *rd = NULL;
@@ -163,9 +164,10 @@
}
si = (scm_instance_t *)ns->native;
sprintf(rlpath, si->rlpath, si->what);
+
+sretry:
if ((rd = opendir(rlpath))) {
struct dirent *sent, sbuf;
- int state = SIGHT_SS_DISABLED;
while (!readdir_r(rd, &sbuf, &sent)) {
char sname[PATH_MAX];
char smatch[PATH_MAX];
@@ -191,6 +193,11 @@
closedir(rd);
CALL_METHOD1(0000, thiz, state);
}
+ if (state == SIGHT_SS_DISABLED &&
+ strcmp(rlpath, "/etc/rcS.d/")) {
+ strcpy(rlpath, "/etc/rcS.d/");
+ goto sretry;
+ }
SIGHT_FREE_CSTRING(name);
return APR_FROM_OS_ERROR(rc);
}
Show replies by date