summaryrefslogtreecommitdiff
path: root/src/rc/rc-logger.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc/rc-logger.c')
-rw-r--r--src/rc/rc-logger.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rc/rc-logger.c b/src/rc/rc-logger.c
index 22d7c72..c085315 100644
--- a/src/rc/rc-logger.c
+++ b/src/rc/rc-logger.c
@@ -277,10 +277,10 @@ rc_logger_open(const char *level)
fclose(plog);
} else {
/*
- * logfile or its basedir may be read-only during shutdown so skip
- * the error in this case
+ * logfile or its basedir may be read-only during sysinit and
+ * shutdown so skip the error in this case
*/
- if (strcmp(level, RC_LEVEL_SHUTDOWN) != 0) {
+ if ((strcmp(level, RC_LEVEL_SHUTDOWN) != 0) && (strcmp(level, RC_LEVEL_SYSINIT) != 0)) {
log_error = 1;
eerror("Error: fopen(%s) failed: %s", logfile, strerror(errno));
}