how NetBSD's rc.d system interprets script names. Also add appropriate REQUIRE and PROVIDE sections to allow direct use in NetBSD's rc.d system.
Taken from PR#10394 by Dave Burgess <burgess@neonramp.com> with modifications.