I have a project.init
file in the debian directory (along with rules
, control
, etc), and I have dh_installinit
in my rules
file (in the binary-arch
rule).
When dpkg-buildpackage
completes, the init script has been copied to debian/project/etc/init.d/project
, and the various pre/post scripts have been created.
However, when I actually install the .deb (with dpkg -i
), the init.d script does not get installed, so I must be missing part of this process. The "New Maintainer's Guide" is pretty sparse on init.d details (it basically says not to use them, because they are too advanced).
The verbose output of the dh_installinit command is:
dh_installinit
install -p -m755 debian/project.init debian/project/etc/init.d/project
echo "# Automatically added by dh_installinit">> debian/project.postinst.debhelper
sed "s/#SCRIPT#/project/;s/#INITPARMS#/defaults/;s/#ERROR_HANDLER#/exit \$?/" /usr/share/debhelper/autoscripts/postinst-init >> debian/project.postinst.debhelper
echo '# End automatically added section' >> debian/project.postinst.debhelper
echo "# Automatically added by dh_installinit">> debian/project.prerm.debhelper
sed "s/#SCRIPT#/project/;s/#INITPARMS#/defaults/;s/#ERROR_HANDLER#/exit \$?/" /usr/share/debhelper/autoscripts/prerm-init >> debian/project.prerm.debhelper
echo '# End automatically added section' >> debian/project.prerm.debhelper
echo "# Automatically added by dh_installinit">> debian/project.postrm.debhelper
sed "s/#SCRIPT#/project/;s/#INITPARMS#/defaults/;s/#ERROR_HANDLER#/exit \$?/" /usr/share/debhelper/autoscripts/postrm-init >> debian/project.postrm.debhelper
echo '# End automatically added section' >> debian/project.postrm.debhelper