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 1QlaSl-0001Dx-Qq for garchives@archives.gentoo.org; Tue, 26 Jul 2011 05:45:52 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C425121C029; Tue, 26 Jul 2011 05:45:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 95F8F21C029 for ; Tue, 26 Jul 2011 05:45:40 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 08E531BC01C for ; Tue, 26 Jul 2011 05:45:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 1E18F8003D for ; Tue, 26 Jul 2011 05:45:39 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <863ef36011144a8907359bddc3fe705e5185fd1b.WilliamH@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: init.d/ X-VCS-Repository: proj/openrc X-VCS-Files: init.d/mtab.in X-VCS-Directories: init.d/ X-VCS-Committer: WilliamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 863ef36011144a8907359bddc3fe705e5185fd1b Date: Tue, 26 Jul 2011 05:45:39 +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: X-Archives-Hash: b0b325376ff4b60e60f11664375ef0f2 commit: 863ef36011144a8907359bddc3fe705e5185fd1b Author: William Hubbs gentoo org> AuthorDate: Sat Jul 23 23:25:55 2011 +0000 Commit: William Hubbs gentoo org> CommitDate: Tue Jul 26 05:45:22 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D863ef360 mtab: fix test for a link to a location in /proc /etc/mtab can be a link to a file in /proc. If it is, we should not attempt to update /etc/mtab. The original test used "! -w" as part of the test. This does not work since everything is writeable by root. Thanks to Robin Johnson for the suggestion of using readlink -f and the regular expression. Reported-By: junkmailnotread yahoo.com X-Gentoo-Bug: 370037 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=3D370037 --- init.d/mtab.in | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/init.d/mtab.in b/init.d/mtab.in index e741bc1..23a5e7d 100644 --- a/init.d/mtab.in +++ b/init.d/mtab.in @@ -12,9 +12,10 @@ depend() =20 start() { - # /etc/mtab could be a symlink to /proc/mounts - if [ ! -w /etc/mtab -a -L /etc/mtab ]; then - einfo "Skipping mtab update (non writeable symlink)" + # /etc/mtab could be a symlink to a location in /proc + if readlink -f /etc/mtab | grep -sq '^/proc/\(self\|[0-9]\+\)/mounts$' + then + einfo "Skipping mtab update (link points to location in /proc)" return 0 fi =20