* [gentoo-commits] proj/openrc:0.24.x commit in: sh/
@ 2017-03-23 18:47 William Hubbs
0 siblings, 0 replies; only message in thread
From: William Hubbs @ 2017-03-23 18:47 UTC (permalink / raw
To: gentoo-commits
commit: 477e3dd8c13705affe87cc2c0e9286b2653a5688
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Thu Mar 23 18:17:11 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> 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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-23 18:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-23 18:47 [gentoo-commits] proj/openrc:0.24.x commit in: sh/ William Hubbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox