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 1R5Nek-000519-1j for garchives@archives.gentoo.org; Sun, 18 Sep 2011 20:08:02 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4E7C521C051; Sun, 18 Sep 2011 20:07:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 1E1EE21C037 for ; Sun, 18 Sep 2011 20:07:49 +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 9B7D91B4031 for ; Sun, 18 Sep 2011 20:07:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 0255D80048 for ; Sun, 18 Sep 2011 20:07:48 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <47d305d2af41a6105824bd704a0f0f958b35871d.vapier@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: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 47d305d2af41a6105824bd704a0f0f958b35871d Date: Sun, 18 Sep 2011 20:07:48 +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: 6f320c677af014e51e48cab11c2a1248 commit: 47d305d2af41a6105824bd704a0f0f958b35871d Author: Mike Frysinger gentoo org> AuthorDate: Sun Sep 18 19:29:01 2011 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sun Sep 18 20:01:26 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D47d305d2 procfs: load config files from binfmt.d into /proc/sys/fs/binfmt_misc/reg= ister This is a KISS version. Let's see where we go from here in terms of complexity. Maybe nowhere! X-Gentoo-Bug: 382723 X-Gentoo-Bug-URL: https://bugs.gentoo.org/382723 Signed-off-by: Mike Frysinger gentoo.org> --- init.d/procfs.in | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/init.d/procfs.in b/init.d/procfs.in index 43ba45a..d86814c 100644 --- a/init.d/procfs.in +++ b/init.d/procfs.in @@ -54,7 +54,18 @@ start() ebegin "Mounting misc binary format filesystem" mount -t binfmt_misc -o nodev,noexec,nosuid \ binfmt_misc /proc/sys/fs/binfmt_misc - eend $? + if eend $? ; then + local fmts + ebegin "Loading custom binary format handlers" + fmts=3D$(grep -hsv -e '^[#;]' -e '^[[:space:]]*$' \ + /run/binfmt.d/*.conf \ + "/etc"/binfmt.d/*.conf \ + ""/usr/lib/binfmt.d/*.conf) + if [ -n "${fmts}" ]; then + echo "${fmts}" > /proc/sys/fs/binfmt_misc/register + fi + eend $? + fi fi fi =20