diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2017-03-23 13:17:11 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2017-03-23 13:17:11 -0500 |
commit | 50fccf47d4bd2ed6e7ea6ff7f72577c8e7b95d0d (patch) | |
tree | c00bf9452c90441e4a559a2583ca3ec5fa613248 /sh | |
parent | 9bd63b5d4a16601712a65eb8962214cdd4d26ce5 (diff) |
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.
Diffstat (limited to 'sh')
-rw-r--r-- | sh/gendepends.sh.in | 21 |
1 files 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 |