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 1Rg5Jv-0002AQ-5I for garchives@archives.gentoo.org; Thu, 29 Dec 2011 02:02:15 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BC4E021C15C for ; Thu, 29 Dec 2011 02:02:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 84BFA21C043 for ; Thu, 29 Dec 2011 01:50:32 +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 CC17B1B401F for ; Thu, 29 Dec 2011 01:50:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 1C31880043 for ; Thu, 29 Dec 2011 01:50:31 +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: 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: ec65f181eab6289101a0c0df624c9b022f3742d0 Date: Thu, 29 Dec 2011 01:50:31 +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: f205fbc0-4be4-4ca4-88af-6c7bc988e0fe X-Archives-Hash: ed2108dfb68dd659abe08853b0e848c6 commit: ec65f181eab6289101a0c0df624c9b022f3742d0 Author: Christian Ruppert gentoo org> AuthorDate: Thu Dec 29 01:45:04 2011 +0000 Commit: Christian Ruppert gentoo org> CommitDate: Thu Dec 29 01:50:24 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3Dec65f181 Don't print error when the logfile isn't writeable during shutdown The logfile or its basedir may be read-only during shutdown because the directory may be umounted or read-only remounted already. In this case we= simply skip this error. This is related to a comment in bug 390645 but the initial bug is not fix= ed through this commit. X-Gentoo-Bug: 390645 X-Gentoo-Bug-URL: https://bugs.gentoo.org/390645 --- src/rc/rc-logger.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/rc/rc-logger.c b/src/rc/rc-logger.c index 52c39f0..8f3b218 100644 --- a/src/rc/rc-logger.c +++ b/src/rc/rc-logger.c @@ -276,8 +276,14 @@ rc_logger_open(const char *level) fclose(log); fclose(plog); } else { - log_error =3D 1; - eerror("Error: fopen(%s) failed: %s", logfile, strerror(errno)); + /* + * logfile or its basedir may be read-only during shutdown so skip + * the error in this case + */ + if (strcmp(rc_runlevel_get(), "shutdown") !=3D 0) { + log_error =3D 1; + eerror("Error: fopen(%s) failed: %s", logfile, strerror(errno)); + } } =20 /* Try to keep the temporary log in case of errors */