An init.d file is installed by copying it into /etc/init.d (which may be a symlink to another location). This can be done by the package installer. During the package's postinstall script, the program "/usr/lib/lsb/install_initd" to configure the distribution's boot script system to call the package's init.d file at the appropriate time.
The install_initd program takes a single argument, the pathanme to the /etc/init.d file. For example:
/usr/lib/lsb/install_initd /etc/init.d/inet |
When a software package is removed, the package's preuninstall script shall call /usr/lib/lsb/remove_initd and pass the pathname to the /etc/init.d file. The package manager is still responsible for removing the /etc/init.d file; the remove_initd program is provided in case the distribution needs to clean up any other modifications the distribution's boot script system which might have been made by the install_initd program. For example:
/usr/lib/lsb/remove_initd /etc/init.d/inet |
There should be a tool available to the user (ala RedHat's chkconfig) which can be used by the system administrator to easily manipulate at which init levels a particular init.d script is started or stopped. This specification currently does not specify such an interface, however.