我project.init
在 debian 目录中有一个文件(以及rules
,control
等),dh_installinit
我的文件中有一个rules
文件(在binary-arch
规则中)。
完成dpkg-buildpackage
后,初始化脚本已复制到debian/project/etc/init.d/project
,并创建了各种前/后脚本。
但是,当我实际安装 .deb (带有dpkg -i
)时,init.d 脚本没有安装,所以我一定错过了这个过程的一部分。“新维护者指南”在 init.d 细节上的内容非常少(它基本上说不要使用它们,因为它们太高级了)。
dh_installinit 命令的详细输出是:
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