aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sh/gendepends.sh.in8
1 files changed, 5 insertions, 3 deletions
diff --git a/sh/gendepends.sh.in b/sh/gendepends.sh.in
index 5c555ade..1ae2e6d7 100644
--- a/sh/gendepends.sh.in
+++ b/sh/gendepends.sh.in
@@ -51,9 +51,11 @@ do
[ -x "${RC_SERVICE}" -a -f "${RC_SERVICE}" ] || continue
# Only generate dependencies for runscripts
- read one two < "${RC_SERVICE}"
- [ "${one}" = "#!@PREFIX@/sbin/runscript" ] || continue
- unset one two
+ read one two three < "${RC_SERVICE}"
+ [ "${one}" = "#!@PREFIX@/sbin/runscript" ] || \
+ [ "${one}" = "#!" -a "${two}" = "@PREFIX@/sbin/runscript" ] || \
+ continue
+ unset one two three
export RC_SVCNAME=${RC_SERVICE##*/}