From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-764753-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id AA6B8138A1A for <garchives@archives.gentoo.org>; Fri, 16 Jan 2015 18:16:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 46899E08BA; Fri, 16 Jan 2015 18:16:11 +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 C2812E08BA for <gentoo-commits@lists.gentoo.org>; Fri, 16 Jan 2015 18:16:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D163D3407A8 for <gentoo-commits@lists.gentoo.org>; Fri, 16 Jan 2015 18:16:09 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7E9C6FB78 for <gentoo-commits@lists.gentoo.org>; Fri, 16 Jan 2015 18:16:08 +0000 (UTC) From: "Robin H. Johnson" <robbat2@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" <robbat2@gentoo.org> Message-ID: <1421432159.8ac4bdbd7b752c6a0805559d4644824d1f5c9603.robbat2@OpenRC> Subject: [gentoo-commits] proj/netifrc:master commit in: sh/ X-VCS-Repository: proj/netifrc X-VCS-Files: sh/functions.sh X-VCS-Directories: sh/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 8ac4bdbd7b752c6a0805559d4644824d1f5c9603 X-VCS-Branch: master Date: Fri, 16 Jan 2015 18:16:08 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 4af595d0-4113-4c47-b5a1-d9decbe6c8fb X-Archives-Hash: 6cbbb6977df030c2f4e7fca980ca2aba commit: 8ac4bdbd7b752c6a0805559d4644824d1f5c9603 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> AuthorDate: Fri Jan 16 18:15:59 2015 +0000 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> CommitDate: Fri Jan 16 18:15:59 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/netifrc.git;a=commit;h=8ac4bdbd Speed up testing for e* commands. Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> --- sh/functions.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sh/functions.sh b/sh/functions.sh index e209701..d907585 100644 --- a/sh/functions.sh +++ b/sh/functions.sh @@ -2,8 +2,7 @@ # systems. # First check whether e* commands are present in the environment -# XXX [[-n RC_GOT_FUNCTIONS]] ?? -if [ -n "$(command -v ebegin >/dev/null 2>&1)" ]; then +if [ x$RC_GOT_FUNCTIONS = xyes -o -n "$(command -v ebegin 2>/dev/null)" ]; then : # Then check for the presence of functions.sh @@ -16,6 +15,8 @@ else fi # runscript functions +# TODO: if another non-openrc system provides these in future, we have to +# change this structure. if [ "$INIT" != "openrc" ]; then # OpenRC functions used in depend