There could be a space between #! and /sbin/runscript, Gentoo #218001.

This commit is contained in:
Roy Marples 2008-05-01 15:18:34 +00:00
parent bdaca0baf5
commit d384502e57

View File

@ -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##*/}