From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 58229139694 for ; Thu, 23 Mar 2017 18:47:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 931BF21C209; Thu, 23 Mar 2017 18:47:43 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6E3C921C209 for ; Thu, 23 Mar 2017 18:47:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 81787341647 for ; Thu, 23 Mar 2017 18:47:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4A4DE7274 for ; Thu, 23 Mar 2017 18:47:41 +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: <1490294778.477e3dd8c13705affe87cc2c0e9286b2653a5688.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:0.24.x commit in: sh/ X-VCS-Repository: proj/openrc X-VCS-Files: sh/gendepends.sh.in X-VCS-Directories: sh/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 477e3dd8c13705affe87cc2c0e9286b2653a5688 X-VCS-Branch: 0.24.x Date: Thu, 23 Mar 2017 18:47:41 +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: 6b4c2f57-375e-4e34-804e-7129acd87f0b X-Archives-Hash: d42d80946e25bff00ff313e68ef82188 commit: 477e3dd8c13705affe87cc2c0e9286b2653a5688 Author: William Hubbs gmail com> AuthorDate: Thu Mar 23 18:17:11 2017 +0000 Commit: William Hubbs gentoo org> CommitDate: Thu Mar 23 18:46:18 2017 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=477e3dd8 sh/gendepends.sh.in: fix detection of service scripts We do not need to care about the path on the shebang line of a service script as long as the shebang line ends with "openrc-run". This fixes #119 and #120. sh/gendepends.sh.in | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sh/gendepends.sh.in b/sh/gendepends.sh.in index 82088c51..45147e6a 100644 --- a/sh/gendepends.sh.in +++ b/sh/gendepends.sh.in @@ -74,11 +74,22 @@ do # Only generate dependencies for OpenRC scripts read one two three <"$RC_SERVICE" - [ "$one" = "#!@SBINDIR@/runscript" ] || \ - [ "$one" = "#!@SBINDIR@/openrc-run" ] || \ - [ "$one" = "#!" -a "$two" = "@SBINDIR@/runscript" ] || \ - [ "$one" = "#!" -a "$two" = "@SBINDIR@/openrc-run" ] || \ - continue + case "$one" in + \#*/openrc-run) ;; + \#*/runscript) ;; + \#!) + case "$two" in + */openrc-run) ;; + */runscript) ;; + *) + continue + ;; + esac + ;; + *) + continue + ;; + esac unset one two three RC_SVCNAME=${RC_SERVICE##*/} ; export RC_SVCNAME