Hi Greg,
Your bitbake recipe can inherit from the “update-rc.d” class, which takes care of this for you. Simply inherit from the class, define a couple of additional parameters in your recipe, and include the script in your fakeroot_do_install target. The update-rc.d class takes care of the rest.
Here’s a link to OpenEmbedded documentation for the update-rc.d class:
A good example of how this class is used is our mts-io driver. Check out `path-to-corecdp/multitech/recipes/multitech/mts-io.inc for an example. Specifically take a look at the following lines for the inheritance and declaration of variables that the class needs:
inherit update-rc.d
INITSCRIPT_NAME = "mts-io"
INITSCRIPT_PARAMS = "start 39 S ."
These lines install the init script in the /etc/init.d/ directory:
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/mts-io.init ${D}${sysconfdir}/init.d/mts-io
Let us know if you have more questions!
Cheers,
Mike