diff options
author | Bill Nottingham <notting@redhat.com> | 1999-03-16 07:40:41 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 1999-03-16 07:40:41 +0000 |
commit | dcbdf8dc557e77a75b1f6e82f8b21223650be68c (patch) | |
tree | a317192283abacdd4bf637f4ed98e1381742a5f0 | |
parent | 94cdde2be5ea810be568f5601f1650b4a891dfa7 (diff) | |
download | initscripts-dcbdf8dc557e77a75b1f6e82f8b21223650be68c.tar initscripts-dcbdf8dc557e77a75b1f6e82f8b21223650be68c.tar.gz initscripts-dcbdf8dc557e77a75b1f6e82f8b21223650be68c.tar.bz2 initscripts-dcbdf8dc557e77a75b1f6e82f8b21223650be68c.tar.xz initscripts-dcbdf8dc557e77a75b1f6e82f8b21223650be68c.zip |
if /dev/log exists on ROFS, that *doesn't* mean syslog is running
-rw-r--r-- | src/initlog.c | 6 |
1 files 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++; |