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 12CEE1381F3 for ; Thu, 6 Dec 2012 22:52:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 22A75E05EB; Thu, 6 Dec 2012 22:51:50 +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 96298E05EB for ; Thu, 6 Dec 2012 22:51:49 +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 7DDFD33DA70 for ; Thu, 6 Dec 2012 22:51:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 19595E5436 for ; Thu, 6 Dec 2012 22:51:47 +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: <1354833804.e5173b9127a42b7c6a209c278fbbcbcd29dcdccc.WilliamH@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: sh/ X-VCS-Repository: proj/openrc X-VCS-Files: sh/init.sh.Linux.in sh/migrate-to-run.sh.in X-VCS-Directories: sh/ X-VCS-Committer: WilliamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: e5173b9127a42b7c6a209c278fbbcbcd29dcdccc X-VCS-Branch: master Date: Thu, 6 Dec 2012 22:51:47 +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: 2a47a697-6bdc-44d9-b7cd-a66e3ffdeeb5 X-Archives-Hash: 15161f79a3c1939394ef901750abb66a commit: e5173b9127a42b7c6a209c278fbbcbcd29dcdccc Author: William Hubbs gmail com> AuthorDate: Thu Dec 6 22:43:24 2012 +0000 Commit: William Hubbs gentoo org> CommitDate: Thu Dec 6 22:43:24 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=e5173b91 migrate-to-run: do not require a reboot The script that migrates the @libexecdir /rc/init.d directory to /run/openrc should not require a reboot. Reported-by: chainsaw gentoo.org --- sh/init.sh.Linux.in | 8 ++++++++ sh/migrate-to-run.sh.in | 37 +++++++++---------------------------- 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/sh/init.sh.Linux.in b/sh/init.sh.Linux.in index 0eca736..f45eae1 100644 --- a/sh/init.sh.Linux.in +++ b/sh/init.sh.Linux.in @@ -51,6 +51,10 @@ if [ ! -d /run ]; then fi fi +if [ -L /run/openrc ]; then + rm /run/openrc +fi + if [ "$sys" = VSERVER ]; then rm -rf /run/* elif ! mountinfo -q /run; then @@ -84,5 +88,9 @@ if [ -e "$RC_LIBEXECDIR"/cache/deptree ]; then cp -p "$RC_LIBEXECDIR"/cache/* "$RC_SVCDIR" 2>/dev/null fi +if [ -e "$RC_LIBEXECDIR"/init.d ]; then + rm -rf "$RC_LIBEXECDIR"/init.d +fi + echo sysinit >"$RC_SVCDIR"/softlevel exit 0 diff --git a/sh/migrate-to-run.sh.in b/sh/migrate-to-run.sh.in index 73978e7..b18c541 100644 --- a/sh/migrate-to-run.sh.in +++ b/sh/migrate-to-run.sh.in @@ -11,38 +11,19 @@ fi if [ ! -d /run ]; then eerror "/run is not a directory." - eerror "This means the OpenRC dependency data cannot be migrated." - eerror "Please create the /run directory and reboot the system." - exit 1 + eerror "moving /run to /run.pre-openrc" + mv /run /run.pre-openrc + mkdir /run fi -if ! mountinfo -q -f tmpfs /run; then - for x in /run/.* /run/*; do - case "$x" in - /run/.|/run/..) - continue - ;; - esac - if [ -e "$x" ]; then - eerror "Your /run directory contains files." - eerror "Please reboot the system." - exit 1 - fi - done +rm -rf /run/openrc - mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run 2> /dev/null - if [ $? != 0 ]; then - eerror "Unable to mount a tmpfs on /run." - eerror "This means the OpenRC dependency data cannot be migrated." - eerror "Please create the /run directory and reboot the system." - exit 1 - fi +if ! mountinfo -q -f tmpfs /run; then + ln -s "@LIBEXECDIR@"/init.d /run/openrc +else + cp -a "@LIBEXECDIR@/init.d" /run/openrc + rc-update -u fi -rm -rf /run/openrc -cp -a "@LIBEXECDIR@/init.d" /run/openrc -rc-update -u -umount "@LIBEXECDIR@/init.d" -rm -rf "@LIBEXECDIR@/init.d" einfo "The OpenRC dependency data was migrated successfully." exit 0