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 <gentoo-commits+bounces-428454-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1RyReA-0002kQ-LR
	for garchives@archives.gentoo.org; Fri, 17 Feb 2012 17:31:02 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0F164E09DA;
	Fri, 17 Feb 2012 17:30:52 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id CA3FCE09DA
	for <gentoo-commits@lists.gentoo.org>; Fri, 17 Feb 2012 17:30:52 +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 2CEB71B400D
	for <gentoo-commits@lists.gentoo.org>; Fri, 17 Feb 2012 17:30:52 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id DE94EE5400
	for <gentoo-commits@lists.gentoo.org>; Fri, 17 Feb 2012 17:30:50 +0000 (UTC)
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" <williamh@gentoo.org>
Message-ID: <1329422704.a5509d681997321e966e776b6a0e4630aa827595.WilliamH@gentoo>
Subject: [gentoo-commits] proj/openrc:master commit in: init.d/
X-VCS-Repository: proj/openrc
X-VCS-Files: init.d/procfs.in
X-VCS-Directories: init.d/
X-VCS-Committer: WilliamH
X-VCS-Committer-Name: William Hubbs
X-VCS-Revision: a5509d681997321e966e776b6a0e4630aa827595
X-VCS-Branch: master
Date: Fri, 17 Feb 2012 17:30:50 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 5adf3659-7f2d-45f3-bafa-80c94575d78a
X-Archives-Hash: 956e9f40c7f730c991cfd6d100eba7f4

commit:     a5509d681997321e966e776b6a0e4630aa827595
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 15 15:00:23 2012 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Feb 16 20:05:04 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D=
commit;h=3Da5509d68

Enable binfmt_misc for openvz containers

Reported-by: Daniel Robbins <drobbins <AT> funtoo.org>
X-Gentoo-Bug: 401875
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=3D401875

---
 init.d/procfs.in |   38 ++++++++++++++++++++------------------
 1 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/init.d/procfs.in b/init.d/procfs.in
index 6afc81f..baa33ad 100644
--- a/init.d/procfs.in
+++ b/init.d/procfs.in
@@ -8,7 +8,7 @@ depend()
 {
 	use modules devfs
 	need localmount
-	keyword -openvz -prefix -vserver -lxc
+	keyword -prefix -vserver -lxc
 }
=20
 start()
@@ -20,23 +20,6 @@ start()
=20
 	[ -e /proc/filesystems ] || return 0
=20
-	# Check what USB fs the kernel support.  Currently
-	# 2.5+ kernels, and later 2.4 kernels have 'usbfs',
-	# while older kernels have 'usbdevfs'.
-	if [ -d /proc/bus/usb -a ! -e /proc/bus/usb/devices ]; then
-		local usbfs=3D$(grep -Fow usbfs /proc/filesystems ||
-			grep -Fow usbdevfs /proc/filesystems)
-		if [ -n "$usbfs" ]; then
-			ebegin "Mounting USB device filesystem [$usbfs]"
-			local usbgid=3D"$(getent group usb | \
-				sed -e 's/.*:.*:\(.*\):.*/\1/')"
-			mount -t $usbfs \
-				-o ${usbgid:+devmode=3D0664,devgid=3D$usbgid,}noexec,nosuid \
-				usbfs /proc/bus/usb
-			eend $?
-		fi
-	fi
-
 	# Setup Kernel Support for miscellaneous Binary Formats
 	if [ -d /proc/sys/fs/binfmt_misc -a ! -e /proc/sys/fs/binfmt_misc/regis=
ter ]; then
 		if grep -qs binfmt_misc /proc/filesystems; then
@@ -58,6 +41,25 @@ start()
 		fi
 	fi
=20
+	[ "$RC_SYS" =3D=3D "OPENVZ" ] && return 0
+
+	# Check what USB fs the kernel support.  Currently
+	# 2.5+ kernels, and later 2.4 kernels have 'usbfs',
+	# while older kernels have 'usbdevfs'.
+	if [ -d /proc/bus/usb -a ! -e /proc/bus/usb/devices ]; then
+		local usbfs=3D$(grep -Fow usbfs /proc/filesystems ||
+			grep -Fow usbdevfs /proc/filesystems)
+		if [ -n "$usbfs" ]; then
+			ebegin "Mounting USB device filesystem [$usbfs]"
+			local usbgid=3D"$(getent group usb | \
+				sed -e 's/.*:.*:\(.*\):.*/\1/')"
+			mount -t $usbfs \
+				-o ${usbgid:+devmode=3D0664,devgid=3D$usbgid,}noexec,nosuid \
+				usbfs /proc/bus/usb
+			eend $?
+		fi
+	fi
+
 	# Setup Kernel Support for SELinux
 	if [ -d /selinux ] && ! mountinfo -q /selinux; then
 		if grep -qs selinuxfs /proc/filesystems; then