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 1QKFV0-00056o-Ct for garchives@archives.gentoo.org; Wed, 11 May 2011 19:55:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AD0501C011; Wed, 11 May 2011 19:55:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 798FB1C011 for ; Wed, 11 May 2011 19:55:03 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 101A21BC0E8 for ; Wed, 11 May 2011 19:55:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 7AC7D80504 for ; Wed, 11 May 2011 19:55:02 +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: <40341fcd7e66b8a72e0407bb509d149305aa529a.williamH@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: sh/ X-VCS-Repository: proj/openrc X-VCS-Files: sh/runscript.sh.in X-VCS-Directories: sh/ X-VCS-Committer: williamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 40341fcd7e66b8a72e0407bb509d149305aa529a Date: Wed, 11 May 2011 19:55:02 +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: 16ce2f82817586ffe14586976ad7c1b8 commit: 40341fcd7e66b8a72e0407bb509d149305aa529a Author: William Hubbs gentoo org> AuthorDate: Fri Apr 22 12:30:10 2011 +0000 Commit: William Hubbs gentoo org> CommitDate: Wed May 11 19:54:41 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D40341fcd do not run services if openrc did not boot the system X-Gentoo-Bug: 364159 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=3D364159 --- sh/runscript.sh.in | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in index 229d1ee..71935a0 100644 --- a/sh/runscript.sh.in +++ b/sh/runscript.sh.in @@ -16,6 +16,18 @@ sourcex() fi } =20 +if [ ! -e ${RC_SVCDIR}/softlevel ]; then + eerror "You are attempting to run an openrc service on a" + eerror "system which openrc did not boot." + eerror "You may be inside a chroot or you may have used" + eerror "another initialization system to boot this system." + eerror "In this situation, you will get unpredictable results!" + eerror + eerror "If you really want to do this, issue the following command:" + eerror "touch ${RC_SVCDIR}/softlevel" + exit 1 +fi + sourcex "@SYSCONFDIR@/init.d/functions.sh" sourcex "@LIBEXECDIR@/sh/rc-functions.sh" =20