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 1RzNDN-0007cr-07 for garchives@archives.gentoo.org; Mon, 20 Feb 2012 06:59:13 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8600AE0D81; Mon, 20 Feb 2012 06:59:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 46C97E0D81 for ; Mon, 20 Feb 2012 06:59:00 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 546041B4004 for ; Mon, 20 Feb 2012 06:58:59 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id BEE2FE53FF for ; Mon, 20 Feb 2012 06:58:57 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1329721090.995635a2c7fbc6cc6250f697c4977bd2e2f56762.robbat2@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: /, defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: ChangeLog defaults/linuxrc X-VCS-Directories: / defaults/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 995635a2c7fbc6cc6250f697c4977bd2e2f56762 X-VCS-Branch: master Date: Mon, 20 Feb 2012 06:58:57 +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: e4d78a1e-4863-4cca-b60a-ae7987dbdc27 X-Archives-Hash: 330a36b83e48dc1d241d9db5bf5329b2 commit: 995635a2c7fbc6cc6250f697c4977bd2e2f56762 Author: Robin H. Johnson gentoo org> AuthorDate: Mon Feb 20 06:58:10 2012 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Mon Feb 20 06:58:10 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/genkernel.git= ;a=3Dcommit;h=3D995635a2 With the new /usr mounting, if the device path that ends up in /proc/moun= ts ends up being different than in /etc/fstab due to symlinks, mount -a w= ill always exit 32. Avoid by resolving symlinks like util-linux does. Signed-off-by: Robin H. Johnson gentoo.org> --- ChangeLog | 5 +++++ defaults/linuxrc | 5 +++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index e5c391b..4d9f866 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ # Distributed under the GPL v2 # $Id$ =20 + 20 Feb 2012; Robin H. Johnson defaults/linuxrc: + With the new /usr mounting, if the device path that ends up in /proc/m= ounts + ends up being different than in /etc/fstab due to symlinks, mount -a w= ill + always exit 32. Avoid by resolving symlinks like util-linux does. + 14 Feb 2012; Robin H. Johnson gen_compile.sh, gen_initramfs.sh: dmraid is entirely broken if you try to use the system static diff --git a/defaults/linuxrc b/defaults/linuxrc index 693257f..528f58d 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -544,6 +544,9 @@ do if [ "${REAL_ROOT}" =3D '/dev/nfs' ]; then findnfsmount else + # If $REAL_ROOT is a symlink + # Resolve it like util-linux mount does + [ -L ${REAL_ROOT} ] && REAL_ROOT=3D`readlink ${REAL_ROOT}` # mount ro so fsck doesn't barf later if [ "${REAL_ROOTFLAGS}" =3D '' ]; then good_msg "Using mount -t ${ROOTFSTYPE} -o ${MOUNT_STATE}" @@ -777,6 +780,8 @@ fi =20 for fs in $fslist; do dev=3D$(get_mount_device $fs) + # Resolve it like util-linux mount does + [ -L ${dev} ] && dev=3D`readlink ${dev}` # In this case, it's probably part of the filesystem # and not a mountpoint [ -z "$dev" ] && continue