From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RgFZv-0003sv-Ea for garchives@archives.gentoo.org; Thu, 29 Dec 2011 12:59:28 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 383EB21C040; Thu, 29 Dec 2011 12:59:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 057C221C040 for ; Thu, 29 Dec 2011 12:59:18 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8462E1B401F for ; Thu, 29 Dec 2011 12:59:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id EE30D80043 for ; Thu, 29 Dec 2011 12:59:17 +0000 (UTC) From: "Christian Ruppert" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Christian Ruppert" Message-ID: <49e99a739361b977b0841c602f10fc9895285197.idl0r@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/rc-logger.c X-VCS-Directories: src/rc/ X-VCS-Committer: idl0r X-VCS-Committer-Name: Christian Ruppert X-VCS-Revision: 49e99a739361b977b0841c602f10fc9895285197 Date: Thu, 29 Dec 2011 12:59:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 75f6716c-1699-4d87-ac55-fff9b4f3d620 X-Archives-Hash: b11997f42e54e9ec71ae9048cc9c5a94 commit: 49e99a739361b977b0841c602f10fc9895285197 Author: Christian Ruppert gentoo org> AuthorDate: Thu Dec 29 12:55:47 2011 +0000 Commit: Christian Ruppert gentoo org> CommitDate: Thu Dec 29 12:58:08 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D49e99a73 Don't try to write the log during sysinit During the sysinit and shutdown runlevels the logfile destination may be read-only. Skip the error messages in this case. X-Gentoo-Bug: 390645 X-Gentoo-Bug-URL: https://bugs.gentoo.org/390645 --- src/rc/rc-logger.c | 6 +++--- 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) !=3D 0) { + if ((strcmp(level, RC_LEVEL_SHUTDOWN) !=3D 0) && (strcmp(level, RC_LE= VEL_SYSINIT) !=3D 0)) { log_error =3D 1; eerror("Error: fopen(%s) failed: %s", logfile, strerror(errno)); }