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 1R18hU-00080f-Et for garchives@archives.gentoo.org; Wed, 07 Sep 2011 03:21:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E58B521C02D; Wed, 7 Sep 2011 03:21:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B730B21C02D for ; Wed, 7 Sep 2011 03:21:12 +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 382351B401E for ; Wed, 7 Sep 2011 03:21:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 23AC780042 for ; Wed, 7 Sep 2011 03:21:11 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <5ed4d084d95608e40cb21888c18a8f381a44cd69.WilliamH@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: sh/ X-VCS-Repository: proj/openrc X-VCS-Files: sh/init-early.sh.Linux.in sh/init.sh.Linux.in X-VCS-Directories: sh/ X-VCS-Committer: WilliamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 5ed4d084d95608e40cb21888c18a8f381a44cd69 Date: Wed, 7 Sep 2011 03:21:11 +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: c33f5d61fda3d5ebec569537a58acb8f commit: 5ed4d084d95608e40cb21888c18a8f381a44cd69 Author: William Hubbs gentoo org> AuthorDate: Wed Sep 7 02:00:08 2011 +0000 Commit: William Hubbs gentoo org> CommitDate: Wed Sep 7 02:00:08 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D5ed4d084 Mount /run as early as possible This commit moves the code that mounts /run to the earliest possible position in openrc. --- sh/init-early.sh.Linux.in | 24 ++++++++++++++++++++++++ sh/init.sh.Linux.in | 24 ------------------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/sh/init-early.sh.Linux.in b/sh/init-early.sh.Linux.in index f546951..3a81ef9 100644 --- a/sh/init-early.sh.Linux.in +++ b/sh/init-early.sh.Linux.in @@ -5,6 +5,30 @@ : ${CONSOLE:=3D/dev/console} : ${RC_LIBEXECDIR:=3D@LIBEXECDIR@} =20 +# Mount tmpfs on /run when directory exists. +# /run is a new directory for storing volatile runtime data. +# Read more about /run at https://lwn.net/Articles/436012 +if [ -d /run ]; then + if mountinfo -q /run; then + einfo "/run is already mounted, skipping" + else + ebegin "Mounting /run" + if ! fstabinfo --mount /run; then + mount -t tmpfs -o mode=3D0755,nosuid,nodev tmpfs /run + fi + eend $? + fi + if [ ! -d /run/lock ]; then + mkdir /run/lock + fi + if [ -d /run/lock ]; then + chown root:uucp /run/lock + chmod 0775 /run/lock + fi +elif [ -e /run ]; then + einfo "Unable to mount /run since it is not a directory" +fi + if [ -e "$RC_LIBEXECDIR"/console/unicode ]; then termencoding=3D"%G" kmode=3D"-u" diff --git a/sh/init.sh.Linux.in b/sh/init.sh.Linux.in index b357434..d01cc7b 100644 --- a/sh/init.sh.Linux.in +++ b/sh/init.sh.Linux.in @@ -91,30 +91,6 @@ if $mountproc; then eend $? fi =20 -# Mount tmpfs on /run when directory exists. -# /run is a new directory for storing volatile runtime data. -# Read more about /run at https://lwn.net/Articles/436012 -if [ -d /run ]; then - if mountinfo -q /run; then - einfo "/run is already mounted, skipping" - else - ebegin "Mounting /run" - if ! fstabinfo --mount /run; then - mount -t tmpfs -o mode=3D0755,nosuid,nodev tmpfs /run - fi - eend $? - fi - if [ ! -d /run/lock ]; then - mkdir /run/lock - fi - if [ -d /run/lock ]; then - chown root:uucp /run/lock - chmod 0775 /run/lock - fi -elif [ -e /run ]; then - einfo "Unable to mount /run since it is not a directory" -fi - # Try to mount xenfs as early as possible, otherwise rc_sys() will alway= s # return RC_SYS_XENU and will think that we are in a domU while it's not= . if grep -Eq "[[:space:]]+xenfs$" /proc/filesystems; then