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 E5384138BED for ; Tue, 13 Oct 2015 22:46:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0FA31E0653; Tue, 13 Oct 2015 22:46:00 +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 62BD8E077B for ; Tue, 13 Oct 2015 22:45:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5DF7634095A for ; Tue, 13 Oct 2015 22:45:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5AF4810B3 for ; Tue, 13 Oct 2015 22:45:56 +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: <1444766873.9d53d436ae22d6f0f6fc1537e836dd1b4d31cf35.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: init.d/ X-VCS-Repository: proj/openrc X-VCS-Files: init.d/sysfs.in X-VCS-Directories: init.d/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 9d53d436ae22d6f0f6fc1537e836dd1b4d31cf35 X-VCS-Branch: master Date: Tue, 13 Oct 2015 22:45:56 +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: a3e6fc6f-391d-4a98-bdfc-882a18635ba2 X-Archives-Hash: 5977bf611371de03779f861716e8bccd commit: 9d53d436ae22d6f0f6fc1537e836dd1b4d31cf35 Author: William Hubbs gmail com> AuthorDate: Tue Oct 13 19:53:43 2015 +0000 Commit: William Hubbs gentoo org> CommitDate: Tue Oct 13 20:07:53 2015 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=9d53d436 sysfs: consolidate cgroup processing code in a single function init.d/sysfs.in | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/init.d/sysfs.in b/init.d/sysfs.in index f0bb313..96fa460 100644 --- a/init.d/sysfs.in +++ b/init.d/sysfs.in @@ -61,16 +61,6 @@ mount_misc() fi fi - # set up kernel support for cgroups - if [ -d /sys/fs/cgroup ] && ! mountinfo -q /sys/fs/cgroup; then - if grep -qs cgroup /proc/filesystems; then - ebegin "Mounting cgroup filesystem" - local opts="${sysfs_opts},mode=755,size=${rc_cgroupsize:-10m}" - mount -n -t tmpfs -o ${opts} cgroup_root /sys/fs/cgroup - eend $? - fi - fi - # set up kernel support for fusectl if [ -d /sys/fs/fuse/connections ] \ && ! mountinfo -q /sys/fs/fuse/connections; then @@ -108,6 +98,16 @@ mount_misc() mount_cgroups() { + # set up kernel support for cgroups + if [ -d /sys/fs/cgroup ] && ! mountinfo -q /sys/fs/cgroup; then + if grep -qs cgroup /proc/filesystems; then + ebegin "Mounting cgroup filesystem" + local opts="${sysfs_opts},mode=755,size=${rc_cgroupsize:-10m}" + mount -n -t tmpfs -o ${opts} cgroup_root /sys/fs/cgroup + eend $? + fi + fi + mountinfo -q /sys/fs/cgroup || return 0 if ! mountinfo -q /sys/fs/cgroup/openrc; then