先日の記事の続き。
http://d.hatena.ne.jp/Hossy/20090218#p1
The following key points apply to old-style scripts in
/usr/local/etc/rc.d/:
Scripts are only executed if their basename(1) matches the shell
globbing pattern *.sh, and they are executable. Any other files or
directories present within the directory are silently ignored.
FreeBSD man rc.d より引用。
どうやら私の勘違いだった模様。
.sh ブログパターンにマッチする必要があるのはあくまで old-style なスクリプトだけで、
new-style のスクリプトは関係ない、という解釈が正しいみたい。
起動時に実行されるスクリプト /etc/rc は、/etc/rc.d にあるスクリプト ( みんな new-style ) を
実行した後で、/usr/local/etc/rc.d にある new-style のスクリプトのみを実行する。
で、/etc/rc.d/localpkg が、/usr/local/etc/rc.d にある old-style のスクリプトを実行する。
ちなみに、new-style と old-style の判断は、/etc/rc.subr にある find_local_scripts_new(), find_local_scripts_old() に書いてある。