aboutsummaryrefslogtreecommitdiff
path: root/sh/gendepends.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'sh/gendepends.sh.in')
-rw-r--r--sh/gendepends.sh.in21
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