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 BDDCB138ACF for ; Mon, 24 Nov 2014 04:03:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 483F3E096A; Mon, 24 Nov 2014 04:03:39 +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 E118AE096A for ; Mon, 24 Nov 2014 04:03:38 +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 DA8C5340508 for ; Mon, 24 Nov 2014 04:03:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6419CAC87 for ; Mon, 24 Nov 2014 04:03:35 +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: <1416801541.2eb0ea9afbba584fc4c5ee0feefa9ae6a3d3278d.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:openrc-0.13.x 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: 2eb0ea9afbba584fc4c5ee0feefa9ae6a3d3278d X-VCS-Branch: openrc-0.13.x Date: Mon, 24 Nov 2014 04:03:35 +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: 6fe6059c-1f90-48eb-b14a-b411919a58ee X-Archives-Hash: e389083ea5d99136ecb75a782e030be1 commit: 2eb0ea9afbba584fc4c5ee0feefa9ae6a3d3278d Author: William Hubbs gmail com> AuthorDate: Sun Nov 23 16:28:21 2014 +0000 Commit: William Hubbs gentoo org> CommitDate: Mon Nov 24 03:59:01 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=2eb0ea9a Make sysfs behave like netmount and localmount sysfs now mounts all related sysfs file systems and returns success, like netmount and localmount. Also, we now check to make sure the cgroups are not mounted before we mount them. X-Gentoo-Bug: 530138 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=530138 --- init.d/sysfs.in | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/init.d/sysfs.in b/init.d/sysfs.in index 67485c2..bc0d9d3 100644 --- a/init.d/sysfs.in +++ b/init.d/sysfs.in @@ -113,7 +113,8 @@ mount_cgroups() yesno ${rc_controller_cgroups:-YES} && [ -e /proc/cgroups ] || return 0 while read name hier groups enabled rest; do case "${enabled}" in - 1) mkdir /sys/fs/cgroup/${name} + 1) mountinfo -q /sys/fs/cgroup/${name} && continue + mkdir /sys/fs/cgroup/${name} mount -n -t cgroup -o ${sysfs_opts},${name} \ ${name} /sys/fs/cgroup/${name} ;; @@ -129,25 +130,13 @@ restorecon_sys() restorecon -rF /sys/fs/cgroup >/dev/null 2>&1 eend $? fi - - return 0 } start() { - local retval mount_sys - retval=$? - if [ $retval -eq 0 ]; then - mount_misc - retval=$? - fi - if [ $retval -eq 0 ]; then - mount_cgroups - retval=$? - fi - + mount_misc + mount_cgroups restorecon_sys - - return $retval + return 0 }