From dcbdf8dc557e77a75b1f6e82f8b21223650be68c Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 16 Mar 1999 07:40:41 +0000 Subject: if /dev/log exists on ROFS, that *doesn't* mean syslog is running --- src/initlog.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/initlog.c b/src/initlog.c index 46fc0ee7..f7e0fc49 100644 --- a/src/initlog.c +++ b/src/initlog.c @@ -107,13 +107,15 @@ int startDaemon() { int logLine(struct logInfo *logEnt) { /* Logs a line... somewhere. */ - int x; + int x,y,z; struct stat statbuf; /* Don't log empty or null lines */ if (!logEnt->line || !strcmp(logEnt->line,"\n")) return 0; - if ( (stat(_PATH_LOG,&statbuf)==-1) && ((x=startDaemon())) ) { + if ( ((stat(_PATH_LOG,&statbuf)==-1)||(access(_PATH_LOG,W_OK)==-1)) + && (x=startDaemon()) + ) { logData=realloc(logData,(logEntries+1)*sizeof(struct logInfo)); logData[logEntries]= (*logEnt); logEntries++; -- cgit v1.2.1