From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1B3BA13838B for ; Mon, 6 Oct 2014 21:25:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 532C7E0961; Mon, 6 Oct 2014 21:25:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 02919E0961 for ; Mon, 6 Oct 2014 21:25:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2EB7C33EEAE for ; Mon, 6 Oct 2014 21:25:15 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D9A0D72DC for ; Mon, 6 Oct 2014 21:25:13 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1412630684.ad770d739cd7d68dd16b4b2e23d4822ebeb3305b.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: init.d/ X-VCS-Repository: proj/openrc X-VCS-Files: init.d/localmount.in X-VCS-Directories: init.d/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: ad770d739cd7d68dd16b4b2e23d4822ebeb3305b X-VCS-Branch: master Date: Mon, 6 Oct 2014 21:25:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 98d03d65-c161-4114-bdfe-e3f8c6b8deb6 X-Archives-Hash: abb49a79a2471e20d500795e520d1bd1 commit: ad770d739cd7d68dd16b4b2e23d4822ebeb3305b Author: Rick Farina (ZeroChaos) gmail com> AuthorDate: Mon Oct 6 16:15:44 2014 +0000 Commit: William Hubbs gentoo org> CommitDate: Mon Oct 6 21:24:44 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=ad770d73 localmount: unmount aufs branches --- init.d/localmount.in | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/init.d/localmount.in b/init.d/localmount.in index bf3dd0f..1335aa9 100644 --- a/init.d/localmount.in +++ b/init.d/localmount.in @@ -63,6 +63,31 @@ stop() . "$RC_LIBEXECDIR"/sh/rc-mount.sh + if [ "$RC_UNAME" = Linux ] && [ -d /sys/fs/aufs ] ; then + #if / is aufs we remount it noxino during shutdown + if mountinfo -q -f '^aufs$' / ; then + mount -o remount,noxino,rw / + sync + fi + + local aufs_branch aufs_mount_dir aufs_mount_point aufs_si_dir aufs_si_id + for aufs_si_dir in /sys/fs/aufs/*; do + aufs_mount_dir=${aufs_si_dir#/sys/fs/aufs/} + aufs_si_id="$(printf "%s" $aufs_mount_dir | sed 's/_/=/g')" + aufs_mount_point="$(mountinfo -o ${aufs_si_id})" + for x in $aufs_si_dir/br[0-9][0-9][0-9]; do + aufs_branch=$(sed 's/=.*//g' $x) + eindent + if ! mount -o "remount,del:$aufs_branch" "$aufs_mount_point" > /dev/null 2>&1; then + ewarn "Failed to remove branch $aufs_branch from aufs \ + $aufs_mount_point" + fi + eoutdent + sync + done + done + fi + # Umount loop devices einfo "Unmounting loop devices" eindent