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 67A361387D4 for ; Fri, 1 Feb 2013 19:51:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BB6C421C017; Fri, 1 Feb 2013 19:51:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 527B021C017 for ; Fri, 1 Feb 2013 19:51:27 +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 4F82833DCD8 for ; Fri, 1 Feb 2013 19:51:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id DBB10E4073 for ; Fri, 1 Feb 2013 19:51:24 +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: <1359655913.8be072628c6ef9dce9ddafb911096e7035ed5401.WilliamH@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: init.d/ X-VCS-Repository: proj/openrc X-VCS-Files: init.d/bootmisc.in X-VCS-Directories: init.d/ X-VCS-Committer: WilliamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 8be072628c6ef9dce9ddafb911096e7035ed5401 X-VCS-Branch: master Date: Fri, 1 Feb 2013 19:51:24 +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: 815eb1cb-2823-43e8-a309-3fd18540b0d2 X-Archives-Hash: 85925717174484bd424cbfa65a66aad2 commit: 8be072628c6ef9dce9ddafb911096e7035ed5401 Author: William Hubbs gmail com> AuthorDate: Thu Jan 31 18:05:37 2013 +0000 Commit: William Hubbs gentoo org> CommitDate: Thu Jan 31 18:11:53 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=8be07262 remove cruft from /run directory The /run directory is a mount point for a tmpfs and should not contain any files or directories. This cleans out the /run/openrc symlink and any other files which were incorrectly placed in /run. Thanks to Ian Stakenvicius for pointing out this solution. --- init.d/bootmisc.in | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in index a96236a..6dabdfd 100644 --- a/init.d/bootmisc.in +++ b/init.d/bootmisc.in @@ -87,6 +87,16 @@ migrate_to_run() fi } +clean_run() +{ + local dir + dir=$(mktemp -d) + mount --bind / $dir + rm -rf $dir/run/* + umount $dir + rm -rf $dir +} + start() { # Remove any added console dirs @@ -115,6 +125,7 @@ start() if [ "$RC_UNAME" = Linux -a -d /run ]; then migrate_to_run /var/lock /run/lock migrate_to_run /var/run /run + clean_run fi if checkpath -W /var/run; then