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 1BD081387B1 for ; Sat, 18 Jan 2014 07:57:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 43584E0E29; Sat, 18 Jan 2014 07:57: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 A7E67E0E29 for ; Sat, 18 Jan 2014 07:56:59 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 98C9633FA83 for ; Sat, 18 Jan 2014 07:56:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 5718D18096 for ; Sat, 18 Jan 2014 07:56:57 +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: <1389468763.54ab12d2186d907ea8d7d882b6a9e0536fcc8f5c.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: sh/ X-VCS-Repository: proj/openrc X-VCS-Files: sh/.gitignore sh/Makefile sh/init-common-post.sh.in sh/init.sh.BSD.in X-VCS-Directories: sh/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 54ab12d2186d907ea8d7d882b6a9e0536fcc8f5c X-VCS-Branch: master Date: Sat, 18 Jan 2014 07:56:57 +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: e487c643-17d0-44d3-9ff8-7d78cf43ed82 X-Archives-Hash: b3975ea23d1084e6c2dd810096589cdf commit: 54ab12d2186d907ea8d7d882b6a9e0536fcc8f5c Author: William Hubbs gmail com> AuthorDate: Sat Jan 11 19:32:43 2014 +0000 Commit: William Hubbs gentoo org> CommitDate: Sat Jan 11 19:32:43 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=54ab12d2 Merge init-common-post code into BSD init script This code is no longer part of the initialization script for Linux, so we can move it into the init script for *BSD which is the only place it is used. --- sh/.gitignore | 1 - sh/Makefile | 4 ++-- sh/init-common-post.sh.in | 25 ------------------------- sh/init.sh.BSD.in | 23 ++++++++++++++++++++++- 4 files changed, 24 insertions(+), 29 deletions(-) diff --git a/sh/.gitignore b/sh/.gitignore index 386c42f..d5cb215 100644 --- a/sh/.gitignore +++ b/sh/.gitignore @@ -1,6 +1,5 @@ functions.sh gendepends.sh -init-common-post.sh rc-functions.sh runscript.sh cgroup-release-agent.sh diff --git a/sh/Makefile b/sh/Makefile index 7307f63..c1953f3 100644 --- a/sh/Makefile +++ b/sh/Makefile @@ -1,7 +1,7 @@ DIR= ${LIBEXECDIR}/sh -SRCS= init.sh.in functions.sh.in gendepends.sh.in init-common-post.sh.in \ +SRCS= init.sh.in functions.sh.in gendepends.sh.in \ rc-functions.sh.in runscript.sh.in tmpfiles.sh.in ${SRCS-${OS}} -INC= init-common-post.sh rc-mount.sh functions.sh rc-functions.sh +INC= rc-mount.sh functions.sh rc-functions.sh BIN= gendepends.sh init.sh runscript.sh tmpfiles.sh ${BIN-${OS}} INSTALLAFTER= _installafter diff --git a/sh/init-common-post.sh.in b/sh/init-common-post.sh.in deleted file mode 100644 index 96eeeee..0000000 --- a/sh/init-common-post.sh.in +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2007-2009 Roy Marples -# Released under the 2-clause BSD license. - -# mount $RC_SVCDIR as something we can write to if it's not rw -# On vservers, / is always rw at this point, so we need to clean out -# the old service state data -: ${RC_LIBEXECDIR:=@LIBEXECDIR@} -: ${RC_SVCDIR:=@LIBEXECDIR@/init.d} -case "$(openrc --sys)" in - OPENVZ|VSERVER) rm -rf "$RC_SVCDIR"/*;; - *) if mountinfo --quiet "$RC_SVCDIR"; then - rm -rf "$RC_SVCDIR"/* - else - mount_svcdir - fi - ;; -esac -retval=$? - -if [ -e "$RC_LIBEXECDIR"/cache/deptree ]; then - cp -p "$RC_LIBEXECDIR"/cache/* "$RC_SVCDIR" 2>/dev/null -fi - -echo sysinit >"$RC_SVCDIR"/softlevel -exit $retval diff --git a/sh/init.sh.BSD.in b/sh/init.sh.BSD.in index 0bd3e9b..2a53dcd 100644 --- a/sh/init.sh.BSD.in +++ b/sh/init.sh.BSD.in @@ -29,4 +29,25 @@ if [ -z "$RC_SYS" -a "$RC_UNAME" = "FreeBSD" ]; then sysctl hw.bus.devctl_disable=1 >/dev/null fi -. "$RC_LIBEXECDIR"/sh/init-common-post.sh +# mount $RC_SVCDIR as something we can write to if it's not rw +# On vservers, / is always rw at this point, so we need to clean out +# the old service state data +: ${RC_LIBEXECDIR:=@LIBEXECDIR@} +: ${RC_SVCDIR:=@LIBEXECDIR@/init.d} +case "$(openrc --sys)" in + OPENVZ|VSERVER) rm -rf "$RC_SVCDIR"/*;; + *) if mountinfo --quiet "$RC_SVCDIR"; then + rm -rf "$RC_SVCDIR"/* + else + mount_svcdir + fi + ;; +esac +retval=$? + +if [ -e "$RC_LIBEXECDIR"/cache/deptree ]; then + cp -p "$RC_LIBEXECDIR"/cache/* "$RC_SVCDIR" 2>/dev/null +fi + +echo sysinit >"$RC_SVCDIR"/softlevel +exit $retval